Package com._1c.g5.v8.dt.ui.dialog
Class CheckableTreeItem
- java.lang.Object
- 
- com._1c.g5.v8.dt.ui.dialog.CheckableTreeItem
 
- 
 public class CheckableTreeItem extends Object Class for representing tree item, that supports checkable state. Each tree item (or node) of a tree can be checkable or not. Since CheckboxTreeViewer does not support to hide checkboxes on some items, this additional tree structure has been created.- See Also:
- CheckableTreeViewer
 
- 
- 
Constructor SummaryConstructors Constructor Description CheckableTreeItem(boolean checkable)Initializes new checkable tree item instance, using checkable input parameter.CheckableTreeItem(boolean checkable, boolean allowChildMultiSelect)Initializes new checkable tree item instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(CheckableTreeItem childItem)Adds new child to current tree itembooleanallowChildMultiSelection()Determines whether multiple child elements can be selected.List<CheckableTreeItem>getChildren()CheckableTreeItemgetParent()ObjectgetValue()booleanhasChildren()Checks whether current object has childrenbooleanisCheckable()booleanisChecked()Returns current state of the elementvoidsetChecked(boolean isChecked)Changes checked state of current elementvoidsetOppositeCheckedState()Changes checked state of current elementvoidsetParent(CheckableTreeItem parent)Sets parent of current object, can be nullvoidsetValue(Object value)
 
- 
- 
- 
Constructor Detail- 
CheckableTreeItempublic CheckableTreeItem(boolean checkable) Initializes new checkable tree item instance, using checkable input parameter. Also allows child multi selection.- Parameters:
- checkable- - determines, whether current item can be checked or not.
 
 - 
CheckableTreeItempublic CheckableTreeItem(boolean checkable, boolean allowChildMultiSelect)Initializes new checkable tree item instance.- Parameters:
- checkable- - determines, whether current item can be checked or not.
- allowChildMultiSelect- - determines, whether it is allowed to select multiple items from children of current item
 
 
- 
 - 
Method Detail- 
getParentpublic CheckableTreeItem getParent() - Returns:
- the parent of current object, can be null
 
 - 
setParentpublic void setParent(CheckableTreeItem parent) Sets parent of current object, can be null- Parameters:
- parent- - the parent to set
 
 - 
getChildrenpublic List<CheckableTreeItem> getChildren() - Returns:
- children of current object
 
 - 
addChildpublic void addChild(CheckableTreeItem childItem) Adds new child to current tree item- Parameters:
- childItem-
 
 - 
getValuepublic Object getValue() - Returns:
- model object
 
 - 
setValuepublic void setValue(Object value) - Parameters:
- value- - model object to set
 
 - 
hasChildrenpublic boolean hasChildren() Checks whether current object has children- Returns:
- true if current object has children, false otherwise
 
 - 
isCheckedpublic boolean isChecked() Returns current state of the element- Returns:
- true if item is checked, false otherwise
 
 - 
setCheckedpublic void setChecked(boolean isChecked) Changes checked state of current element- Parameters:
- true- if item is checked, false otherwise
 
 - 
setOppositeCheckedStatepublic void setOppositeCheckedState() Changes checked state of current element- Parameters:
- true- if item is checked, false otherwise
 
 - 
isCheckablepublic boolean isCheckable() - Returns:
- true if current item can be checkable, false otherwise
 
 - 
allowChildMultiSelectionpublic boolean allowChildMultiSelection() Determines whether multiple child elements can be selected.- Returns:
- true if multiple child elements can be selected, false otherwise
 
 
- 
 
-