public class MaterialCollapsible extends MaterialWidget implements JsLoader, HasType<CollapsibleType>, HasActiveParent, HasNoSideNavSelection, HasClearActiveHandler
// Accordion
<m:MaterialCollapsible accordion="true" grid="s12 m6 l8">
<!-- ITEM 1 -->
<m:MaterialCollapsibleItem>
<m:MaterialCollapsibleHeader>
<m:MaterialLink text="First" iconType="POLYMER" iconPosition="LEFT" textColor="BLACK"/>
</m:MaterialCollapsibleHeader>
<m:MaterialCollapsibleBody>
<m:MaterialLabel text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."/>
</m:MaterialCollapsibleBody>
</m:MaterialCollapsibleItem>
</m:MaterialCollapsible>
// Expandable
<m:MaterialCollapsible accordion="false" grid="s12 m6 l8">
<!-- ITEM 1 -->
<m:MaterialCollapsibleItem>
<m:MaterialCollapsibleHeader>
<m:MaterialLink text="First" iconType="POLYMER" iconPosition="LEFT" textColor="BLACK"/>
</m:MaterialCollapsibleHeader>
<m:MaterialCollapsibleBody>
<m:MaterialLabel text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."/>
</m:MaterialCollapsibleBody>
</m:MaterialCollapsibleItem>
</m:MaterialCollapsible>
// Popout
<m:MaterialCollapsible type="POPOUT" grid="s12 m6 l8">
<!-- ITEM 1 -->
<m:MaterialCollapsibleItem>
<m:MaterialCollapsibleHeader>
<m:MaterialLink text="First" iconType="POLYMER" iconPosition="LEFT" textColor="BLACK"/>
</m:MaterialCollapsibleHeader>
<m:MaterialCollapsibleBody>
<m:MaterialLabel text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."/>
</m:MaterialCollapsibleBody>
</m:MaterialCollapsibleItem>
</m:MaterialCollapsible>
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
MaterialCollapsible.HasCollapsibleParent |
MaterialWidget.Featurecom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled$this| Constructor and Description |
|---|
MaterialCollapsible() |
MaterialCollapsible(MaterialCollapsibleItem... widgets) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(com.google.gwt.user.client.ui.Widget child) |
com.google.gwt.event.shared.HandlerRegistration |
addClearActiveHandler(ClearActiveEvent.ClearActiveHandler handler)
Fires when active state has been cleared to all children.
|
void |
clearActive() |
void |
close(int index)
Close the given collapsible item.
|
void |
closeAll()
Close all the collapsible items.
|
protected void |
collapsible(com.google.gwt.dom.client.Element e) |
com.google.gwt.user.client.ui.Widget |
getActive()
Get currently the active widget of it's parent
|
CollapsibleType |
getType()
Gets the type of the widget.
|
protected CssTypeMixin<CollapsibleType,MaterialCollapsible> |
getTypeMixin() |
boolean |
isAccordion()
Is the collapsible an 'accordion' type.
|
void |
load() |
protected void |
onLoad() |
void |
open(int index)
Open the given collapsible item.
|
void |
reload() |
boolean |
remove(com.google.gwt.user.client.ui.Widget w) |
void |
setAccordion(boolean accordion)
Configure if you want this collapsible container to
accordion its child elements or use expandable.
|
void |
setActive(int index)
Providing the one-based index of the parent widget to mark as active.
|
void |
setActive(int index,
boolean active)
Providing the active value and one-based index of the parent widget to mark as active.
|
void |
setEnabled(boolean enabled) |
void |
setType(CollapsibleType type)
Sets the type on the widget
|
void |
unload() |
$this, add, addAttachHandler, addBlurHandler, addClickHandler, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragLeaveHandler, addDragMoveHandler, addDragOverHandler, addDragStartHandler, addDropActivateHandler, addDropDeactivateHandler, addDropHandler, addFocusHandler, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addOrientationChangeHandler, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, body, clearActiveClass, enableFeature, getBackfaceVisibility, getBackgroundColor, getBorder, getBorderBottom, getBorderLeft, getBorderMixin, getBorderRadius, getBorderRight, getBorderTop, getCenterOn, getCenterOnMixin, getChildren, getChildrenList, getCircleMixin, getColorsMixin, getDataAttribute, getDepth, getDimensionMixin, getEnabledMixin, getFlexboxMixin, getFloat, getFloatMixin, getFocusableMixin, getFontSize, getFontSizeMixin, getFontWeight, getFontWeightMixin, getGridMixin, getHandlerRegistry, getHideOn, getHideOnMixin, getHoverableMixin, getId, getIdMixin, getInitialClasses, getLayoutPosition, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpacity, getOrientation, getOrientationMixin, getPerspective, getPerspectiveOrigin, getScrollspy, getScrollspyMixin, getSeparatorMixin, getShadow, getShadowMixin, getShowOn, getShowOnMixin, getTabIndex, getTextAlign, getTextAlignMixin, getTextColor, getTooltip, getTooltipDelayMs, getTooltipHTML, getTooltipMixin, getTooltipPosition, getTransform, getTransformMixin, getTransformOrigin, getTransformStyle, getTruncateMixin, getVerticalAlign, getVerticalAlignMixin, getWaves, getWavesMixin, getWidth, insert, insert, isCircle, isDetectOrientation, isEnabled, isFeatureEnabled, isHoverable, isSeparator, isTruncate, onUnload, registerHandler, removeHandler, setAccessKey, setBackfaceVisibility, setBackgroundColor, setBorder, setBorderBottom, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBottom, setCenterOn, setCircle, setClass, setDataAttribute, setDepth, setDetectOrientation, setDisplay, setFlex, setFlexAlignContent, setFlexAlignItems, setFlexAlignSelf, setFlexBasis, setFlexDirection, setFlexGrow, setFlexJustifyContent, setFlexOrder, setFlexShrink, setFlexWrap, setFloat, setFocus, setFontSize, setFontSize, setFontWeight, setGrid, setGwtDisplay, setHideOn, setHoverable, setId, setInitialClasses, setLayoutPosition, setLeft, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOffset, setOpacity, setOrientation, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPerspective, setPerspectiveOrigin, setRight, setScrollspy, setSeparator, setShadow, setShowOn, setStyle, setTabIndex, setTextAlign, setTextColor, setTooltip, setTooltipDelayMs, setTooltipHTML, setTooltipPosition, setTop, setTransform, setTransformOrigin, setTransformStyle, setTransition, setTruncate, setVerticalAlign, setVisibility, setWaves, stopTouchStartEvent, validate, windowadd, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, removeadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetVisibleforEach, spliteratorpublic MaterialCollapsible()
public MaterialCollapsible(MaterialCollapsibleItem... widgets)
protected void onLoad()
onLoad in class MaterialWidgetpublic void add(com.google.gwt.user.client.ui.Widget child)
add in interface com.google.gwt.user.client.ui.HasWidgetsadd in class MaterialWidgetpublic boolean remove(com.google.gwt.user.client.ui.Widget w)
remove in interface com.google.gwt.user.client.ui.HasWidgetsremove in class com.google.gwt.user.client.ui.ComplexPanelpublic void clearActive()
clearActive in interface HasSelectablespublic void open(int index)
index - the one-based collapsible item index.public void close(int index)
index - the one-based collapsible item index.public void closeAll()
public void setEnabled(boolean enabled)
setEnabled in interface com.google.gwt.user.client.ui.HasEnabledsetEnabled in class MaterialWidgetpublic void setType(CollapsibleType type)
HasTypesetType in interface HasType<CollapsibleType>type - T typepublic CollapsibleType getType()
HasTypegetType in interface HasType<CollapsibleType>protected void collapsible(com.google.gwt.dom.client.Element e)
public void setAccordion(boolean accordion)
public boolean isAccordion()
public void setActive(int index)
HasActiveParentsetActive in interface HasActiveParentpublic void setActive(int index, boolean active)
HasActiveParentsetActive in interface HasActiveParentpublic com.google.gwt.user.client.ui.Widget getActive()
HasActiveParentgetActive in interface HasActiveParentpublic com.google.gwt.event.shared.HandlerRegistration addClearActiveHandler(ClearActiveEvent.ClearActiveHandler handler)
HasClearActiveHandleraddClearActiveHandler in interface HasClearActiveHandlerprotected CssTypeMixin<CollapsibleType,MaterialCollapsible> getTypeMixin()
Copyright © 2018. All rights reserved.