ADAPTER
- is the generic type of AbstractUiWidgetNative.getWidgetAdapter()
.VALUE
- is the generic type of the value
. Use Void
for no value.public abstract class AbstractUiWidgetActive<ADAPTER extends UiWidgetAdapterActive,VALUE> extends AbstractUiWidgetNative<ADAPTER,VALUE> implements UiWidgetActive
AbstractUiWidgetNative.SizeImpl
AbstractUiWidget.AccessHelper, AbstractUiWidget.EventSender, AbstractUiWidget.HandlerContainer
Modifier and Type | Field and Description |
---|---|
private char |
accessKey |
STYLE_HEADER
HTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_ID
PROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLE
ACCESS_KEY_NONE, HTML_ATTRIBUTE_ACCESS_KEY
WAI_ARIA
Constructor and Description |
---|
AbstractUiWidgetActive(UiContext context,
ADAPTER widgetAdapter)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFocusHandler(UiHandlerEventFocus handler)
This method adds the given
UiHandlerEventFocus to this object. |
char |
getAccessKey()
This method gets the access key of this object.
|
protected void |
initializeWidgetAdapter(ADAPTER adapter)
This method is called from
AbstractUiWidgetNative.getWidgetAdapter() to initialize the UiWidgetAdapter . |
boolean |
isFocused()
This method determines if this object currently has the focus.
|
void |
onAccessKeyPressed(boolean programmatic) |
boolean |
removeFocusHandler(UiHandlerEventFocus handler)
This method removes the given
UiHandlerEventFocus from this object. |
void |
setAccessKey(char accessKey)
This method sets the
accessKey attribute of this object. |
boolean |
setFocused()
This method sets the
focus to this object. |
protected void |
setFocused(boolean programmatic) |
addChangeHandler, addStyle, clearMessages, clearValidity, createSize, createUniqueId, createWidgetAdapter, dispose, doGetValue, doSetMode, doSetValue, doValidate, getAriaRole, getAriaRoleFixedType, getChild, getChild, getChildCount, getChildIndex, getId, getIndexOfStyle, getMode, getModeFixed, getParent, getPrimaryStyle, getSize, getStyles, getTooltip, getVisibleFlag, getWidgetAdapter, getWidgetAdapter, hasStyle, hasWidgetAdapter, isDisposed, isEnabled, isModifiedRecursive, isVisible, isVisibleRecursive, removeChangeHandler, removeFromParent, removeStyle, setAriaRole, setEnabled, setId, setIdPrefix, setMode, setMode, setModeFixed, setModeRecursive, setParent, setPrimaryStyle, setStyles, setTooltip, setVisible, setVisible, toString, validateRecursive, visibilityChanged
addEventHandler, addValidator, clearMessagesLocal, clearValidationFailure, convertValueToString, fireEvent, fireValueChange, getBasicUtil, getContext, getDataBinding, getDataBinding, getDataBindingForWidget, getEventSender, getFactory, getLogger, getObserverSource, getOriginalValue, getRecentValue, getSource, getValueClass, getValueDirect, getValueOrException, getWidgetAdapter, hasEventSender, isMandatory, isModified, removeEventHandler, removeFromParent, removeValidator, setMandatory, setModified, setParent, setValue
addValidatorMandatory, createValidationFailure, getValue, getValueAndValidate, handleGetValueError, resetValue, setValue, setValueForUser, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getContext, getParent, getSize
clearMessages
addEventHandler, removeEventHandler
setMode
getMode
setModeFixed
getModeFixed
setId
getId
setTooltip
getTooltip
getVisibleFlag, isVisible, setVisible, setVisible
isVisibleRecursive
setEnabled
isEnabled
addStyle, removeStyle
hasStyle
setStyles
getStyles
setPrimaryStyle
getPrimaryStyle
dispose
isDisposed
isModified
getAriaRole
validate
resetValue, setValue, setValueForUser
getValue
private char accessKey
getAccessKey()
public AbstractUiWidgetActive(UiContext context, ADAPTER widgetAdapter)
context
- is the context
.widgetAdapter
- is the widget adapter
. Typically null
for
lazy initialization.protected void initializeWidgetAdapter(ADAPTER adapter)
AbstractUiWidgetNative.getWidgetAdapter()
to initialize the UiWidgetAdapter
. All
attributes of this widget need to be set in the UiWidgetAdapter
.initializeWidgetAdapter
in class AbstractUiWidgetNative<ADAPTER extends UiWidgetAdapterActive,VALUE>
adapter
- is the UiWidgetAdapter
to initialize.public boolean setFocused()
focus
to this object. setFocused
in interface AttributeWriteOnlyFocused
setFocused
in class AbstractUiWidgetNative<ADAPTER extends UiWidgetAdapterActive,VALUE>
true
if the focus has been set successfully, false
otherwise.protected void setFocused(boolean programmatic)
programmatic
- - see UiEvent.isProgrammatic()
.setFocused()
public boolean isFocused()
isFocused
in interface AttributeReadFocused
true
if this object is focused, false
otherwise.public void addFocusHandler(UiHandlerEventFocus handler)
UiHandlerEventFocus
to this object.addFocusHandler
in interface UiFeatureFocus
handler
- is the UiHandlerEventFocus
to add.public boolean removeFocusHandler(UiHandlerEventFocus handler)
UiHandlerEventFocus
from this object.removeFocusHandler
in interface UiFeatureFocus
handler
- is the UiHandlerEventFocus
to remove.true
if the handler
has been removed successfully, false
if it was NOT registered
and nothing has changed.public char getAccessKey()
focus
.getAccessKey
in interface AttributeReadAccessKey
AttributeReadAccessKey.ACCESS_KEY_NONE
if no access key is defined.public void setAccessKey(char accessKey)
accessKey
attribute of this object.setAccessKey
in interface AttributeWriteAccessKey
accessKey
- is the new value of AttributeReadAccessKey.getAccessKey()
. Use AttributeReadAccessKey.ACCESS_KEY_NONE
to unset.public void onAccessKeyPressed(boolean programmatic)
programmatic
- - true
if the access key was "pressed" by the program,
false
if performed by the end-user.Copyright © 2001–2016 mmm-Team. All rights reserved.