ADAPTER
- is the generic type of AbstractUiWidgetNative.getWidgetAdapter()
.public abstract class AbstractUiWidgetCollapsableSection<ADAPTER extends UiWidgetAdapterCollapsableSection> extends AbstractUiWidgetClickable<ADAPTER,Void> implements UiWidgetCollapsableSection
UiWidgetCollapsableSection
.Modifier and Type | Class and Description |
---|---|
private class |
AbstractUiWidgetCollapsableSection.CollapseHandler |
AbstractUiWidgetNative.SizeImpl
AbstractUiWidget.AccessHelper, AbstractUiWidget.EventSender, AbstractUiWidget.HandlerContainer
Modifier and Type | Field and Description |
---|---|
private boolean |
collapsed |
private AbstractUiWidgetCollapsableSection.CollapseHandler |
collapseHandler |
STYLE_COLLAPSE_BUTTON, STYLE_COLLAPSED, STYLE_PRIMARY
PROPERTY_LABEL
STYLE_HEADER
HTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_ID
PROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLE
WAI_ARIA
ACCESS_KEY_NONE, HTML_ATTRIBUTE_ACCESS_KEY
Constructor and Description |
---|
AbstractUiWidgetCollapsableSection(UiContext context,
ADAPTER widgetAdapter)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCollapseHandler(UiHandlerEventCollapse handler)
This method adds the given
UiHandlerEventCollapse to this object. |
void |
addCollapseWidget(UiWidget widget)
Adds a
collapse handler that triggers the
AttributeWriteVisibleAdvanced.getVisibleFlag() visibility} of
the given UiWidget . |
protected void |
initializeWidgetAdapter(ADAPTER adapter)
This method is called from
AbstractUiWidgetNative.getWidgetAdapter() to initialize the UiWidgetAdapter . |
boolean |
isCollapsed()
This method determines if this object is collapsed.
|
boolean |
removeCollapseHandle(UiHandlerEventCollapse handler)
This method removes the given
UiHandlerEventCollapse from this object. |
void |
setCollapsed(boolean collapsed)
This method sets the
collapsed status of this object. |
protected void |
setCollapsed(boolean collapsedFlag,
boolean programmatic) |
addClickHandler, click, click, getImage, getLabel, getSource, onAccessKeyPressed, removeClickHandler, setImage, setLabel, toString
addFocusHandler, getAccessKey, isFocused, removeFocusHandler, setAccessKey, setFocused, setFocused
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, setParent, setPrimaryStyle, setStyles, setTooltip, setVisible, setVisible, visibilityChanged
addEventHandler, addValidator, clearMessagesLocal, clearValidationFailure, convertValueToString, fireEvent, fireValueChange, getBasicUtil, getContext, getDataBinding, getDataBinding, getDataBindingForWidget, getEventSender, getFactory, getLogger, getObserverSource, getOriginalValue, getRecentValue, 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
setLabel
getLabel
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
setAccessKey
getAccessKey
addFocusHandler, removeFocusHandler
isFocused
setFocused
resetValue, setValue, setValueForUser
getValue
private boolean collapsed
isCollapsed()
private AbstractUiWidgetCollapsableSection.CollapseHandler collapseHandler
addCollapseWidget(UiWidget)
public AbstractUiWidgetCollapsableSection(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 AbstractUiWidgetClickable<ADAPTER extends UiWidgetAdapterCollapsableSection,Void>
adapter
- is the UiWidgetAdapter
to initialize.public boolean isCollapsed()
isCollapsed
in interface AttributeReadCollapsed
true
if this object is collapsed, false
if expanded.public void setCollapsed(boolean collapsed)
collapsed
status of this object.setCollapsed
in interface AttributeWriteCollapsed
collapsed
- - if true
the object will be collapsed, else it will be expanded.protected void setCollapsed(boolean collapsedFlag, boolean programmatic)
collapsedFlag
- - see setCollapsed(boolean)
.programmatic
- - see UiEvent.isProgrammatic()
.setCollapsed(boolean)
public void addCollapseHandler(UiHandlerEventCollapse handler)
UiHandlerEventCollapse
to this object.addCollapseHandler
in interface UiFeatureCollapse
handler
- is the UiHandlerEventCollapse
to add.public boolean removeCollapseHandle(UiHandlerEventCollapse handler)
UiHandlerEventCollapse
from this object.removeCollapseHandle
in interface UiFeatureCollapse
handler
- is the UiHandlerEventCollapse
to remove.true
if the handler
has been removed successfully, false
if it was NOT registered
and nothing has
changed.public void addCollapseWidget(UiWidget widget)
Adds
a
collapse handler
that triggers the
AttributeWriteVisibleAdvanced.getVisibleFlag()
visibility} of
the given UiWidget
. On collapse the UiWidget
will be hidden, on expand it will be shown
(or more precisely its visible state will be restored).addCollapseWidget
in interface UiWidgetCollapsableSection
widget
- is the widget to add.Copyright © 2001–2016 mmm-Team. All rights reserved.