Package com.vaadin.client
Interface ComponentConnector
-
- All Superinterfaces:
Connector
,Serializable
,ServerConnector
- All Known Subinterfaces:
DirectionalManagedLayout
,ManagedLayout
,ShortcutActionHandler.BeforeShortcutActionListener
,SimpleManagedLayout
- All Known Implementing Classes:
AbsoluteLayoutConnector
,AbstractColorPickerConnector
,AbstractComponentConnector
,AbstractComponentContainerConnector
,AbstractDateFieldConnector
,AbstractFieldConnector
,AbstractHasComponentsConnector
,AbstractLayoutConnector
,AbstractOrderedLayoutConnector
,AbstractSingleComponentContainerConnector
,AbstractSplitPanelConnector
,AccordionConnector
,AudioConnector
,BrowserFrameConnector
,ButtonConnector
,CalendarConnector
,CheckBoxConnector
,ColorPickerAreaConnector
,ColorPickerConnector
,ColorPickerGradientConnector
,ColorPickerGridConnector
,ComboBoxConnector
,CssLayoutConnector
,CustomComponentConnector
,CustomFieldConnector
,CustomLayoutConnector
,DateFieldConnector
,DragAndDropWrapperConnector
,EmbeddedConnector
,FlashConnector
,FormConnector
,FormLayoutConnector
,GridConnector
,GridLayoutConnector
,HorizontalLayoutConnector
,HorizontalSplitPanelConnector
,ImageConnector
,InlineDateFieldConnector
,JavaScriptComponentConnector
,LabelConnector
,LegacyConnector
,LinkConnector
,ListSelectConnector
,LoginFormConnector
,MediaBaseConnector
,MenuBarConnector
,NativeButtonConnector
,NativeSelectConnector
,OptionGroupBaseConnector
,OptionGroupConnector
,PanelConnector
,PasswordFieldConnector
,PopupDateFieldConnector
,PopupViewConnector
,ProgressBarConnector
,ProgressIndicatorConnector
,RichTextAreaConnector
,SliderConnector
,TableConnector
,TabsheetBaseConnector
,TabsheetConnector
,TextAreaConnector
,TextFieldConnector
,TextualDateConnector
,TreeConnector
,TreeTableConnector
,TwinColSelectConnector
,UIConnector
,UnknownComponentConnector
,UploadConnector
,VerticalLayoutConnector
,VerticalSplitPanelConnector
,VideoConnector
,WindowConnector
public interface ComponentConnector extends ServerConnector
An interface used by client-side widgets or paintable parts to receive updates from the corresponding server-side components in the form ofUIDL
. Updates can be sent back to the server using theApplicationConnection#updateVariable()
methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description 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.LayoutManager
getLayoutManager()
AbstractComponentState
getState()
Gets the current shared state of the 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 for thisComponentConnector
boolean
hasTooltip()
Check whether there might be a tooltip for this component.boolean
isReadOnly()
Deprecated.This belongs in AbstractFieldConnector, see #8514boolean
isRelativeHeight()
Returnstrue
if the height of this paintable is currently relative.boolean
isRelativeWidth()
Returnstrue
if the width of this paintable is currently relative.boolean
isUndefinedHeight()
Returnstrue
if the height of this paintable is currently undefined.boolean
isUndefinedWidth()
Returnstrue
if the width of this paintable is currently undefined.void
setWidgetEnabled(boolean widgetEnabled)
Sets the enabled state of the widget associated to this connector.-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
Methods inherited from interface com.vaadin.client.ServerConnector
addStateChangeHandler, addStateChangeHandler, doInit, fireEvent, getChildren, getConnection, getParent, getRpcImplementations, hasEventListener, isEnabled, onUnregister, removeStateChangeHandler, removeStateChangeHandler, setChildren, setParent, updateEnabledState
-
-
-
-
Method Detail
-
getState
AbstractComponentState getState()
Description copied from interface:ServerConnector
Gets the current shared state of the connector. Note that state is considered an internal part of the connector. You should not rely on the state object outside of the connector who owns it. If you depend on the state of other connectors you should use their public API instead of their state object directly.- Specified by:
getState
in interfaceServerConnector
- Returns:
- state The shared state object. Can be any sub type of
SharedState
. Never null.
-
getWidget
com.google.gwt.user.client.ui.Widget getWidget()
Returns the widget for thisComponentConnector
-
getLayoutManager
LayoutManager getLayoutManager()
-
isUndefinedWidth
boolean isUndefinedWidth()
Returnstrue
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.- Returns:
true
if the width is undefined, elsefalse
-
isUndefinedHeight
boolean isUndefinedHeight()
Returnstrue
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.- Returns:
true
if the height is undefined, elsefalse
-
isRelativeWidth
boolean isRelativeWidth()
Returnstrue
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.- Returns:
true
if the width is undefined, elsefalse
-
isRelativeHeight
boolean isRelativeHeight()
Returnstrue
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.- Returns:
true
if the width is undefined, elsefalse
-
isReadOnly
@Deprecated boolean isReadOnly()
Deprecated.This belongs in AbstractFieldConnector, see #8514Checks if the connector is read only.- Returns:
- true
-
delegateCaptionHandling
boolean delegateCaptionHandling()
Return true if parent handles caption, false if the paintable handles the caption itself.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
- Returns:
- true if caption handling is delegated to the parent, false if parent should not be allowed to render caption
-
setWidgetEnabled
void setWidgetEnabled(boolean widgetEnabled)
Sets the enabled state of the widget associated to this connector.- Parameters:
widgetEnabled
- true if the widget should be enabled, false otherwise
-
getTooltipInfo
TooltipInfo getTooltipInfo(com.google.gwt.dom.client.Element element)
Gets the tooltip info for the given element.When overriding this method,
hasTooltip()
should also be overridden to returntrue
in all situations where this method might return a non-empty result.- Parameters:
element
- The element to lookup a tooltip for- Returns:
- The tooltip for the element or null if no tooltip is defined for this element.
-
hasTooltip
boolean hasTooltip()
Check whether there might be a tooltip for this component. The framework will only add event listeners for automatically handling tooltips (usinggetTooltipInfo(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.- Returns:
true
if some part of the component might have a tooltip, otherwisefalse
-
flush
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.This 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.
-
-