public interface UiWidgetAdapter extends AttributeWriteHtmlId, AttributeWriteTooltip, AttributeWriteEnabled, AttributeWriteStylesAdvanced, AttributeWriteDisposed, AttributeWriteLengthProperty, AttributeReadSizeInPixel, AttributeWriteAttribute
widget
of the underlying
toolkit implementation for a native widget
. UiWidget
-hierarchy and inherit different implementations (Swing,
SWT, GWT, etc.) from that without creating redundant code. AttributeRead*
methods) of attributes that cannot be changed by the end-user are
never used and therefore NOT implemented properly.HTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_ID
PROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLE
WAI_ARIA
Modifier and Type | Method and Description |
---|---|
String |
createAbsoluteImageUrl(String relativePath)
This method creates an absolute URL from the given
relativePath . |
UiWidgetLabel |
createLabel(UiContext context)
This method creates the label for this widget.
|
Object |
getToplevelWidget() |
boolean |
isStyleDeltaSupported()
This method determines if the style delta operations
AttributeWriteStylesAdvanced.addStyle(String) ,
AttributeWriteStylesAdvanced.removeStyle(String) and AttributeWritePrimaryStyle.setPrimaryStyle(String) are supported by this widget adapter. |
void |
removeFromParent()
This method removes the
widget from its parent. |
void |
setEventSender(UiFeatureEvent source,
UiHandlerEvent sender)
This method registers the given
event handler in the widget . |
void |
setMode(boolean editMode)
This method is called from
UiModeChanger for
AttributeWriteMode.setMode(net.sf.mmm.client.ui.api.common.UiMode) . |
void |
setParent(UiWidgetComposite<?> parent)
This method gets called whenever the parent of the according
UiWidget is changed. |
void |
setVisible(boolean visible,
boolean programmatic) |
setId
getId
setTooltip
getTooltip
setEnabled
isEnabled
addStyle, removeStyle
hasStyle
setStyles
getStyles
setPrimaryStyle
getPrimaryStyle
dispose
isDisposed
setLength
getLength
getHeightInPixel, getWidthInPixel
getAttribute
setAttribute
Object getToplevelWidget()
AbstractUiWidgetFactoryNative.getNativeWidget(net.sf.mmm.client.ui.api.widget.UiWidgetRegular)
void removeFromParent()
void setParent(UiWidgetComposite<?> parent)
UiWidget
is changed. It does nothing by default but may be
overridden to deal with special behavior of native UI toolkits.parent
- is the new parent or null
if removed from parent
.void setVisible(boolean visible, boolean programmatic)
visible
- - true
to set visible (show), false
to set invisible (hide).programmatic
- - see UiEvent.isProgrammatic()
.AttributeWriteVisibleAdvanced.setVisible(boolean, boolean)
void setMode(boolean editMode)
UiModeChanger
for
AttributeWriteMode.setMode(net.sf.mmm.client.ui.api.common.UiMode)
. It only
handles the predefined UiMode
s.editMode
- - true
of UiMode.EDIT
and
false
for UiMode.VIEW
.String createAbsoluteImageUrl(String relativePath)
relativePath
.relativePath
- is the relative path (URL suffix) to the image.UiConfiguration.getTheme()
UiWidgetLabel createLabel(UiContext context)
FormItem
in SmartGWT). In such
case this method will wrap it as UiWidgetLabel
. Otherwise this method should
create
a new
UiWidgetLabel
and return it.context
- is the UiContext
that may be used to create the label.boolean isStyleDeltaSupported()
AttributeWriteStylesAdvanced.addStyle(String)
,
AttributeWriteStylesAdvanced.removeStyle(String)
and AttributeWritePrimaryStyle.setPrimaryStyle(String)
are supported by this widget adapter.
Otherwise such operations are always performed via the AttributeWriteStyles.setStyles(String)
method. If supported
the delta operations are preferred as they are assumed to be more efficient.true
if style delta operations are supported, false
otherwise.void setEventSender(UiFeatureEvent source, UiHandlerEvent sender)
event handler
in the widget
. This method will be called only once.source
- is the event source
.sender
- is the UiHandlerEvent
where the events are send to. This is actually an adapter
that dispatches the events to the individual listeners registered in the widget.Copyright © 2001–2016 mmm-Team. All rights reserved.