public class ChipsGroup extends BaseDominoElement<elemental2.dom.HTMLDivElement,ChipsGroup> implements Switchable<ChipsGroup>, HasSelectionHandler<ChipsGroup,Chip>, HasDeselectionHandler<ChipsGroup>
Chip which handles the selection behaviour between
them.
This component will handle the switching between all the chips configured, so that one chip will be select at one time
For example:
ChipsGroup.create()
.appendChild(Chip.create("Extra small"))
.appendChild(Chip.create("Small"))
.appendChild(Chip.create("Medium"))
.appendChild(Chip.create("Large"))
.appendChild(Chip.create("Extra large"))
.setColorScheme(ColorScheme.TEAL)
.addSelectionHandler(value -> Notification.createInfo("Chip [ " + chipsGroup.getSelectedChip().getValue() + " ] is selected").show())
BaseDominoElement,
Chip,
HasSelectionHandler,
HasDeselectionHandler,
SwitchableBaseDominoElement.ElementHandler<T>, BaseDominoElement.ResizeHandler<T>, BaseDominoElement.StyleEditor<E extends elemental2.dom.HTMLElement,T extends org.jboss.elemento.IsElement<E>>, BaseDominoElement.WavesStylerHasSelectionHandler.SelectionHandler<V>HasDeselectionHandler.DeselectionHandler| Constructor and Description |
|---|
ChipsGroup() |
| Modifier and Type | Method and Description |
|---|---|
ChipsGroup |
addChip(Chip chip)
Deprecated.
|
ChipsGroup |
addDeselectionHandler(HasDeselectionHandler.DeselectionHandler deselectionHandler) |
ChipsGroup |
addSelectionHandler(HasSelectionHandler.SelectionHandler<Chip> selectionHandler)
Adds a Selection handler to the component
|
ChipsGroup |
appendChild(Chip chip)
Adds new
Chip |
static ChipsGroup |
create() |
ChipsGroup |
disable() |
elemental2.dom.HTMLDivElement |
element() |
ChipsGroup |
enable() |
List<Chip> |
getChips() |
Chip |
getSelectedChip() |
boolean |
isEnabled() |
ChipsGroup |
removeSelectionHandler(HasSelectionHandler.SelectionHandler<Chip> selectionHandler) |
ChipsGroup |
selectAt(int index)
Selects a chip at an
index |
ChipsGroup |
setColorScheme(ColorScheme colorScheme)
Sets
ColorScheme for all the chips configured in this group |
add, add, addClickListener, addCss, addCss, addEventListener, addEventListener, addEventsListener, addHideListener, addShowListener, alignCenter, alignRight, appendChild, appendChild, apply, attr, blur, childNodes, clearElement, contains, contains, contains, containsCss, css, css, cssClassByIndex, cssClassesCount, cssText, elevate, elevate, firstChild, getAttachObserver, getAttribute, getBoundingClientRect, getChildElementCount, getClickableElement, getCollapsible, getCollapsibleElement, getDetachObserver, getDominoId, getElementsCount, getElevation, getFirstChild, getId, getTextContent, getTooltip, getWavesElement, hasAttribute, hasChildNodes, hasDirectChild, hide, hideOn, id, init, insertAfter, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertBefore, insertFirst, insertFirst, insertFirst, isAttached, isCollapsed, isDisabled, isEmptyElement, isEqualNode, isForceHidden, isHidden, isReadOnly, item, lastChild, length, onAttached, onDetached, onResize, pullLeft, pullRight, querySelector, querySelectorAll, remove, removeAttachObserver, removeAttribute, removeChild, removeChild, removeCss, removeCss, removeCssProperty, removeDetachObserver, removeEventListener, removeEventListener, removeHideListener, removeHideOn, removeShowListener, removeShowOn, removeTooltip, removeWaves, replaceCss, setAlignItems, setAttribute, setAttribute, setAttribute, setBackgroundColor, setBackgroundColor, setBorder, setBorderColor, setBottom, setBottom, setBoxShadow, setCollapseStrategy, setColor, setColor, setContent, setContent, setCssProperty, setCssProperty, setCursor, setCursor, setDisabled, setDisplay, setDisplay, setDropMenu, setFlex, setFloat, setFloat, setFontSize, setFontSize, setForceHidden, setHeight, setHeight, setId, setInnerHtml, setLeft, setLeft, setLineHeight, setLineHeight, setMargin, setMargin, setMarginBottom, setMarginBottom, setMarginLeft, setMarginLeft, setMarginRight, setMarginRight, setMarginTop, setMarginTop, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setOpacity, setOpacity, setOverFlow, setOverFlow, setOverFlowY, setPadding, setPadding, setPaddingBottom, setPaddingBottom, setPaddingLeft, setPaddingLeft, setPaddingRight, setPaddingRight, setPaddingTop, setPaddingTop, setPointerEvents, setPosition, setPosition, setReadOnly, setRight, setRight, setTabIndex, setTextAlign, setTextAlign, setTextContent, setTooltip, setTooltip, setTooltip, setTooltip, setTop, setTop, setTransitionDuration, setWidth, setWidth, setZIndex, show, showOn, style, style, styler, textContent, toggleDisplay, toggleDisplay, withWaves, withWavesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisExpandedadd, add, remove, remove, removeProperty, replace, setProperty, setPropertypublic static ChipsGroup create()
@Deprecated public ChipsGroup addChip(Chip chip)
appendChild(Chip)public ChipsGroup appendChild(Chip chip)
Chip
This will set the chip as selectable and adds selection/deselection handler to handle the switching between all the chips.
chip - the new Chip to addpublic ChipsGroup enable()
enable in interface Switchable<ChipsGroup>enable in class BaseDominoElement<elemental2.dom.HTMLDivElement,ChipsGroup>public ChipsGroup disable()
disable in interface Switchable<ChipsGroup>disable in class BaseDominoElement<elemental2.dom.HTMLDivElement,ChipsGroup>public boolean isEnabled()
isEnabled in interface Switchable<ChipsGroup>public Chip getSelectedChip()
public ChipsGroup addSelectionHandler(HasSelectionHandler.SelectionHandler<Chip> selectionHandler)
addSelectionHandler in interface HasSelectionHandler<ChipsGroup,Chip>selectionHandler - Selectable.SelectionHandlerpublic ChipsGroup removeSelectionHandler(HasSelectionHandler.SelectionHandler<Chip> selectionHandler)
removeSelectionHandler in interface HasSelectionHandler<ChipsGroup,Chip>public ChipsGroup addDeselectionHandler(HasDeselectionHandler.DeselectionHandler deselectionHandler)
addDeselectionHandler in interface HasDeselectionHandler<ChipsGroup>deselectionHandler - HasDeselectionHandler.DeselectionHandlerpublic elemental2.dom.HTMLDivElement element()
element in interface org.jboss.elemento.IsElement<elemental2.dom.HTMLDivElement>element in class BaseDominoElement<elemental2.dom.HTMLDivElement,ChipsGroup>public ChipsGroup setColorScheme(ColorScheme colorScheme)
ColorScheme for all the chips configured in this groupcolorScheme - the new ColorSchemepublic ChipsGroup selectAt(int index)
indexindex - the index of the chip to selectCopyright © 2019–2022 Dominokit. All rights reserved.