Class SerializableTreeExpansionState

java.lang.Object
net.mcreator.ui.component.tree.SerializableTreeExpansionState

public class SerializableTreeExpansionState extends Object
  • Constructor Details

    • SerializableTreeExpansionState

      public SerializableTreeExpansionState()
    • SerializableTreeExpansionState

      public SerializableTreeExpansionState(List<String> expandedPaths)
  • Method Details

    • getExpandedPaths

      public List<String> getExpandedPaths()
    • setExpandedPaths

      public void setExpandedPaths(List<String> expandedPaths)
    • fromTree

      public static SerializableTreeExpansionState fromTree(JTree tree)
      Captures the expansion state of a JTree.
      Parameters:
      tree - the JTree to capture state from
      Returns:
      a SerializableTreeExpansionState representing the JTree's expansion state
    • applyToTree

      public void applyToTree(JTree tree)
      Restores the expansion state to a JTree.
      Parameters:
      tree - the JTree to apply the expansion state to