ADAPTER - is the generic type of AbstractUiWidgetNative.getWidgetAdapter().CHILD - is the generic type of the children.public abstract class AbstractUiWidgetSingleComposite<ADAPTER extends UiWidgetAdapterSingleComposite<CHILD>,CHILD extends UiWidget> extends AbstractUiWidgetComposite<ADAPTER,CHILD> implements UiWidgetSingleComposite<CHILD>
UiWidgetSingleComposite.AbstractUiWidgetNative.SizeImplAbstractUiWidget.AccessHelper, AbstractUiWidget.EventSender, AbstractUiWidget.HandlerContainer| Modifier and Type | Field and Description |
|---|---|
private CHILD |
child |
STYLE_HEADERHTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_IDPROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLEWAI_ARIA| Constructor and Description |
|---|
AbstractUiWidgetSingleComposite(UiContext context,
ADAPTER widgetAdapter)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doSetChild(CHILD oldChild,
CHILD newChild)
This method is called from
setChild(UiWidget). |
CHILD |
getChild()
This method gets the single
child of this composite. |
CHILD |
getChild(int index)
This method gets the child at the given index.
|
int |
getChildCount()
This method gets the number of children in this composite.
|
int |
getChildIndex(UiWidget childWidget)
This method determines the index of the given
child in the list of children of this composite. |
protected void |
initializeWidgetAdapter(ADAPTER adapter)
This method is called from
AbstractUiWidgetNative.getWidgetAdapter() to initialize the UiWidgetAdapter. |
protected void |
onChildRemoved(CHILD oldChild) |
protected void |
onChildSet(CHILD newChild) |
protected void |
setChild(CHILD child) |
getChildaddChangeHandler, addStyle, clearMessages, clearValidity, createSize, createUniqueId, createWidgetAdapter, dispose, doGetValue, doSetMode, doSetValue, doValidate, getAriaRole, getAriaRoleFixedType, getId, getIndexOfStyle, getMode, getModeFixed, getParent, getPrimaryStyle, getSize, getStyles, getTooltip, getVisibleFlag, getWidgetAdapter, getWidgetAdapter, hasStyle, hasWidgetAdapter, isDisposed, isEnabled, isModifiedRecursive, isVisible, isVisibleRecursive, removeChangeHandler, removeFromParent, removeStyle, setAriaRole, setEnabled, setFocused, setId, setIdPrefix, setMode, setMode, setModeFixed, setModeRecursive, setParent, setPrimaryStyle, setStyles, setTooltip, setVisible, setVisible, toString, validateRecursive, visibilityChangedaddEventHandler, 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, setValueaddValidatorMandatory, createValidationFailure, getValue, getValueAndValidate, handleGetValueError, resetValue, setValue, setValueForUser, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChildgetContext, getParent, getSizeclearMessagesaddEventHandler, removeEventHandlersetModegetModesetModeFixedgetModeFixedsetIdgetIdsetTooltipgetTooltipgetVisibleFlag, isVisible, setVisible, setVisibleisVisibleRecursivesetEnabledisEnabledaddStyle, removeStylehasStylesetStylesgetStylessetPrimaryStylegetPrimaryStyledisposeisDisposedisModifiedgetAriaRolevalidateresetValue, setValue, setValueForUsergetValueprivate CHILD extends UiWidget child
getChild()public AbstractUiWidgetSingleComposite(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 UiWidgetAdapterSingleComposite<CHILD>,Void>adapter - is the UiWidgetAdapter to initialize.public final int getChildIndex(UiWidget childWidget)
child in the list of children of this composite. getChildIndex in interface UiWidgetAbstractCompositegetChildIndex in class AbstractUiWidgetComposite<ADAPTER extends UiWidgetAdapterSingleComposite<CHILD>,CHILD extends UiWidget>childWidget - is the potential child.index of the given child or -1 if it is NOT
a child of this composite.List.indexOf(Object)public final CHILD getChild(int index)
getChild in interface UiWidgetAbstractCompositegetChild in interface UiWidgetComposite<CHILD extends UiWidget>getChild in class AbstractUiWidgetComposite<ADAPTER extends UiWidgetAdapterSingleComposite<CHILD>,CHILD extends UiWidget>index - is the index of the requested child. Has to be in the range from 0 to
UiWidgetAbstractComposite.getChildCount() - 1.List.get(int)public final CHILD getChild()
child of this composite.getChild in interface UiWidgetSingleComposite<CHILD extends UiWidget>null if not set.protected void setChild(CHILD child)
child - is the new child.UiWidgetSingleMutableComposite.setChild(UiWidget)protected void onChildRemoved(CHILD oldChild)
oldChild - is the child that has just been removed.protected void onChildSet(CHILD newChild)
newChild - is the child that has just been set.protected void doSetChild(CHILD oldChild, CHILD newChild)
setChild(UiWidget). It can be overridden to implement custom logic
(e.g. attaching the child to AbstractUiWidgetNative.getWidgetAdapter()).public int getChildCount()
getChildCount in interface UiWidgetAbstractCompositegetChildCount in interface UiWidgetSingleComposite<CHILD extends UiWidget>getChildCount in class AbstractUiWidgetNative<ADAPTER extends UiWidgetAdapterSingleComposite<CHILD>,Void>Copyright © 2001–2016 mmm-Team. All rights reserved.