Package ghidra.framework.main.datatree
Class DomainFolderNode
- java.lang.Object
-
- docking.widgets.tree.AbstractGTreeNode
-
- docking.widgets.tree.GTreeLazyNode
-
- ghidra.framework.main.datatree.DomainFolderNode
-
- All Implemented Interfaces:
GTreeNode
,Cuttable
,java.lang.Comparable<GTreeNode>
,java.lang.Iterable<GTreeNode>
- Direct Known Subclasses:
DomainFolderRootNode
public class DomainFolderNode extends GTreeLazyNode implements Cuttable
Class to represent a node in the Data tree.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class docking.widgets.tree.AbstractGTreeNode
AbstractGTreeNode.AllPathsIterator
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(GTreeNode node)
void
dispose()
Disposes this node and all of its descendants.protected void
doAddNode(int index, GTreeNode child)
protected java.util.List<GTreeNode>
doGetActiveChildren()
protected int
doGetAllChildCount()
protected java.util.List<GTreeNode>
doGetAllChildren()
protected GTreeNode
doGetChild(int index)
protected int
doGetChildCount()
protected int
doGetIndexOfChild(GTreeNode node)
protected int
doGetIndexOfChild(GTreeNode node, java.util.List<GTreeNode> children)
Subclasses can override this method to perform faster lookups of a node; for example, if the subclass has a sorted list of children, then a binary search can be used.protected void
doResetActiveChildren()
Convenience method to clear any filtered items by restoring the active children of this node to be the complete set of children.protected void
doSetActiveChildren(java.util.List<GTreeNode> childList)
protected void
doSetChildren(java.util.List<GTreeNode> childList, boolean notify)
boolean
equals(java.lang.Object obj)
void
fireNodeChanged(GTreeNode parentNode, GTreeNode node)
Notifies the tree that a node has changed.void
fireNodeStructureChanged(GTreeNode node)
Notifies the tree that the node has different children.protected java.util.List<GTreeNode>
generateChildren()
DomainFileFilter
getDomainFileFilter()
DomainFolder
getDomainFolder()
Get the domain folder; returns null if this node represents a domain file.javax.swing.Icon
getIcon(boolean expanded)
Returns the Icon to be displayed for this node in the tree.java.lang.String
getName()
Returns the name of the node to be displayed in the treeGTreeNode
getParent()
Returns the parent of this node.java.lang.String
getToolTip()
Returns the string to be displayed as a tooltip when the user hovers the mouse on this node in the tree.int
hashCode()
protected boolean
isChildrenLoaded()
boolean
isChildrenLoadedOrInProgress()
boolean
isCut()
Returns whether this node is marked as deleted.boolean
isEditable()
Returns true if this node is allowed to be edited in the tree.boolean
isInProgress()
Returns true if this node is currently being modified.boolean
isLeaf()
Returns true if this node has no children.void
removeNode(GTreeNode node)
Remove the given node from this node.protected void
setInProgress()
void
setIsCut(boolean isCut)
Set this node to be deleted so that it can be rendered as such.protected void
swingSetChildren(java.util.List<GTreeNode> childList, boolean notify, boolean onlyIfInProgress)
java.lang.String
toString()
void
valueChanged(java.lang.Object newValue)
Notification method called when a cell editor completes editing to notify this node that its value has changed.-
Methods inherited from class docking.widgets.tree.GTreeLazyNode
addNode, getAllChildrenIfLoaded, loadChildren
-
Methods inherited from class docking.widgets.tree.AbstractGTreeNode
addNode, allPaths, clearFilter, filter, getAllChildCount, getAllChildren, getChild, getChild, getChildCount, getChildren, getFilter, getIndexInParent, getIndexOfChild, getLeafCount, getNodeCount, getRoot, getTree, getTreePath, isAncestor, isFilteredOut, iterator, removeAll, setChildren
-
-
-
-
Method Detail
-
getDomainFolder
public DomainFolder getDomainFolder()
Get the domain folder; returns null if this node represents a domain file.- Returns:
- DomainFolder
-
isLeaf
public boolean isLeaf()
Returns true if this node has no children.
-
setIsCut
public void setIsCut(boolean isCut)
Set this node to be deleted so that it can be rendered as such.
-
isCut
public boolean isCut()
Returns whether this node is marked as deleted.
-
getIcon
public javax.swing.Icon getIcon(boolean expanded)
Description copied from interface:GTreeNode
Returns the Icon to be displayed for this node in the tree.
-
getName
public java.lang.String getName()
Description copied from interface:GTreeNode
Returns the name of the node to be displayed in the tree
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractGTreeNode
-
getToolTip
public java.lang.String getToolTip()
Description copied from interface:GTreeNode
Returns the string to be displayed as a tooltip when the user hovers the mouse on this node in the tree.- Specified by:
getToolTip
in interfaceGTreeNode
- Returns:
- the tooltip to be displayed.
-
generateChildren
protected java.util.List<GTreeNode> generateChildren()
- Specified by:
generateChildren
in classGTreeLazyNode
-
isEditable
public boolean isEditable()
Description copied from interface:GTreeNode
Returns true if this node is allowed to be edited in the tree. You must override this method to allow a node to be edited. You must also overrideGTreeNode.valueChanged(Object)
to handle the result of the edit.- Specified by:
isEditable
in interfaceGTreeNode
- Overrides:
isEditable
in classAbstractGTreeNode
- Returns:
- true if this node is allowed to be edited in the tree.
- See Also:
GTreeNode.valueChanged(Object)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractGTreeNode
-
getDomainFileFilter
public DomainFileFilter getDomainFileFilter()
-
compareTo
public int compareTo(GTreeNode node)
- Specified by:
compareTo
in interfacejava.lang.Comparable<GTreeNode>
- Overrides:
compareTo
in classAbstractGTreeNode
-
valueChanged
public void valueChanged(java.lang.Object newValue)
Description copied from interface:GTreeNode
Notification method called when a cell editor completes editing to notify this node that its value has changed. If you override this method you must also overrideGTreeNode.isEditable()
.- Specified by:
valueChanged
in interfaceGTreeNode
- Overrides:
valueChanged
in classAbstractGTreeNode
- Parameters:
newValue
- the new value provided by the cell editor.- See Also:
GTreeNode.isEditable()
-
getParent
public GTreeNode getParent()
Description copied from interface:GTreeNode
Returns the parent of this node.
-
dispose
public void dispose()
Description copied from interface:GTreeNode
Disposes this node and all of its descendants.
-
isInProgress
public boolean isInProgress()
Description copied from interface:GTreeNode
Returns true if this node is currently being modified.- Specified by:
isInProgress
in interfaceGTreeNode
- Returns:
- true if this node is currently being modified.
-
setInProgress
protected void setInProgress()
-
isChildrenLoadedOrInProgress
public boolean isChildrenLoadedOrInProgress()
-
isChildrenLoaded
protected boolean isChildrenLoaded()
-
doGetChildCount
protected int doGetChildCount()
-
doGetAllChildCount
protected int doGetAllChildCount()
-
doGetAllChildren
protected java.util.List<GTreeNode> doGetAllChildren()
-
doGetActiveChildren
protected java.util.List<GTreeNode> doGetActiveChildren()
-
doGetChild
protected GTreeNode doGetChild(int index)
-
doGetIndexOfChild
protected int doGetIndexOfChild(GTreeNode node)
-
doGetIndexOfChild
protected int doGetIndexOfChild(GTreeNode node, java.util.List<GTreeNode> children)
Subclasses can override this method to perform faster lookups of a node; for example, if the subclass has a sorted list of children, then a binary search can be used.- Parameters:
node
- the node whose index we seekchildren
- the children who contain the given node (may be null)- Returns:
- the index of the given child in the given list
-
doAddNode
protected void doAddNode(int index, GTreeNode child)
-
removeNode
public void removeNode(GTreeNode node)
Description copied from interface:GTreeNode
Remove the given node from this node.- Specified by:
removeNode
in interfaceGTreeNode
- Parameters:
node
- the to be removed.
-
doSetChildren
protected void doSetChildren(java.util.List<GTreeNode> childList, boolean notify)
-
swingSetChildren
protected void swingSetChildren(java.util.List<GTreeNode> childList, boolean notify, boolean onlyIfInProgress)
-
doSetActiveChildren
protected void doSetActiveChildren(java.util.List<GTreeNode> childList)
-
doResetActiveChildren
protected void doResetActiveChildren()
Convenience method to clear any filtered items by restoring the active children of this node to be the complete set of children.
-
fireNodeChanged
public void fireNodeChanged(GTreeNode parentNode, GTreeNode node)
Description copied from interface:GTreeNode
Notifies the tree that a node has changed.- Specified by:
fireNodeChanged
in interfaceGTreeNode
- Parameters:
parentNode
- the node that contains the node that was changed.node
- the that changed.
-
fireNodeStructureChanged
public void fireNodeStructureChanged(GTreeNode node)
Description copied from interface:GTreeNode
Notifies the tree that the node has different children. This method- Specified by:
fireNodeStructureChanged
in interfaceGTreeNode
- Parameters:
node
- the node that has changed.
-
-