Package ghidra.framework.main.datatree

# Class DialogProjectTreeContext

java.lang.Object
docking.DefaultActionContext
docking.DialogActionContext
ghidra.framework.main.datatree.DialogProjectTreeContext

All Implemented Interfaces:
  `ActionContext`, `ProjectTreeContext`

public class DialogProjectTreeContext extends DialogActionContext implements ProjectTreeContext
Context specific to the DataTreeDialog. Note: this context is used from by the `ProjectDataTreePanel`. This class may or may not be in a dialog. For convenience, this class extends a dialog action context, but may not always be associated with a dialog.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DialogProjectTreeContext(ProjectData projectData, TreePath[] selectionPaths, List<DomainFolder> folderList, List<DomainFile> fileList, DataTree tree)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `GTreeNode`
  `getContextNode()`
  Returns the node that represents the context object for this context
  `int`
  `getFileCount()`
  Returns the number of files selected in the tree.
  `int`
  `getFolderCount()`
  Returns the number of folders selected in the tree.
  `List<DomainFile>`
  `getSelectedFiles()`
  Returns a list of `DomainFile`s selected in the tree.
  `List<DomainFolder>`
  `getSelectedFolders()`
  Returns a list of `DomainFolder`s selected in the tree.
  `TreePath[]`
  `getSelectionPaths()`
  Returns the list of selected `TreePath`s selected.
  `DataTree`
  `getTree()`
  Returns the project data tree component.
  `boolean`
  `hasExactlyOneFileOrFolder()`
  Returns true of only one file or folder has been selected, else false..
  `boolean`
  `hasOneOrMoreFilesAndFolders()`
  Returns true if one or more file and/or folders have been selected, else false..

  ### Methods inherited from class docking.DialogActionContext

  `getDialogComponentProvider, setDialogComponentProvider`

  ### Methods inherited from class docking.DefaultActionContext

  `getComponentProvider, getContextObject, getEventClickModifiers, getMouseEvent, getSourceComponent, getSourceObject, hasAnyEventClickModifiers, setContextObject, setEventClickModifiers, setMouseEvent, setSourceComponent, setSourceObject, toString`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### DialogProjectTreeContext

    public DialogProjectTreeContext(ProjectData projectData, TreePath[] selectionPaths, List<DomainFolder> folderList, List<DomainFile> fileList, DataTree tree)

- ## Method Details

  - ### getSelectionPaths

    public TreePath[] getSelectionPaths()
    Description copied from interface: `ProjectTreeContext`
    Returns the list of selected `TreePath`s selected.
    Specified by:
      `getSelectionPaths` in interface `ProjectTreeContext`
    Returns:
      the list of selected `TreePath`s selected.

  - ### getTree

    public DataTree getTree()
    Description copied from interface: `ProjectTreeContext`
    Returns the project data tree component.
    Specified by:
      `getTree` in interface `ProjectTreeContext`
    Returns:
      the project data tree component.

  - ### getSelectedFiles

    public List<DomainFile> getSelectedFiles()
    Description copied from interface: `ProjectTreeContext`
    Returns a list of `DomainFile`s selected in the tree.
    Specified by:
      `getSelectedFiles` in interface `ProjectTreeContext`
    Returns:
      a list of `DomainFile`s selected in the tree.

  - ### getSelectedFolders

    public List<DomainFolder> getSelectedFolders()
    Description copied from interface: `ProjectTreeContext`
    Returns a list of `DomainFolder`s selected in the tree.
    Specified by:
      `getSelectedFolders` in interface `ProjectTreeContext`
    Returns:
      a list of `DomainFolder`s selected in the tree.

  - ### getFolderCount

    public int getFolderCount()
    Description copied from interface: `ProjectTreeContext`
    Returns the number of folders selected in the tree.
    Specified by:
      `getFolderCount` in interface `ProjectTreeContext`
    Returns:
      the number of folders selected in the tree.

  - ### getFileCount

    public int getFileCount()
    Description copied from interface: `ProjectTreeContext`
    Returns the number of files selected in the tree.
    Specified by:
      `getFileCount` in interface `ProjectTreeContext`
    Returns:
      the number of files selected in the tree.

  - ### hasExactlyOneFileOrFolder

    public boolean hasExactlyOneFileOrFolder()
    Description copied from interface: `ProjectTreeContext`
    Returns true of only one file or folder has been selected, else false..
    Specified by:
      `hasExactlyOneFileOrFolder` in interface `ProjectTreeContext`
    Returns:
      true of only one file or folder has been selected, else false.

  - ### hasOneOrMoreFilesAndFolders

    public boolean hasOneOrMoreFilesAndFolders()
    Description copied from interface: `ProjectTreeContext`
    Returns true if one or more file and/or folders have been selected, else false..
    Specified by:
      `hasOneOrMoreFilesAndFolders` in interface `ProjectTreeContext`
    Returns:
      true if one or more file and/or folders have been selected, else false.

  - ### getContextNode

    public GTreeNode getContextNode()
    Description copied from interface: `ProjectTreeContext`
    Returns the node that represents the context object for this context
    Specified by:
      `getContextNode` in interface `ProjectTreeContext`
    Returns:
      the node