|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.terminal.gwt.client.ui.AbstractConnector com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector
public abstract class AbstractComponentConnector
Field Summary | |
---|---|
protected List<String> |
styleNames
The style names from getState().getStyles() which are currently applied to the widget. |
Constructor Summary | |
---|---|
AbstractComponentConnector()
Default constructor |
Method Summary | |
---|---|
protected com.google.gwt.user.client.ui.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. |
LayoutManager |
getLayoutManager()
|
ComponentState |
getState()
Returns the shared state object for this connector. |
TooltipInfo |
getTooltipInfo(com.google.gwt.dom.client.Element element)
Gets the tooltip info for the given element. |
com.google.gwt.user.client.ui.Widget |
getWidget()
Returns the widget associated with this paintable. |
boolean |
hasEventListener(String eventIdentifier)
Checks if there is a registered server side listener for the given event identifier. |
protected void |
init()
Called when the connector has been initialized. |
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)
|
void |
onUnregister()
Event called when connector has been unregistered. |
void |
setWidgetEnabled(boolean widgetEnabled)
Sets the enabled state of the widget associated to this connector. |
protected void |
setWidgetStyleName(String styleName,
boolean add)
This is used to add / remove state related style names from the widget. |
protected void |
setWidgetStyleNameWithPrefix(String prefix,
String styleName,
boolean add)
Deprecated. This will be removed once styles are no longer added with prefixes. |
void |
updateEnabledState(boolean enabledState)
|
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.terminal.gwt.client.ui.AbstractConnector |
---|
addStateChangeHandler, createState, doInit, ensureHandlerManager, fireEvent, getChildren, getConnection, getConnectorId, getParent, getRpcImplementations, isEnabled, registerRpc, 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.terminal.gwt.client.ServerConnector |
---|
addStateChangeHandler, doInit, fireEvent, getChildren, getConnection, getParent, getRpcImplementations, isEnabled, setChildren, setParent |
Methods inherited from interface com.vaadin.terminal.gwt.client.Connector |
---|
getConnectorId |
Field Detail |
---|
protected List<String> styleNames
Constructor Detail |
---|
public AbstractComponentConnector()
Method Detail |
---|
protected void init()
AbstractConnector
init
in class AbstractConnector
protected com.google.gwt.user.client.ui.Widget createWidget()
public com.google.gwt.user.client.ui.Widget getWidget()
getWidget
in interface ComponentConnector
@Deprecated public static boolean isRealUpdate(UIDL uidl)
public ComponentState getState()
AbstractConnector
getState
in interface ComponentConnector
getState
in interface Connector
getState
in class AbstractConnector
public void onStateChanged(StateChangeEvent stateChangeEvent)
onStateChanged
in interface StateChangeEvent.StateChangeHandler
onStateChanged
in class AbstractConnector
public void setWidgetEnabled(boolean widgetEnabled)
ComponentConnector
setWidgetEnabled
in interface ComponentConnector
widgetEnabled
- true if the widget should be enabled, false otherwisepublic boolean isRelativeHeight()
ComponentConnector
true
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 ComponentConnector
true
if the width is undefined, else
false
public boolean isRelativeWidth()
ComponentConnector
true
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 ComponentConnector
true
if the width is undefined, else
false
public boolean isUndefinedHeight()
ComponentConnector
true
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 ComponentConnector
true
if the height is undefined, else
false
public boolean isUndefinedWidth()
ComponentConnector
true
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 ComponentConnector
true
if the width is undefined, else
false
public boolean delegateCaptionHandling()
ComponentConnector
This 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 ComponentConnector
protected void updateWidgetStyleNames()
getWidget()
This method can be overridden to provide additional style names for the
component, for example see
AbstractFieldConnector.updateWidgetStyleNames()
protected void setWidgetStyleName(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(String prefix, 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
PopupDateFieldConnector.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 ComponentConnector
public LayoutManager getLayoutManager()
getLayoutManager
in interface ComponentConnector
public boolean hasEventListener(String eventIdentifier)
hasEventListener
in interface ComponentConnector
eventIdentifier
- The identifier to check for
public void updateEnabledState(boolean enabledState)
updateEnabledState
in interface ServerConnector
updateEnabledState
in class AbstractConnector
public void onUnregister()
ServerConnector
onUnregister
in interface ServerConnector
onUnregister
in class AbstractConnector
public TooltipInfo getTooltipInfo(com.google.gwt.dom.client.Element element)
ComponentConnector
getTooltipInfo
in interface ComponentConnector
element
- The element to lookup a tooltip for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |