Class TriStateCheckBoxTree.TriStateSelectionModel
java.lang.Object
javax.swing.tree.DefaultTreeSelectionModel
com.jidesoft.swing.CheckBoxTreeSelectionModel
com.inductiveautomation.ignition.client.util.gui.TriStateCheckBoxTree.TriStateSelectionModel
- All Implemented Interfaces:
Serializable, Cloneable, EventListener, TreeModelListener, TreeSelectionModel
- Enclosing class:
TriStateCheckBoxTree
public static class TriStateCheckBoxTree.TriStateSelectionModel
extends com.jidesoft.swing.CheckBoxTreeSelectionModel
A
CheckBoxTreeSelectionModel extended to support three checkbox states.
- CHECKED — path is in the selection model's selection set
- UNCHECKED — path is in neither set
- PARTIAL — path is tracked in
partialPaths;isPartiallySelected(TreePath)returnstrue
- See Also:
-
Field Summary
Fields inherited from class com.jidesoft.swing.CheckBoxTreeSelectionModel
_pathHasAddedFields inherited from class DefaultTreeSelectionModel
changeSupport, leadIndex, leadPath, leadRow, listenerList, listSelectionModel, rowMapper, selection, SELECTION_MODE_PROPERTY, selectionModeFields inherited from interface TreeSelectionModel
CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION, SINGLE_TREE_SELECTION -
Method Summary
Modifier and TypeMethodDescriptionvoidclearAll()Clears all checked and partial states.voidClears only the partial paths, leaving the selection (checked state) untouched.booleanisPartiallySelected(TreePath path) voidsetChecked(TreePath path) Markspathas CHECKED (selected, not partial).voidsetPartial(TreePath path) Markspathas PARTIAL (indeterminate).voidsetUnchecked(TreePath path) Markspathas UNCHECKED (not selected, not partial).Methods inherited from class com.jidesoft.swing.CheckBoxTreeSelectionModel
addSelectionPaths, addSelectionPaths, areSiblingsSelected, getChild, getChildrenCount, getModel, isDigIn, isParentActuallySelected, isPathSelected, isPathSelected, isRowSelected, isSingleEventMode, notifyPathChange, notifyPathChange, removeSelectionPaths, removeSelectionPaths, setBatchMode, setDigIn, setModel, setSelectionPaths, setSingleEventMode, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChangedMethods inherited from class DefaultTreeSelectionModel
addPropertyChangeListener, addSelectionPath, addTreeSelectionListener, arePathsContiguous, canPathsBeAdded, canPathsBeRemoved, clearSelection, clone, fireValueChanged, getLeadSelectionPath, getLeadSelectionRow, getListeners, getMaxSelectionRow, getMinSelectionRow, getPropertyChangeListeners, getRowMapper, getSelectionCount, getSelectionMode, getSelectionPath, getSelectionPaths, getSelectionRows, getTreeSelectionListeners, insureRowContinuity, insureUniqueness, isSelectionEmpty, removePropertyChangeListener, removeSelectionPath, removeTreeSelectionListener, resetRowSelection, setRowMapper, setSelectionMode, setSelectionPath, toString, updateLeadIndex
-
Method Details
-
isPartiallySelected
- Overrides:
isPartiallySelectedin classcom.jidesoft.swing.CheckBoxTreeSelectionModel
-
setChecked
Markspathas CHECKED (selected, not partial). -
setPartial
Markspathas PARTIAL (indeterminate).Do NOT call
removeSelectionPathhere — that fires JIDE selection events which interfere with partial rendering. CallclearAll()before bulk state changes, then calltree.repaint()once afterward. -
setUnchecked
Markspathas UNCHECKED (not selected, not partial). -
clearPartialPaths
public void clearPartialPaths()Clears only the partial paths, leaving the selection (checked state) untouched. -
clearAll
public void clearAll()Clears all checked and partial states.
-