ADAPTER - is the generic type of AbstractUiWidgetNative.getWidgetAdapter().CHILD - is the generic type of the children.public abstract class AbstractUiWidgetDynamicComposite<ADAPTER extends UiWidgetAdapterDynamicComposite<CHILD>,CHILD extends UiWidget> extends AbstractUiWidgetComposite<ADAPTER,CHILD> implements UiWidgetDynamicComposite<CHILD>
UiWidgetDynamicComposite.AbstractUiWidgetNative.SizeImplAbstractUiWidget.AccessHelper, AbstractUiWidget.EventSender, AbstractUiWidget.HandlerContainer| Modifier and Type | Field and Description |
|---|---|
private List<CHILD> |
children |
STYLE_HEADERHTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_IDPROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLEWAI_ARIA| Constructor and Description |
|---|
AbstractUiWidgetDynamicComposite(UiContext context,
ADAPTER widgetAdapter)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(CHILD child)
This method adds the given
child to the end of the child-list. |
void |
addChild(CHILD child,
int index)
This method adds or better inserts the given
child at the given index. |
protected void |
doAddChild(CHILD child,
int index)
This method is called from
addChild(UiWidget) or addChild(UiWidget, int). |
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 child)
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. |
boolean |
removeChild(CHILD child)
This method removes the given
child from this panel. |
CHILD |
removeChild(int index)
This method removes the child at the given
index from this panel. |
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 final List<CHILD extends UiWidget> children
getChild(int)public AbstractUiWidgetDynamicComposite(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 UiWidgetAdapterDynamicComposite<CHILD>,Void>adapter - is the UiWidgetAdapter to initialize.public final boolean removeChild(CHILD child)
child from this panel.removeChild in interface UiWidgetMultiComposite<CHILD extends UiWidget>child - is the UiWidget to remove from this panel.true if the given child has been removed successfully,
false otherwise (it has NOT been previously added).List.remove(Object)public final CHILD removeChild(int index)
index from this panel.removeChild in interface UiWidgetMultiComposite<CHILD extends UiWidget>index - is the index of the child to remove. It has to be in the range from
0 to UiWidgetAbstractComposite.getChildCount() - 1.index.List.remove(int)public final int getChildIndex(UiWidget child)
child in the list of children of this composite. getChildIndex in interface UiWidgetAbstractCompositegetChildIndex in class AbstractUiWidgetComposite<ADAPTER extends UiWidgetAdapterDynamicComposite<CHILD>,CHILD extends UiWidget>child - 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 UiWidgetAdapterDynamicComposite<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 int getChildCount()
getChildCount in interface UiWidgetAbstractCompositegetChildCount in class AbstractUiWidgetNative<ADAPTER extends UiWidgetAdapterDynamicComposite<CHILD>,Void>public void addChild(CHILD child)
child to the end of the child-list. For
vertical layouts this will be the bottom and for horizontal layouts this will be the right.addChild in interface UiWidgetDynamicComposite<CHILD extends UiWidget>child - is the UiWidget to add as child of this composite.List.add(Object)public void addChild(CHILD child, int index)
child at the given index.addChild in interface UiWidgetDynamicComposite<CHILD extends UiWidget>child - is the UiWidget to add as child of this panel.index - is the index of the new child. It has to be in the range from
0 to UiWidgetAbstractComposite.getChildCount().UiWidgetDynamicComposite.addChild(UiWidget),
List.add(int, Object)protected void doAddChild(CHILD child, int index)
addChild(UiWidget) or addChild(UiWidget, int). It can be
overridden to implement custom logic (e.g. attaching the child to the
UiWidgetAdapter).Copyright © 2001–2016 mmm-Team. All rights reserved.