Class NodeWrapperFactory

    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JTabbedPane

        javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListener
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected NodeWrapperDrawPolicy[] adapters  
      static int BORDER
      The index of the policy adapter for border nodes
      protected javax.swing.JMenu contextMenu  
      static int FACTION
      The index of the policy adapter for faction nodes
      static int GROUP
      The index of the policy adapter for group nodes
      protected boolean[] initialized  
      protected java.lang.String initString  
      static int ISLAND
      The index of the policy adapter for island nodes
      static int ITEM
      The index of the policy adapter for item nodes
      static int POTION
      The index of the policy adapter for potion nodes
      static int REGION
      The index of the policy adapter for region nodes
      protected java.util.Properties settings  
      static int SIMPLE
      The index of the policy adapter for simple nodes
      static int SKILL
      The index of the policy adapter for skill nodes
      protected TreeUpdate source  
      protected javax.swing.JTabbedPane tabs  
      protected java.lang.String title  
      static int UNIT
      The index of the policy adapter for unit nodes
      static int UNITCONTAINER
      The index of the policy adapter for unit container nodes
      • Fields inherited from class javax.swing.JTabbedPane

        changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • Fields inherited from interface javax.swing.SwingConstants

        BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
    • Constructor Summary

      Constructors 
      Constructor Description
      NodeWrapperFactory​(java.util.Properties settings)
      Creates new NodeWrapperFactory
      NodeWrapperFactory​(java.util.Properties settings, java.lang.String initString, java.lang.String title)
      Creates a new NodeWrapperFactory object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void contextDataChanged()
      DOCUMENT-ME
      BorderNodeWrapper createBorderNodeWrapper​(Border b)
      Create a node for a border (street, wall, etc.)
      FactionNodeWrapper createFactionNodeWrapper​(Faction f, Region r, java.util.Map<EntityID,​Alliance> alliances)
      Create a node for a faction.
      GroupNodeWrapper createGroupNodeWrapper​(Group group)
      Create a node for a group.
      IslandNodeWrapper createIslandNodeWrapper​(Island i)
      Create a node for an island.
      ItemNodeWrapper createItemNodeWrapper​(Item item)
      Create a node for an item without unit.
      ItemCategoryNodeWrapper createItemNodeWrapper​(ItemCategory category, int amount, java.lang.String catName)  
      ItemNodeWrapper createItemNodeWrapper​(Unit unit, Units.StatItem modItem)
      Create a node for an item.
      ItemNodeWrapper createItemNodeWrapper​(Unit unit, Units.StatItem item, long unmodifiedAmount)
      Create a node for an item.
      PotionNodeWrapper createPotionNodeWrapper​(Potion potion)
      Create a node for a potion.
      PotionNodeWrapper createPotionNodeWrapper​(Potion potion, java.lang.String name, java.lang.String postfix)
      Create a node for a potion with the given name and appendix to the name.
      PreferencesAdapter createPreferencesAdapter()
      Creates the component for the preferences.
      RegionNodeWrapper createRegionNodeWrapper​(Region r)
      Create a node for a region.
      RegionNodeWrapper createRegionNodeWrapper​(Region r, long amount)
      Create a node for a region including a number (of persons).
      UnitRelationNodeWrapper createRelationNodeWrapper​(Unit owner, UnitRelation rel, CellObject innerNode)
      Creates a wrapper node for a unit relation.
      UnitRelationNodeWrapper createRelationNodeWrapper​(Unit owner, UnitRelation rel, CellObject2 innerNode)
      Creates a wrapper node for a unit relation.
      SimpleNodeWrapper createSimpleNodeWrapper​(java.lang.Object obj, java.lang.String icons)
      Creates new SimpleNodeWrapper with one icon and generated text.
      SimpleNodeWrapper createSimpleNodeWrapper​(java.lang.Object obj, java.lang.String text, java.lang.String icon)
      Creates new SimpleNodeWrapper with one icon and given text.
      SimpleNodeWrapper createSimpleNodeWrapper​(java.lang.Object obj, java.lang.String text, java.util.Collection<java.lang.String> icons)
      Creates new SimpleNodeWrapper with several icons and given text.
      SimpleNodeWrapper createSimpleNodeWrapper​(java.lang.Object obj, java.util.Collection<java.lang.String> icons)
      Creates new SimpleNodeWrapper with multiple icons and generated text.
      SkillNodeWrapper createSkillNodeWrapper​(Unit unit, Skill skill, Skill modSkill)
      Create a node for a skill.
      DefaultNodeWrapper createSpellNodeWrapper​(CombatSpell spell)
      Create a node for a combat spell.
      DefaultNodeWrapper createSpellNodeWrapper​(Spell spell)
      Create a node for a spell.
      Units.StatItem createStatItem​(Item item)
      Create a StatItem matching an items type and amount
      UnitContainerNodeWrapper createUnitContainerNodeWrapper​(UnitContainer uc)
      Creates a wrapper node for a unit container.
      UnitContainerNodeWrapper createUnitContainerNodeWrapper​(UnitContainer uc, boolean showFreeLoad, boolean hasCommand)
      Creates a wrapper node for a unit container with extended options.
      UnitContainerNodeWrapper createUnitContainerNodeWrapper​(UnitContainer uc, boolean showFreeLoad, boolean hasCommand, java.lang.String prefix)
      Creates a wrapper node for a unit container with extended options.
      UnitContainerNodeWrapper createUnitContainerNodeWrapper​(UnitContainer uc, java.lang.String prefix)
      Creates a wrapper node for a unit container.
      UnitListNodeWrapper createUnitListNodeWrapper​(java.lang.String text, java.lang.String clipBoardValue, java.util.Collection<Unit> units, java.lang.String icon)  
      UnitNodeWrapper createUnitNodeWrapper​(Unit unit)
      Creates a wrapper node for a unit.
      UnitNodeWrapper createUnitNodeWrapper​(Unit unit, long num)
      Creates a wrapper node for a unit.
      UnitNodeWrapper createUnitNodeWrapper​(Unit unit, long num, int mod)
      Creates a wrapper node for a unit.
      UnitNodeWrapper createUnitNodeWrapper​(Unit unit, java.lang.String text)
      Creates a wrapper node for a unit.
      UnitNodeWrapper createUnitNodeWrapper​(Unit unit, java.lang.String prfx, long num, int mod)
      Creates a wrapper node for a unit.
      javax.swing.JMenu getContextMenu()
      Returns the menu that can change display properties of the nodes created by this factory.
      protected void init​(CellObject co, int policy)
      Initialize a CellObject by category index.
      void initItemNodeWrappers()
      Initializes preference adapter for item nodes
      void initRegionNodeWrappers()
      Initializes preference adapter for region nodes
      void initSimpleNodeWrappers()
      Initializes preference adapter for simple nodes
      void initSkillNodeWrappers()
      Initializes preference adapter for skill nodes
      protected void initUI()  
      void initUnitNodeWrappers()
      Initializes preference adapter for unit nodes
      void setSource​(TreeUpdate s)
      Set the object that should be notified on context changes.
      protected void updateContextMenu()
      Update the context menu, which governs certain display properties.
      • Methods inherited from class javax.swing.JTabbedPane

        add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • BORDER

        public static final int BORDER
        The index of the policy adapter for border nodes
        See Also:
        Constant Field Values
      • FACTION

        public static final int FACTION
        The index of the policy adapter for faction nodes
        See Also:
        Constant Field Values
      • ISLAND

        public static final int ISLAND
        The index of the policy adapter for island nodes
        See Also:
        Constant Field Values
      • REGION

        public static final int REGION
        The index of the policy adapter for region nodes
        See Also:
        Constant Field Values
      • UNITCONTAINER

        public static final int UNITCONTAINER
        The index of the policy adapter for unit container nodes
        See Also:
        Constant Field Values
      • UNIT

        public static final int UNIT
        The index of the policy adapter for unit nodes
        See Also:
        Constant Field Values
      • POTION

        public static final int POTION
        The index of the policy adapter for potion nodes
        See Also:
        Constant Field Values
      • ITEM

        public static final int ITEM
        The index of the policy adapter for item nodes
        See Also:
        Constant Field Values
      • SKILL

        public static final int SKILL
        The index of the policy adapter for skill nodes
        See Also:
        Constant Field Values
      • GROUP

        public static final int GROUP
        The index of the policy adapter for group nodes
        See Also:
        Constant Field Values
      • SIMPLE

        public static final int SIMPLE
        The index of the policy adapter for simple nodes
        See Also:
        Constant Field Values
      • settings

        protected java.util.Properties settings
      • initialized

        protected boolean[] initialized
      • tabs

        protected javax.swing.JTabbedPane tabs
      • initString

        protected java.lang.String initString
      • title

        protected java.lang.String title
      • contextMenu

        protected javax.swing.JMenu contextMenu
    • Constructor Detail

      • NodeWrapperFactory

        public NodeWrapperFactory​(java.util.Properties settings)
        Creates new NodeWrapperFactory
      • NodeWrapperFactory

        public NodeWrapperFactory​(java.util.Properties settings,
                                  java.lang.String initString,
                                  java.lang.String title)
        Creates a new NodeWrapperFactory object.
    • Method Detail

      • setSource

        public void setSource​(TreeUpdate s)
        Set the object that should be notified on context changes.
      • initUI

        protected void initUI()
      • updateContextMenu

        protected void updateContextMenu()
        Update the context menu, which governs certain display properties.
      • getContextMenu

        public javax.swing.JMenu getContextMenu()
        Returns the menu that can change display properties of the nodes created by this factory.
      • initRegionNodeWrappers

        public void initRegionNodeWrappers()
        Initializes preference adapter for region nodes
      • initItemNodeWrappers

        public void initItemNodeWrappers()
        Initializes preference adapter for item nodes
      • initUnitNodeWrappers

        public void initUnitNodeWrappers()
        Initializes preference adapter for unit nodes
      • initSkillNodeWrappers

        public void initSkillNodeWrappers()
        Initializes preference adapter for skill nodes
      • initSimpleNodeWrappers

        public void initSimpleNodeWrappers()
        Initializes preference adapter for simple nodes
      • init

        protected void init​(CellObject co,
                            int policy)
        Initialize a CellObject by category index. This makes sure that the CellObject type is registered with the preferences adapter and initializes the context menu.
        Parameters:
        co -
        policy -
      • createBorderNodeWrapper

        public BorderNodeWrapper createBorderNodeWrapper​(Border b)
        Create a node for a border (street, wall, etc.)
      • createIslandNodeWrapper

        public IslandNodeWrapper createIslandNodeWrapper​(Island i)
        Create a node for an island.
      • createRegionNodeWrapper

        public RegionNodeWrapper createRegionNodeWrapper​(Region r)
        Create a node for a region.
      • createRegionNodeWrapper

        public RegionNodeWrapper createRegionNodeWrapper​(Region r,
                                                         long amount)
        Create a node for a region including a number (of persons).
      • createUnitContainerNodeWrapper

        public UnitContainerNodeWrapper createUnitContainerNodeWrapper​(UnitContainer uc)
        Creates a wrapper node for a unit container.
        Parameters:
        uc -
        Returns:
        The NodeWrapper
      • createUnitContainerNodeWrapper

        public UnitContainerNodeWrapper createUnitContainerNodeWrapper​(UnitContainer uc,
                                                                       java.lang.String prefix)
        Creates a wrapper node for a unit container.
        Parameters:
        uc -
        Returns:
        The NodeWrapper
      • createUnitContainerNodeWrapper

        public UnitContainerNodeWrapper createUnitContainerNodeWrapper​(UnitContainer uc,
                                                                       boolean showFreeLoad,
                                                                       boolean hasCommand)
        Creates a wrapper node for a unit container with extended options.
        Parameters:
        uc -
        showFreeLoad - Specifies if the free load should be displayed
        hasCommand - If true, it is indicated the the unit has the command
        Returns:
        The NodeWrapper
      • createUnitContainerNodeWrapper

        public UnitContainerNodeWrapper createUnitContainerNodeWrapper​(UnitContainer uc,
                                                                       boolean showFreeLoad,
                                                                       boolean hasCommand,
                                                                       java.lang.String prefix)
        Creates a wrapper node for a unit container with extended options.
        Parameters:
        uc -
        showFreeLoad - Specifies if the free load should be displayed
        hasCommand - If true, it is indicated the the unit has the command
        Returns:
        The NodeWrapper
      • createUnitNodeWrapper

        public UnitNodeWrapper createUnitNodeWrapper​(Unit unit)
        Creates a wrapper node for a unit. The text will consist only of the unit's name and id
        Parameters:
        unit - The unit
        Returns:
        The created node wrapper.
      • createUnitNodeWrapper

        public UnitNodeWrapper createUnitNodeWrapper​(Unit unit,
                                                     long num)
        Creates a wrapper node for a unit. The text is generated from the unit's name and ID, and num without mod or prefix.
        Parameters:
        unit - The unit
        num - The number of persons
        Returns:
        The created node wrapper.
      • createUnitNodeWrapper

        public UnitNodeWrapper createUnitNodeWrapper​(Unit unit,
                                                     long num,
                                                     int mod)
        Creates a wrapper node for a unit. The text is generated from the unit's name and ID, and num and mod without prefix.
        Parameters:
        unit - The unit
        num - The number of persons
        mod - The modified number of persons.
        Returns:
        The created node wrapper.
      • createUnitNodeWrapper

        public UnitNodeWrapper createUnitNodeWrapper​(Unit unit,
                                                     java.lang.String prfx,
                                                     long num,
                                                     int mod)
        Creates a wrapper node for a unit. The text is generated from the prefix, the unit's name and ID, and num and mod.
        Parameters:
        unit - The unit
        prfx - A prefix which is displayed in front of the unit's name.
        num - The number of persons
        mod - The modified number of persons.
        Returns:
        The created node wrapper.
      • createUnitNodeWrapper

        public UnitNodeWrapper createUnitNodeWrapper​(Unit unit,
                                                     java.lang.String text)
        Creates a wrapper node for a unit. The text will not be generated but taken from the argument.
        Parameters:
        unit - The unit
        text - The node will use this text.
        Returns:
        The created node wrapper.
      • createUnitListNodeWrapper

        public UnitListNodeWrapper createUnitListNodeWrapper​(java.lang.String text,
                                                             java.lang.String clipBoardValue,
                                                             java.util.Collection<Unit> units,
                                                             java.lang.String icon)
      • createPotionNodeWrapper

        public PotionNodeWrapper createPotionNodeWrapper​(Potion potion)
        Create a node for a potion.
      • createPotionNodeWrapper

        public PotionNodeWrapper createPotionNodeWrapper​(Potion potion,
                                                         java.lang.String name,
                                                         java.lang.String postfix)
        Create a node for a potion with the given name and appendix to the name.
      • createSpellNodeWrapper

        public DefaultNodeWrapper createSpellNodeWrapper​(Spell spell)
        Create a node for a spell.
      • createItemNodeWrapper

        public ItemNodeWrapper createItemNodeWrapper​(Item item)
        Create a node for an item without unit.
      • createStatItem

        public Units.StatItem createStatItem​(Item item)
        Create a StatItem matching an items type and amount
      • createItemNodeWrapper

        public ItemNodeWrapper createItemNodeWrapper​(Unit unit,
                                                     Units.StatItem modItem)
        Create a node for an item. Unmodified amount is taken from a unit
      • createItemNodeWrapper

        public ItemNodeWrapper createItemNodeWrapper​(Unit unit,
                                                     Units.StatItem item,
                                                     long unmodifiedAmount)
        Create a node for an item. The unmodified amount is not taken from the unit but is given explicitly.
      • createItemNodeWrapper

        public ItemCategoryNodeWrapper createItemNodeWrapper​(ItemCategory category,
                                                             int amount,
                                                             java.lang.String catName)
        Parameters:
        category -
        amount -
        catName -
        Returns:
      • createGroupNodeWrapper

        public GroupNodeWrapper createGroupNodeWrapper​(Group group)
        Create a node for a group.
      • createSimpleNodeWrapper

        public SimpleNodeWrapper createSimpleNodeWrapper​(java.lang.Object obj,
                                                         java.lang.String text,
                                                         java.lang.String icon)
        Creates new SimpleNodeWrapper with one icon and given text.
        Parameters:
        obj -
        text -
        icon - may be null
      • createSimpleNodeWrapper

        public SimpleNodeWrapper createSimpleNodeWrapper​(java.lang.Object obj,
                                                         java.lang.String text,
                                                         java.util.Collection<java.lang.String> icons)
        Creates new SimpleNodeWrapper with several icons and given text.
        Parameters:
        obj -
        text -
        icons - may be null
      • createSimpleNodeWrapper

        public SimpleNodeWrapper createSimpleNodeWrapper​(java.lang.Object obj,
                                                         java.lang.String icons)
        Creates new SimpleNodeWrapper with one icon and generated text.
        Parameters:
        obj -
        icons - may be null
      • createSimpleNodeWrapper

        public SimpleNodeWrapper createSimpleNodeWrapper​(java.lang.Object obj,
                                                         java.util.Collection<java.lang.String> icons)
        Creates new SimpleNodeWrapper with multiple icons and generated text.
        Parameters:
        obj -
        icons - may be null