public class TreeHeightCollapseStrategy extends Object implements CollapseStrategy
CollapseStrategy that uses the css display property to hide/show the
collapsible element| Modifier and Type | Field and Description |
|---|---|
static String |
D_COLLAPSED |
| Constructor and Description |
|---|
TreeHeightCollapseStrategy(TreeItem<?> treeItem) |
TreeHeightCollapseStrategy(TreeItem<?> treeItem,
CollapseDuration transition) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(elemental2.dom.HTMLElement element,
Style<elemental2.dom.HTMLElement,org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>> style)
Implement this method to clean up any attributes or styles added the strategy when we switch to
a different one.
|
void |
hide(elemental2.dom.HTMLElement element,
Style<elemental2.dom.HTMLElement,org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>> style)
Implement this method to hide a collapsible element
|
void |
init(elemental2.dom.HTMLElement element,
Style<elemental2.dom.HTMLElement,org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>> style)
Implement this method to provide any initialization required for the collapse strategy
|
void |
show(elemental2.dom.HTMLElement element,
Style<elemental2.dom.HTMLElement,org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>> style)
Implement this method to show a collapsible element
|
public static final String D_COLLAPSED
public TreeHeightCollapseStrategy(TreeItem<?> treeItem)
public TreeHeightCollapseStrategy(TreeItem<?> treeItem, CollapseDuration transition)
public void init(elemental2.dom.HTMLElement element,
Style<elemental2.dom.HTMLElement,org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>> style)
CollapseStrategyinit in interface CollapseStrategyelement - The collapsible HTMLElementstyle - the Style of the elementpublic void cleanup(elemental2.dom.HTMLElement element,
Style<elemental2.dom.HTMLElement,org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>> style)
CollapseStrategycleanup in interface CollapseStrategyelement - The collapsible HTMLElementstyle - the Style of the elementpublic void show(elemental2.dom.HTMLElement element,
Style<elemental2.dom.HTMLElement,org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>> style)
show in interface CollapseStrategyelement - The collapsible HTMLElementstyle - the Style of the elementpublic void hide(elemental2.dom.HTMLElement element,
Style<elemental2.dom.HTMLElement,org.jboss.elemento.IsElement<elemental2.dom.HTMLElement>> style)
hide in interface CollapseStrategyelement - The collapsible HTMLElementstyle - the Style of the elementCopyright © 2019–2022 Dominokit. All rights reserved.