Package ghidra.framework.main.datatree

# Class DomainFolderNode

java.lang.Object
docking.widgets.tree.GTreeNode
docking.widgets.tree.GTreeLazyNode
docking.widgets.tree.GTreeSlowLoadingNode
ghidra.framework.main.datatree.DataTreeNode
ghidra.framework.main.datatree.DomainFolderNode

All Implemented Interfaces:
  `Cuttable`, `Cloneable`, `Comparable<GTreeNode>`

Direct Known Subclasses:
  `DomainFolderRootNode`

public class DomainFolderNode extends DataTreeNode
Class to represent a node in the Data tree.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected final List<GTreeNode>`
  `children()`
  `GTreeNode`
  `clone()`
  Creates a clone of this node.
  `int`
  `compareTo(GTreeNode node)`
  `void`
  `dispose()`
  `protected void`
  `doAddNode(int index, GTreeNode node)`
  Adds a node to this node's children at the given index and notifies the tree.
  `protected void`
  `doAddNode(GTreeNode node)`
  Adds a node to this node's children.
  `protected void`
  `doAddNodes(List<GTreeNode> nodes)`
  Adds the given nodes to this node's children.
  `protected void`
  `doFireNodeAdded(GTreeNode newNode)`
  `protected void`
  `doFireNodeChanged()`
  `protected void`
  `doFireNodeRemoved(GTreeNode removedNode, int index)`
  `protected void`
  `doFireNodeStructureChanged()`
  `protected void`
  `doRemoveNode(GTreeNode node)`
  Removes the node from this node's children and notifies the tree.
  `protected void`
  `doSetChildren(List<GTreeNode> childList)`
  Sets the children of this node to the given list of child nodes, but does not notify the tree.
  `protected void`
  `doSetChildrenAndFireEvent(List<GTreeNode> childList)`
  Sets the children of this node to the given list of child nodes and fires the appropriate tree event to kick the tree to update the display.
  `boolean`
  `equals(Object obj)`
  `List<GTreeNode>`
  `generateChildren(TaskMonitor monitor)`
  Subclass must implement this method to generate their children.
  `GTreeNode`
  `getChild(String name, ghidra.framework.main.datatree.DataTreeNode.NodeType type)`
  Find a child using a binary-search approach.
  `DomainFileFilter`
  `getDomainFileFilter()`
  `DomainFolder`
  `getDomainFolder()`
  Get the domain folder; returns null if this node represents a domain file.
  `Icon`
  `getIcon(boolean expanded)`
  Returns the Icon to be displayed for this node in the tree
  `String`
  `getName()`
  Returns the name of the node.
  `final GTreeNode`
  `getParent()`
  Returns the parent of this node.
  `String`
  `getPathname()`
  Returns domain folder/file pathname within project.
  `ProjectData`
  `getProjectData()`
  Get the project data instance to which this file or folder belongs.
  `String`
  `getToolTip()`
  Returns the string to be displayed as a tooltip when the user hovers the mouse on this node in the tree
  `GTree`
  `getTree()`
  Returns the GTree that this node is attached to
  `int`
  `hashCode()`
  `boolean`
  `isAutoExpandPermitted()`
  Determine if this node may be auto-expanded.
  `boolean`
  `isEditable()`
  Returns true if this node is allowed to be edited in the tree.
  `final boolean`
  `isInProgress()`
  Returns true if the node is in the process of loading its children.
  `boolean`
  `isLeaf()`
  Returns true if this node has no children.
  `boolean`
  `isLoaded()`
  True if the children for this node have been loaded yet.
  `final boolean`
  `isRoot()`
  Returns true if this is a root node of a GTree
  `String`
  `toString()`
  `void`
  `valueChanged(Object newValue)`
  Notification method called when a cell editor completes editing to notify this node that its value has changed.

  ### Methods inherited from class ghidra.framework.main.datatree.DataTreeNode

  `addNode, isCut, removeNode, setIsCut`

  ### Methods inherited from class docking.widgets.tree.GTreeSlowLoadingNode

  `generateChildren, iterator, loadAll`

  ### Methods inherited from class docking.widgets.tree.GTreeLazyNode

  `addNode, addNodes, removeAll, unloadChildren`

  ### Methods inherited from class docking.widgets.tree.GTreeNode

  `collapse, expand, filter, fireNodeChanged, fireNodeStructureChanged, getChild, getChild, getChild, getChildCount, getChildren, getChildren, getDisplayText, getIndexInParent, getIndexOfChild, getLeafCount, getNodeCount, getRoot, getTreePath, isAncestor, isExpanded, setChildren, stream`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### isAutoExpandPermitted

    public boolean isAutoExpandPermitted()
    Description copied from class: `GTreeNode`
    Determine if this node may be auto-expanded. Some special node cases may need to prevent or limit auto-expansion due to tree depth or other special conditions.
    Overrides:
      `isAutoExpandPermitted` in class `GTreeNode`
    Returns:
      true if this node allows auto-expansion, else false.

  - ### getDomainFolder

    public DomainFolder getDomainFolder()
    Get the domain folder; returns null if this node represents a domain file.
    Returns:
      DomainFolder

  - ### getPathname

    public String getPathname()
    Description copied from class: `DataTreeNode`
    Returns domain folder/file pathname within project.
    Specified by:
      `getPathname` in class `DataTreeNode`
    Returns:
      domain folder/file pathname within project

  - ### isLeaf

    public boolean isLeaf()
    Returns true if this node has no children.
    Specified by:
      `isLeaf` in class `GTreeNode`
    Returns:
      true if this node is a leaf

  - ### getIcon

    public Icon getIcon(boolean expanded)
    Description copied from class: `GTreeNode`
    Returns the Icon to be displayed for this node in the tree
    Specified by:
      `getIcon` in class `GTreeNode`
    Parameters:
      `expanded` - true if the node is expanded
    Returns:
      the icon to be displayed for this node in the tree

  - ### getName

    public String getName()
    Description copied from class: `GTreeNode`
    Returns the name of the node. If `GTreeNode.getDisplayText()` is not overridden, then this is also the text that will be displayed in the tree for that node. In general, the name of a node should not change. If the text displayed in the tree changes over time, override `GTreeNode.getDisplayText()`.
    Specified by:
      `getName` in class `GTreeNode`
    Returns:
      the name of the node

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `GTreeNode`

  - ### getToolTip

    public String getToolTip()
    Description copied from class: `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 class `GTreeNode`
    Returns:
      the tooltip to be displayed

  - ### generateChildren

    public List<GTreeNode> generateChildren(TaskMonitor monitor) throws CancelledException
    Description copied from class: `GTreeSlowLoadingNode`
    Subclass must implement this method to generate their children. This operation will always be performed in a background thread (i.e. Not the swing thread)
    Specified by:
      `generateChildren` in class `GTreeSlowLoadingNode`
    Parameters:
      `monitor` - a TaskMonitor for reporting progress and cancel notification.
    Returns:
      the list of children for this node.
    Throws:
      `CancelledException` - if the monitor is cancelled

  - ### isEditable

    public boolean isEditable()
    Description copied from class: `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 override `GTreeNode.valueChanged(Object)` to handle the result of the edit.
    Overrides:
      `isEditable` in class `GTreeNode`
    Returns:
      true if this node is allowed to be edited in the tree
    See Also:
      - `GTreeNode.valueChanged(Object)`

  - ### equals

    public boolean equals(Object obj)
    Specified by:
      `equals` in class `DataTreeNode`

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in class `DataTreeNode`

  - ### getDomainFileFilter

    public DomainFileFilter getDomainFileFilter()

  - ### compareTo

    public int compareTo(GTreeNode node)
    Specified by:
      `compareTo` in interface `Comparable<GTreeNode>`
    Specified by:
      `compareTo` in class `DataTreeNode`

  - ### valueChanged

    public void valueChanged(Object newValue)
    Description copied from class: `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 override `GTreeNode.isEditable()`.
    Overrides:
      `valueChanged` in class `GTreeNode`
    Parameters:
      `newValue` - the new value provided by the cell editor
    See Also:
      - `GTreeNode.isEditable()`

  - ### getChild

    public GTreeNode getChild(String name, ghidra.framework.main.datatree.DataTreeNode.NodeType type)
    Description copied from class: `DataTreeNode`
    Find a child using a binary-search approach.
    Specified by:
      `getChild` in class `DataTreeNode`
    Parameters:
      `name` - name of child to find
      `type` - node type
    Returns:
      matching tree node or null if not found

  - ### getProjectData

    public ProjectData getProjectData()
    Description copied from class: `DataTreeNode`
    Get the project data instance to which this file or folder belongs.
    Specified by:
      `getProjectData` in class `DataTreeNode`
    Returns:
      project data instance

  - ### getParent

    public final GTreeNode getParent()
    Returns the parent of this node. Note: this method is deliberately not synchronized (See comments above)
    Returns:
      the parent of this node.

  - ### isRoot

    public final boolean isRoot()
    Returns true if this is a root node of a GTree
    Returns:
      true if this is a root node of a GTree

  - ### children

    protected final List<GTreeNode> children()

  - ### doSetChildrenAndFireEvent

    protected void doSetChildrenAndFireEvent(List<GTreeNode> childList)
    Sets the children of this node to the given list of child nodes and fires the appropriate tree event to kick the tree to update the display. Note: This method must be called from the swing thread because it will notify the underlying JTree.
    Parameters:
      `childList` - the list of child nodes to assign as children to this node
    See Also:
      - `if calling from a background thread.`

  - ### doSetChildren

    protected void doSetChildren(List<GTreeNode> childList)
    Sets the children of this node to the given list of child nodes, but does not notify the tree. This method does not have to be called from the swing thread. It is intended to be used by background threads that want to populate all or part of the tree, but wait until the bulk operations are completed before notifying the tree.
    Parameters:
      `childList` - the list of child nodes to assign as children to this node

  - ### doAddNode

    protected void doAddNode(GTreeNode node)
    Adds a node to this node's children. Must be called from the swing thread.
    Parameters:
      `node` - the node to add as a child to this node

  - ### doAddNode

    protected void doAddNode(int index, GTreeNode node)
    Adds a node to this node's children at the given index and notifies the tree. Must be called from the swing thread.
    Parameters:
      `index` - the index at which to add the new node
      `node` - the node to add as a child to this node

  - ### doRemoveNode

    protected void doRemoveNode(GTreeNode node)
    Removes the node from this node's children and notifies the tree. Must be called from the swing thread.
    Parameters:
      `node` - the node to remove

  - ### doAddNodes

    protected void doAddNodes(List<GTreeNode> nodes)
    Adds the given nodes to this node's children. Must be called from the swing thread.
    Parameters:
      `nodes` - the nodes to add to the children this node

  - ### clone

    public GTreeNode clone() throws CloneNotSupportedException
    Creates a clone of this node. The clone should contain a shallow copy of all the node's attributes except that the parent and children are null.
    Overrides:
      `clone` in class `Object`
    Returns:
      the clone of this object.
    Throws:
      `CloneNotSupportedException` - if some implementation prevents itself from being cloned.

  - ### dispose

    public void dispose()

  - ### isInProgress

    public final boolean isInProgress()
    Returns true if the node is in the process of loading its children. See `GTreeSlowLoadingNode`
    Returns:
      true if the node is in the process of loading its children.

  - ### isLoaded

    public boolean isLoaded()
    True if the children for this node have been loaded yet. Some GTree nodes are lazy in that they don't load their children until needed. Nodes that have the IN_PROGRESS node as it child is considered loaded if in the swing thread, otherwise they are considered not loaded.
    Returns:
      true if the children for this node have been loaded.

  - ### getTree

    public GTree getTree()
    Returns the GTree that this node is attached to
    Returns:
      the GTree that this node is attached to

  - ### doFireNodeAdded

    protected void doFireNodeAdded(GTreeNode newNode)

  - ### doFireNodeRemoved

    protected void doFireNodeRemoved(GTreeNode removedNode, int index)

  - ### doFireNodeStructureChanged

    protected void doFireNodeStructureChanged()

  - ### doFireNodeChanged

    protected void doFireNodeChanged()