Package org.dwcj.controls.treeview
Class TreeView
java.lang.Object
org.dwcj.controls.AbstractControl
org.dwcj.controls.AbstractDwcControl
org.dwcj.controls.treeview.TreeView
- All Implemented Interfaces:
Control,Enableable,HasAttribute,HasClassName,HasComputedStyle,HasControlText,HasDestroy,HasStyle,HasTooltip,HasVisibility
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.dwcj.controls.AbstractDwcControl
BASISNUMBER_1, BASISNUMBER_25, BASISNUMBER_250, focusable, horizontalScrollBarPosition, mouseWheelCondition, readOnly, STR_EXPANSE, STR_THEME, tabTraversable, textAlignment, textHighlight, verticalScrollBarPositionFields inherited from class org.dwcj.controls.AbstractControl
ctrl, destroyed, elementId, userData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddClassName(String selector) Adds a CSS class to the list of CSS classes for the control.voidaddExpandableNode(int childID, int parentID, String text) voidvoidvoidclearNodeIcon(int id) voidclearNodeSelectedIcon(int id) voidcollapseNode(int id) voidcollapseTreeFromNode(int id) protected voidCreate the object on a panel p.voidvoiddeselectChildren(int parentID) voiddeselectNode(int id) voideditNode(int id) voidendEdit()voidexpandNode(int id) voidexpandTreeFromNode(int id) intgetChild(int parentID, int index) intgetChildIndex(int parentID) intgetDragType(int id) getDropTypes(int id) intgetNodeText(int id) getNodeToolTipText(int id) intgetParentNode(int childID) intgetRoot()intintvoidinsertExpandableNode(int childID, int parentID, String text, int index) voidinsertNode(int childID, int parentID, String text, int index) booleanbooleanisLeafNode(int id) booleanisNodeEditable(int id) booleanisNodeExpandable(int id) booleanisNodeExpanded(int id) booleanisNodeSelected(int id) booleanbooleanonCollapse(Consumer<TreeCollapseEvent> callback) onDeselect(Consumer<TreeDeselectEvent> callback) onDoubleClick(Consumer<TreeDoubleClickedEvent> callback) onEditStopped(Consumer<TreeEditStoppedEvent> callback) onExpand(Consumer<TreeExpandedEvent> callback) onGainedFocus(Consumer<TreeGainedFocusEvent> callback) onLostFocus(Consumer<TreeLostFocusEvent> callback) onSelect(Consumer<TreeSelectedEvent> callback) removeClassName(String selector) Removes a CSS class from the list of CSS classes for the control.voidremoveDescendants(int id) voidremoveNode(int id) voidselectChildren(int parentID) voidselectNode(int id) setAttribute(String attribute, String value) set the value for an attribute in the controlvoidsetCollapsedIcon(Icon icon) voidsetDragEnabled(boolean enabled) voidsetDragType(int id, String type) voidsetDropTypes(int id, List<String> types) setEnabled(Boolean enabled) Set whether the control is to be enabledvoidsetExpandedIcon(Icon icon) setExpanse(TreeView.Expanse expanse) Assigns the ID of a controlvoidsetLeafIcon(Icon icon) voidsetNodeEditable(int id, boolean editable) voidsetNodeIcon(int id, Icon icon) voidsetNodeSelectedIcon(int id, Icon icon) voidsetNodeText(int id, String text) voidsetNodeToolTipText(int id, String text) voidsetNodeVisible(int id) voidvoidsetRootVisible(boolean visible) voidsetSelectedIcon(Icon icon) voidsetSelectionMode(int mode) Assigns specified value to the specified CSS propertyset the text of the control Each control implementing this interface has a text property, which might be visible in different ways (caption, title, contents of edit) or sometimes not visible at allsetTooltipText(String text) Set the tooltip text of the controlvoidsetTreeEditable(boolean editable) setVisible(Boolean visible) Set whether the control is visible or invisibleMethods inherited from class org.dwcj.controls.AbstractDwcControl
catchUp, destroy, getAttribute, getComputedStyle, getText, getTooltipText, isEnabled, isVisible, setControlExpanse, setControlThemeMethods inherited from class org.dwcj.controls.AbstractControl
getCaughtUp, getId, getUserData, isDestroyed, setUserData
-
Constructor Details
-
TreeView
public TreeView()
-
-
Method Details
-
create
Description copied from class:AbstractControlCreate the object on a panel p. The preferred way of creating an object is using the Panel::add(Control) method, instead of this- Overrides:
createin classAbstractControl- Parameters:
p- the panel to add this control on
-
addExpandableNode
-
addNode
-
clearImageSize
public void clearImageSize() -
getChild
public int getChild(int parentID, int index) -
getChildIndex
public int getChildIndex(int parentID) -
getParentNode
public int getParentNode(int childID) -
getRoot
public int getRoot() -
insertExpandableNode
-
insertNode
-
isLeafNode
public boolean isLeafNode(int id) -
removeDescendants
public void removeDescendants(int id) -
removeNode
public void removeNode(int id) -
setRoot
-
collapseNode
public void collapseNode(int id) -
collapseTreeFromNode
public void collapseTreeFromNode(int id) -
expandNode
public void expandNode(int id) -
expandTreeFromNode
public void expandTreeFromNode(int id) -
getCollapsedNode
public int getCollapsedNode() -
getExpandedNode
public int getExpandedNode() -
getExpandedNodes
-
isNodeExpandable
public boolean isNodeExpandable(int id) -
isNodeExpanded
public boolean isNodeExpanded(int id) -
getNodeText
-
setNodeText
-
editNode
public void editNode(int id) -
endEdit
public void endEdit() -
isNodeEditable
public boolean isNodeEditable(int id) -
isTreeEditable
public boolean isTreeEditable() -
setNodeEditable
public void setNodeEditable(int id, boolean editable) -
setTreeEditable
public void setTreeEditable(boolean editable) -
clearNodeIcon
public void clearNodeIcon(int id) -
clearNodeSelectedIcon
public void clearNodeSelectedIcon(int id) -
setCollapsedIcon
-
setExpandedIcon
-
setLeafIcon
-
setNodeIcon
-
setNodeSelectedIcon
-
setSelectedIcon
-
deselectAll
public void deselectAll() -
deselectChildren
public void deselectChildren(int parentID) -
deselectNode
public void deselectNode(int id) -
getSelectedNode
public int getSelectedNode() -
getSelectedNodes
-
getSelectionMode
public int getSelectionMode() -
isNodeSelected
public boolean isNodeSelected(int id) -
isRootVisible
public boolean isRootVisible() -
selectChildren
public void selectChildren(int parentID) -
selectNode
public void selectNode(int id) -
setNodeVisible
public void setNodeVisible(int id) -
setRootVisible
public void setRootVisible(boolean visible) -
setSelectionMode
public void setSelectionMode(int mode) -
getNodeToolTipText
-
setNodeToolTipText
-
isDragEnabled
public boolean isDragEnabled() -
getDragType
-
getDropTypes
-
setDragEnabled
public void setDragEnabled(boolean enabled) -
setDragType
-
setDropTypes
-
onGainedFocus
-
onLostFocus
-
onSelect
-
onDeselect
-
onExpand
-
onCollapse
-
onEditStopped
-
onDoubleClick
-
setText
Description copied from interface:HasControlTextset the text of the control Each control implementing this interface has a text property, which might be visible in different ways (caption, title, contents of edit) or sometimes not visible at all- Specified by:
setTextin interfaceHasControlText- Overrides:
setTextin classAbstractDwcControl- Returns:
- the control itself
-
setVisible
Description copied from interface:HasVisibilitySet whether the control is visible or invisible- Specified by:
setVisiblein interfaceHasVisibility- Overrides:
setVisiblein classAbstractDwcControl- Returns:
- the control itself
-
setEnabled
Description copied from interface:EnableableSet whether the control is to be enabled- Specified by:
setEnabledin interfaceEnableable- Overrides:
setEnabledin classAbstractDwcControl- Returns:
- the control itself
-
setTooltipText
Description copied from interface:HasTooltipSet the tooltip text of the control- Specified by:
setTooltipTextin interfaceHasTooltip- Overrides:
setTooltipTextin classAbstractDwcControl- Returns:
- the control itself
-
setAttribute
Description copied from class:AbstractDwcControlset the value for an attribute in the control- Specified by:
setAttributein interfaceHasAttribute- Overrides:
setAttributein classAbstractDwcControl- Parameters:
attribute- the name of the attributevalue- the value to be set- Returns:
- the control itself
-
setId
Description copied from interface:ControlAssigns the ID of a control- Specified by:
setIdin interfaceControl- Overrides:
setIdin classAbstractControl- Parameters:
elementId- Desired ID designation- Returns:
- The control itself
-
setStyle
Description copied from interface:HasStyleAssigns specified value to the specified CSS property- Specified by:
setStylein interfaceHasStyle- Overrides:
setStylein classAbstractDwcControl- Parameters:
property- The CSS property to be changedvalue- The value of the selected CSS property- Returns:
- The control itself
-
addClassName
Description copied from interface:HasClassNameAdds a CSS class to the list of CSS classes for the control.- Specified by:
addClassNamein interfaceHasClassName- Overrides:
addClassNamein classAbstractDwcControl- Returns:
- The control itself
-
removeClassName
Description copied from interface:HasClassNameRemoves a CSS class from the list of CSS classes for the control.- Specified by:
removeClassNamein interfaceHasClassName- Overrides:
removeClassNamein classAbstractDwcControl- Returns:
- The control itself
-
setExpanse
-