Package org.vaadin.firitin.components
Class TreeItem
java.lang.Object
com.vaadin.flow.component.Component
org.vaadin.firitin.components.TreeItem
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.ClickNotifier<TreeItem>
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasStyle
,Serializable
public class TreeItem
extends com.vaadin.flow.component.Component
implements com.vaadin.flow.component.ClickNotifier<TreeItem>
A very simple component composition to implement a trivial tree component.
- Author:
- mstahv
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddChild
(com.vaadin.flow.component.Component childComponent) void
com.vaadin.flow.shared.Registration
addClickListener
(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<TreeItem>> listener) void
com.vaadin.flow.component.Component
boolean
isOpen()
void
void
void
setSelected
(boolean selected) void
void
void
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.ClickNotifier
addClickShortcut, addDoubleClickListener, addSingleClickListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
TreeItem
public TreeItem(com.vaadin.flow.component.Component nodeContent) -
TreeItem
-
-
Method Details
-
addChild
-
getNodeContent
public com.vaadin.flow.component.Component getNodeContent() -
addChild
-
addChild
-
removeChild
-
toggleNode
public void toggleNode() -
showChildren
public void showChildren() -
closeChildren
public void closeChildren() -
showChildrenRecursively
public void showChildrenRecursively() -
setPopulateSubreeHandler
-
isOpen
public boolean isOpen() -
setSelected
public void setSelected(boolean selected) -
addClickListener
public com.vaadin.flow.shared.Registration addClickListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<TreeItem>> listener) - Specified by:
addClickListener
in interfacecom.vaadin.flow.component.ClickNotifier<TreeItem>
-