|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.ui.AbstractConnector
com.vaadin.client.ui.AbstractComponentConnector
public abstract class AbstractComponentConnector
| Field Summary | |
|---|---|
protected int |
SIGNIFICANT_MOVE_THRESHOLD
|
| Constructor Summary | |
|---|---|
AbstractComponentConnector()
Default constructor |
|
| Method Summary | |
|---|---|
protected Widget |
createWidget()
Creates and returns the widget for this VPaintableWidget. |
boolean |
delegateCaptionHandling()
Return true if parent handles caption, false if the paintable handles the caption itself. |
void |
flush()
Called for the active (focused) connector when a situation occurs that the focused connector might have buffered changes which need to be processed before other activity takes place. |
protected Icon |
getIcon()
Gets the icon set for this component. |
protected java.lang.String |
getIconUri()
Gets the URI of the icon set for this component. |
LayoutManager |
getLayoutManager()
|
com.vaadin.shared.AbstractComponentState |
getState()
Returns the shared state object for this connector. |
TooltipInfo |
getTooltipInfo(Element element)
Gets the tooltip info for the given element. |
Widget |
getWidget()
Returns the widget associated with this paintable. |
boolean |
hasTooltip()
Check whether there might be a tooltip for this component. |
boolean |
isReadOnly()
Deprecated. |
static boolean |
isRealUpdate(UIDL uidl)
Deprecated. |
boolean |
isRelativeHeight()
Returns true if the height of this paintable is currently
relative. |
boolean |
isRelativeWidth()
Returns true if the width of this paintable is currently
relative. |
boolean |
isUndefinedHeight()
Returns true if the height of this paintable is currently
undefined. |
boolean |
isUndefinedWidth()
Returns true if the width of this paintable is currently
undefined. |
void |
onStateChanged(StateChangeEvent stateChangeEvent)
Notifies the event handler that the state has changed. |
void |
onUnregister()
Event called when connector has been unregistered. |
protected void |
registerTouchHandlers()
The new default behaviour is for long taps to fire a contextclick event if there's a contextclick listener attached to the component. |
protected void |
sendContextClickEvent(com.vaadin.shared.MouseEventDetails details,
EventTarget eventTarget)
This method sends the context menu event to the server-side. |
void |
setWidgetEnabled(boolean widgetEnabled)
Sets the enabled state of the widget associated to this connector. |
protected void |
setWidgetStyleName(java.lang.String styleName,
boolean add)
This is used to add / remove state related style names from the widget. |
protected void |
setWidgetStyleNameWithPrefix(java.lang.String prefix,
java.lang.String styleName,
boolean add)
Deprecated. This will be removed once styles are no longer added with prefixes. |
protected boolean |
shouldHandleLongTap()
|
protected void |
unregisterTouchHandlers()
The new default behaviour is for long taps to fire a contextclick event if there's a contextclick listener attached to the component. |
protected void |
updateComponentSize()
Updates the component size based on the shared state, invoking the layout manager if necessary. |
protected void |
updateComponentSize(java.lang.String newWidth,
java.lang.String newHeight)
Updates the component size, invoking the layout
manager if necessary. |
void |
updateEnabledState(boolean enabledState)
|
protected void |
updateWidgetSize(java.lang.String newWidth,
java.lang.String newHeight)
Updates the DOM size of this connector's widget. |
protected void |
updateWidgetStyleNames()
Updates the user defined, read-only and error style names for the widget based the shared state. |
| Methods inherited from class com.vaadin.client.ui.AbstractConnector |
|---|
addStateChangeHandler, addStateChangeHandler, createState, doInit, ensureHandlerManager, fireEvent, forceStateChange, getChildren, getConnection, getConnectorId, getParent, getResourceUrl, getRpcImplementations, getRpcProxy, getStateType, hasEventListener, init, isEnabled, registerRpc, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent, unregisterRpc |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.vaadin.client.ServerConnector |
|---|
addStateChangeHandler, addStateChangeHandler, doInit, fireEvent, getChildren, getConnection, getParent, getRpcImplementations, hasEventListener, isEnabled, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent |
| Methods inherited from interface com.vaadin.shared.Connector |
|---|
getConnectorId |
| Field Detail |
|---|
protected int SIGNIFICANT_MOVE_THRESHOLD
| Constructor Detail |
|---|
public AbstractComponentConnector()
| Method Detail |
|---|
protected void unregisterTouchHandlers()
protected void registerTouchHandlers()
protected boolean shouldHandleLongTap()
protected void sendContextClickEvent(com.vaadin.shared.MouseEventDetails details,
EventTarget eventTarget)
event - protected Widget createWidget()
You should typically not override this method since the framework by
default generates an implementation that uses GWT#create(Class)
to create a widget of the same type as returned by the most specific
override of getWidget(). If you do override the method, you
can't call super.createWidget() since the metadata needed
for that implementation is not generated if there's an override of the
method.
public Widget getWidget()
getWidget in interface ComponentConnector@Deprecated public static boolean isRealUpdate(UIDL uidl)
public com.vaadin.shared.AbstractComponentState getState()
AbstractConnector
getState in interface ComponentConnectorgetState in interface ServerConnectorgetState in class AbstractConnectorpublic void onStateChanged(StateChangeEvent stateChangeEvent)
StateChangeEvent.StateChangeHandler
onStateChanged in interface StateChangeEvent.StateChangeHandleronStateChanged in class AbstractConnectorstateChangeEvent - the state change event with details about the changepublic void setWidgetEnabled(boolean widgetEnabled)
ComponentConnector
setWidgetEnabled in interface ComponentConnectorwidgetEnabled - true if the widget should be enabled, false otherwiseprotected void updateComponentSize()
layout manager if necessary.
protected void updateComponentSize(java.lang.String newWidth,
java.lang.String newHeight)
layout
manager if necessary.
newWidth - The new width as a CSS string. Cannot be null.newHeight - The new height as a CSS string. Cannot be null.
protected void updateWidgetSize(java.lang.String newWidth,
java.lang.String newHeight)
widget.
newWidth - The new width as a CSS string. Cannot be null.newHeight - The new height as a CSS string. Cannot be null.public boolean isRelativeHeight()
ComponentConnectortrue if the height of this paintable is currently
relative. If the height is relative, the actual height of the paintable
is a percentage of the size allocated to it by its parent.
isRelativeHeight in interface ComponentConnectortrue if the width is undefined, else
falsepublic boolean isRelativeWidth()
ComponentConnectortrue if the width of this paintable is currently
relative. If the width is relative, the actual width of the paintable is
a percentage of the size allocated to it by its parent.
isRelativeWidth in interface ComponentConnectortrue if the width is undefined, else
falsepublic boolean isUndefinedHeight()
ComponentConnectortrue if the height of this paintable is currently
undefined. If the height is undefined, the actual height of the paintable
is defined by its contents.
isUndefinedHeight in interface ComponentConnectortrue if the height is undefined, else
falsepublic boolean isUndefinedWidth()
ComponentConnectortrue if the width of this paintable is currently
undefined. If the width is undefined, the actual width of the paintable
is defined by its contents.
isUndefinedWidth in interface ComponentConnectortrue if the width is undefined, else
falsepublic boolean delegateCaptionHandling()
ComponentConnectorThis should always return true and all components should let the parent handle the caption and use other attributes for internal texts in the component
delegateCaptionHandling in interface ComponentConnectorprotected void updateWidgetStyleNames()
getWidget()
This method can be overridden to provide additional style names for the
component, for example see
AbstractFieldConnector.updateWidgetStyleNames()
protected void setWidgetStyleName(java.lang.String styleName,
boolean add)
Override this method for example if the style name given here should be
updated in another widget in addition to the one returned by the
getWidget().
styleName - the style name to be added or removedadd - true to add the given style, false
to remove it
@Deprecated
protected void setWidgetStyleNameWithPrefix(java.lang.String prefix,
java.lang.String styleName,
boolean add)
Override this method if the prefixed style name given here should be
updated in another widget in addition to the one returned by the
Connector's getWidget(), or if the prefix should be
different. For example see
DateFieldConnector.setWidgetStyleNameWithPrefix(String, String, boolean)
styleName - the style name to be added or removedadd - true to add the given style, false
to remove it@Deprecated public boolean isReadOnly()
ComponentConnector
isReadOnly in interface ComponentConnectorpublic LayoutManager getLayoutManager()
getLayoutManager in interface ComponentConnectorpublic void updateEnabledState(boolean enabledState)
updateEnabledState in interface ServerConnectorupdateEnabledState in class AbstractConnectorpublic void onUnregister()
ServerConnector
onUnregister in interface ServerConnectoronUnregister in class AbstractConnectorpublic TooltipInfo getTooltipInfo(Element element)
ComponentConnector
When overriding this method, ComponentConnector.hasTooltip() should also be
overridden to return true in all situations where this
method might return a non-empty result.
getTooltipInfo in interface ComponentConnectorelement - The element to lookup a tooltip for
public boolean hasTooltip()
ComponentConnectorComponentConnector.getTooltipInfo(Element)) if this method returns true.
This is only done to optimize performance, so in cases where the status
is not known, it's safer to return true so that there will
be a tooltip handler even though it might not be needed in all cases.
hasTooltip in interface ComponentConnectortrue if some part of the component might have a
tooltip, otherwise falseprotected java.lang.String getIconUri()
null if no icon has been
defined.protected Icon getIcon()
null if no icon has been defined.public void flush()
ComponentConnectorThis is currently called when the user changes the fragment using the back/forward button in the browser and allows the focused field to submit its value to the server before the fragment change event takes place.
flush in interface ComponentConnector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||