Package ghidra.framework.main.datatree
Class DomainFileNode
- java.lang.Object
-
- docking.widgets.tree.AbstractGTreeNode
-
- ghidra.framework.main.datatree.DomainFileNode
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class docking.widgets.tree.AbstractGTreeNode
AbstractGTreeNode.AllPathsIterator
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringtoolTipText
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(GTreeNode node)voiddispose()Disposes this node and all of its descendants.protected voiddoAddNode(int index, GTreeNode child)protected java.util.List<GTreeNode>doGetActiveChildren()protected intdoGetAllChildCount()protected java.util.List<GTreeNode>doGetAllChildren()protected GTreeNodedoGetChild(int index)protected intdoGetChildCount()protected intdoGetIndexOfChild(GTreeNode node)protected intdoGetIndexOfChild(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 voiddoResetActiveChildren()Convenience method to clear any filtered items by restoring the active children of this node to be the complete set of children.protected voiddoSetActiveChildren(java.util.List<GTreeNode> childList)protected voiddoSetChildren(java.util.List<GTreeNode> childList, boolean notify)booleanequals(java.lang.Object obj)voidfireNodeChanged(GTreeNode parentNode, GTreeNode node)Notifies the tree that a node has changed.voidfireNodeStructureChanged(GTreeNode node)Notifies the tree that the node has different children.DomainFilegetDomainFile()Get the domain file if this node represents a file object versus a folder; interface method for DomainDataTransfer.javax.swing.IcongetIcon(boolean expanded)Returns the Icon to be displayed for this node in the tree.java.lang.StringgetName()Returns the name of the node to be displayed in the treeGTreeNodegetParent()Returns the parent of this node.java.lang.StringgetToolTip()Returns the string to be displayed as a tooltip when the user hovers the mouse on this node in the tree.inthashCode()protected booleanisChildrenLoaded()booleanisChildrenLoadedOrInProgress()booleanisCut()Returns whether this node is marked as deleted.booleanisEditable()Returns true if this node is allowed to be edited in the tree.booleanisInProgress()Returns true if this node is currently being modified.booleanisLeaf()Returns true if this node has no children.voidremoveNode(GTreeNode node)Remove the given node from this node.protected voidsetInProgress()voidsetIsCut(boolean isCut)Set this node to be deleted so that it can be rendered as such.protected voidswingSetChildren(java.util.List<GTreeNode> childList, boolean notify, boolean onlyIfInProgress)java.lang.StringtoString()voidvalueChanged(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.AbstractGTreeNode
addNode, addNode, allPaths, clearFilter, filter, getAllChildCount, getAllChildren, getChild, getChild, getChildCount, getChildren, getFilter, getIndexInParent, getIndexOfChild, getLeafCount, getNodeCount, getRoot, getTree, getTreePath, isAncestor, isFilteredOut, iterator, loadChildren, removeAll, setChildren
-
-
-
-
Method Detail
-
getDomainFile
public DomainFile getDomainFile()
Get the domain file if this node represents a file object versus a folder; interface method for DomainDataTransfer.- Returns:
- null if this node represents a domain folder
-
isLeaf
public boolean isLeaf()
Returns true if this node has no children.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractGTreeNode
-
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.
-
isEditable
public boolean isEditable()
Description copied from interface:GTreeNodeReturns 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:
isEditablein interfaceGTreeNode- Overrides:
isEditablein classAbstractGTreeNode- Returns:
- true if this node is allowed to be edited in the tree.
- See Also:
GTreeNode.valueChanged(Object)
-
getIcon
public javax.swing.Icon getIcon(boolean expanded)
Description copied from interface:GTreeNodeReturns the Icon to be displayed for this node in the tree.
-
getName
public java.lang.String getName()
Description copied from interface:GTreeNodeReturns the name of the node to be displayed in the tree
-
getToolTip
public java.lang.String getToolTip()
Description copied from interface:GTreeNodeReturns the string to be displayed as a tooltip when the user hovers the mouse on this node in the tree.- Specified by:
getToolTipin interfaceGTreeNode- Returns:
- the tooltip to be displayed.
-
compareTo
public int compareTo(GTreeNode node)
- Specified by:
compareToin interfacejava.lang.Comparable<GTreeNode>- Overrides:
compareToin classAbstractGTreeNode
-
valueChanged
public void valueChanged(java.lang.Object newValue)
Description copied from interface:GTreeNodeNotification 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:
valueChangedin interfaceGTreeNode- Overrides:
valueChangedin classAbstractGTreeNode- Parameters:
newValue- the new value provided by the cell editor.- See Also:
GTreeNode.isEditable()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAbstractGTreeNode- See Also:
Object.toString()
-
getParent
public GTreeNode getParent()
Description copied from interface:GTreeNodeReturns the parent of this node.
-
dispose
public void dispose()
Description copied from interface:GTreeNodeDisposes this node and all of its descendants.
-
isInProgress
public boolean isInProgress()
Description copied from interface:GTreeNodeReturns true if this node is currently being modified.- Specified by:
isInProgressin 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:GTreeNodeRemove the given node from this node.- Specified by:
removeNodein 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:GTreeNodeNotifies the tree that a node has changed.- Specified by:
fireNodeChangedin 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:GTreeNodeNotifies the tree that the node has different children. This method- Specified by:
fireNodeStructureChangedin interfaceGTreeNode- Parameters:
node- the node that has changed.
-
-