WIDGET
- is the generic type of AbstractUiWidgetAdapter.getToplevelWidget()
.EVENT_ADAPTER
- is the generic type of getEventAdapter()
.public abstract class AbstractUiWidgetAdapterWithEvents<WIDGET,EVENT_ADAPTER extends AbstractEventAdapter> extends AbstractUiWidgetAdapter<WIDGET>
AbstractUiWidgetAdapter
with #addEventHandler.Modifier and Type | Field and Description |
---|---|
private EVENT_ADAPTER |
eventAdapter |
HTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_ID
PROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLE
WAI_ARIA
PROPERTY_LABEL
ACCESS_KEY_NONE, HTML_ATTRIBUTE_ACCESS_KEY
ATTRIBUTE_COLSPAN
Constructor and Description |
---|
AbstractUiWidgetAdapterWithEvents()
The constructor.
|
AbstractUiWidgetAdapterWithEvents(WIDGET toplevelWidget)
The constructor.
|
addStyle, createLabel, createToplevelWidget, getAccessKey, getActiveWidget, getAltText, getAttribute, getBundle, getColumnSpan, getContext, getHeightInRows, getId, getImage, getLabel, getMaximumTextLength, getPrimaryStyle, getSelectionMode, getStyles, getTitle, getTooltip, getToplevelWidget, getUiWidget, getUiWidgetTyped, getUrl, getValidationFailure, hasStyle, isDisposed, isEnabled, isFocused, isResizable, isStyleDeltaSupported, removeStyle, setMode, setParent, setPrimaryStyle, setUiWidget
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createAbsoluteImageUrl, removeFromParent, setVisible
setId
setTooltip
setEnabled
setStyles
dispose
setLength
getLength
getHeightInPixel, getWidthInPixel
setAttribute
private EVENT_ADAPTER extends AbstractEventAdapter eventAdapter
public AbstractUiWidgetAdapterWithEvents()
public AbstractUiWidgetAdapterWithEvents(WIDGET toplevelWidget)
toplevelWidget
- is the toplevel widget
.public 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.protected abstract EVENT_ADAPTER createEventAdapter(UiFeatureEvent source, UiHandlerEvent sender)
getEventAdapter()
instance. It should to be implemented by the top-level
widget-adapter class specific for a native UI toolkit. It may further be overridden to use a sub-class
instead when more specific behavior is needed.source
- is the source of the events (typically UiWidget
).sender
- is the sender of events (an adapter that delegates to the individual handlers/listeners).event adapter
.public EVENT_ADAPTER getEventAdapter()
event adapter
. May be null
.setEventSender(UiFeatureEvent, UiHandlerEvent)
,
AbstractEventAdapter
protected void applyEventAdapter(EVENT_ADAPTER adapter)
event adapter
to the widget(s) so it receive
native events. It will be called only once. Override only to add specific event registrations.adapter
- is the event adapter
.protected void applyEventAdapterForClick(EVENT_ADAPTER adapter)
EventType.CLICK
events.adapter
- is the event adapter
.protected void applyEventAdapterForFocus(EVENT_ADAPTER adapter)
EventType.FOCUS_GAIN
and
EventType.FOCUS_LOSS
events.adapter
- is the event adapter
.protected void applyEventAdapterForChange(EVENT_ADAPTER adapter)
EventType.VALUE_CHANGE
events.adapter
- is the event adapter
.protected void applyEventAdapterForSelection(EVENT_ADAPTER adapter)
EventType.SELECTION_CHANGE
events.adapter
- is the event adapter
.Copyright © 2001–2016 mmm-Team. All rights reserved.