Class TreeHelper


  • public class TreeHelper
    extends java.lang.Object
    To help constructing the tree structure.
    Author:
    Andreas, Ulrich Küster
    • Constructor Summary

      Constructors 
      Constructor Description
      TreeHelper()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Comparator<? super Unit> buildComparator​(java.util.Comparator<? super Unit> cmp, int[] treeStructure)  
      javax.swing.tree.TreeNode createRegionNode​(Region r, NodeWrapperFactory factory, java.util.Map<EntityID,​Alliance> activeAlliances, java.util.Map<ID,​javax.swing.tree.TreeNode> unitNodes, java.util.Map<ID,​javax.swing.tree.TreeNode> buildingNodes, java.util.Map<ID,​javax.swing.tree.TreeNode> shipNodes, java.util.Comparator<? super Unit> unitSorting, int[] treeStructure, GameData data, boolean sortUnderUnitParent)
      Creates the subtree for one region with units (sorted by faction or other criteria), ships, buildings, borders etc.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TreeHelper

        public TreeHelper()
    • Method Detail

      • createRegionNode

        public javax.swing.tree.TreeNode createRegionNode​(Region r,
                                                          NodeWrapperFactory factory,
                                                          java.util.Map<EntityID,​Alliance> activeAlliances,
                                                          java.util.Map<ID,​javax.swing.tree.TreeNode> unitNodes,
                                                          java.util.Map<ID,​javax.swing.tree.TreeNode> buildingNodes,
                                                          java.util.Map<ID,​javax.swing.tree.TreeNode> shipNodes,
                                                          java.util.Comparator<? super Unit> unitSorting,
                                                          int[] treeStructure,
                                                          GameData data,
                                                          boolean sortUnderUnitParent)
        Creates the subtree for one region with units (sorted by faction or other criteria), ships, buildings, borders etc.
      • buildComparator

        public static java.util.Comparator<? super Unit> buildComparator​(java.util.Comparator<? super Unit> cmp,
                                                                         int[] treeStructure)