import java.util.Set;
-import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.FocusWidget;
import com.google.gwt.user.client.ui.Focusable;
import com.google.gwt.user.client.ui.Widget;
}
/**
- * Returns the shared state object for a paintable widget.
- *
- * A new state instance is created using {@link #createState()} if none has
- * been set by the server.
+ * Returns the shared state object for this connector.
*
* If overriding this method to return a more specific type, also
* {@link #createState()} must be overridden.
* @return current shared state (not null)
*/
public ComponentState getState() {
- if (state == null) {
- state = createState();
- }
-
return state;
}
- /**
- * Creates a new instance of a shared state object for the widget. Normally,
- * the state instance is created by the server and sent to the client before
- * being used - this method is used if no shared state has been sent by the
- * server.
- *
- * When overriding {@link #getState()}, also {@link #createState()} should
- * be overridden to match it.
- *
- * @return newly created component shared state instance
- */
- protected ComponentState createState() {
- return GWT.create(ComponentState.class);
- }
-
public static boolean isRealUpdate(UIDL uidl) {
return !uidl.hasAttribute("cached");
}
*/
package com.vaadin.terminal.gwt.client.ui;
-import com.google.gwt.core.client.GWT;
import com.vaadin.terminal.gwt.client.AbstractFieldState;
-import com.vaadin.terminal.gwt.client.ComponentState;
public abstract class AbstractFieldConnector extends AbstractComponentConnector {
return (AbstractFieldState) super.getState();
}
- @Override
- protected ComponentState createState() {
- return GWT.create(AbstractFieldState.class);
- }
-
@Override
public boolean isReadOnly() {
return super.isReadOnly() || getState().isPropertyReadOnly();
import java.util.LinkedList;
-import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.dom.client.DomEvent;
import com.google.gwt.event.dom.client.DomEvent.Type;
return (AbstractSplitPanelState) super.getState();
}
- @Override
- protected AbstractSplitPanelState createState() {
- return GWT.create(AbstractSplitPanelState.class);
- }
-
private ComponentConnector getFirstChild() {
return (ComponentConnector) getState().getFirstChild();
}
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.ComponentState;
import com.vaadin.terminal.gwt.client.EventHelper;
import com.vaadin.terminal.gwt.client.MouseEventDetails;
import com.vaadin.terminal.gwt.client.UIDL;
return (ButtonState) super.getState();
}
- @Override
- protected ComponentState createState() {
- return GWT.create(ButtonState.class);
- }
}
import com.vaadin.terminal.gwt.client.AbstractFieldState;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.ComponentConnector;
-import com.vaadin.terminal.gwt.client.ComponentState;
import com.vaadin.terminal.gwt.client.ConnectorMap;
import com.vaadin.terminal.gwt.client.LayoutManager;
import com.vaadin.terminal.gwt.client.UIDL;
return (AbstractFieldState) super.getState();
}
- @Override
- protected ComponentState createState() {
- return GWT.create(AbstractFieldState.class);
- }
-
}
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.ComponentState;
import com.vaadin.terminal.gwt.client.EventHelper;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.communication.RpcProxy;
return (ButtonState) super.getState();
}
- @Override
- protected ComponentState createState() {
- return GWT.create(ButtonState.class);
- }
}
return (PanelState) super.getState();
}
- @Override
- protected PanelState createState() {
- return GWT.create(PanelState.class);
- }
-
@Override
public void connectorHierarchyChanged(ConnectorHierarchyChangedEvent event) {
super.connectorHierarchyChanged(event);
import com.vaadin.terminal.gwt.client.ApplicationConnection;
import com.vaadin.terminal.gwt.client.BrowserInfo;
import com.vaadin.terminal.gwt.client.ComponentConnector;
-import com.vaadin.terminal.gwt.client.ComponentState;
import com.vaadin.terminal.gwt.client.DirectionalManagedLayout;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
return (AbstractFieldState) super.getState();
}
- @Override
- protected ComponentState createState() {
- return GWT.create(AbstractFieldState.class);
- }
-
/**
* Shows a saved row context menu if the row for the context menu is still
* visible. Does nothing if a context menu has not been saved.
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.terminal.gwt.client.AbstractFieldState;
import com.vaadin.terminal.gwt.client.ApplicationConnection;
-import com.vaadin.terminal.gwt.client.ComponentState;
import com.vaadin.terminal.gwt.client.TooltipInfo;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.ui.VTree.TreeNode;
return (AbstractFieldState) super.getState();
}
- @Override
- protected ComponentState createState() {
- return GWT.create(AbstractFieldState.class);
- }
-
}
return (WindowState) super.getState();
}
- @Override
- protected WindowState createState() {
- return GWT.create(WindowState.class);
- }
-
/**
* Gives the WindowConnector an order number. As a side effect, moves the
* window according to its order number so the windows are stacked. This