Class ArmyStatsPanel

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean addArmoured​(Unit unit, int amount, int skill, ArmyStatsPanel.Army army, int line, ItemType weapon, ItemType armour, java.util.Collection<Item> armourCol, boolean shield, boolean hasSkill)  
      protected void addArmy​(javax.swing.tree.DefaultMutableTreeNode root, ArmyStatsPanel.Army army)  
      protected javax.swing.tree.DefaultMutableTreeNode addIslandArmies​(javax.swing.tree.DefaultMutableTreeNode root, ArmyStatsPanel.IslandArmies armies)  
      protected void addList​(javax.swing.tree.DefaultMutableTreeNode root, java.util.Collection<ArmyStatsPanel.Armies> list, boolean mode)  
      protected void addPartUnit​(Unit full, int persons, int skill, ArmyStatsPanel.Army army, int line, ItemType weapon, ItemType armour, ItemType shield, boolean cat)  
      protected void addPartUnit​(Unit full, int persons, int skill, ArmyStatsPanel.Army army, int line, ItemType weapon, ItemType armour, ItemType shield, boolean hasSkill, boolean cat)  
      protected javax.swing.tree.DefaultMutableTreeNode addRegionArmies​(javax.swing.tree.DefaultMutableTreeNode root, ArmyStatsPanel.RegionArmies armies)  
      protected void addUnit​(Unit unit, int persons, int unarmed, ArmyStatsPanel.Army army, int line)  
      protected void addUnits​(javax.swing.tree.DefaultMutableTreeNode root, java.util.Collection<Unit> units)  
      protected javax.swing.tree.DefaultMutableTreeNode addWholeArmy​(javax.swing.tree.DefaultMutableTreeNode root, ArmyStatsPanel.WholeArmy army)  
      protected void createArmies​(GameData data)  
      protected void createArmies​(GameData data, java.util.Collection<Region> regions)  
      protected void createArmies​(GameData data, java.util.Collection<Region> regions, boolean cat)  
      protected javax.swing.tree.DefaultMutableTreeNode createNodeWrapper​(ArmyStatsPanel.PartUnit partUnit)  
      protected java.util.Collection<ArmyStatsPanel.Army> createRegionArmies​(Region r, boolean cat)  
      protected void createRuleBase​(GameData data)  
      protected void createTrees()  
      void doUpdate()
      DOCUMENT-ME
      protected void fireArmySelection​(ArmyStatsPanel.Army a)  
      protected void fireWareLineSelection​(ArmyStatsPanel.WarLine w)  
      protected void fireWeaponGroupSelection​(ArmyStatsPanel.WeaponGroup w)  
      void gameDataChanged​(GameDataEvent e)
      Invoked when the current game data object becomes invalid.
      protected java.util.Collection<Item> getArmour​(Unit unit, java.util.Collection<Item> col)  
      protected java.lang.String getArmyIcon​(Faction fac)  
      protected Skill getHighestSkill​(Unit unit, java.util.Collection<Skill> col)  
      protected java.util.Collection<java.lang.String> getIconObject​(ArmyStatsPanel.PartUnit unit)  
      protected java.util.Collection<Item> getNonSkillWeapons​(Unit unit, java.util.Collection<Skill> used, java.util.Collection<Item> col)  
      protected java.util.Map<Skill,​java.util.Collection<Item>> getSkillsWithWeapons​(Unit unit, java.util.Collection<Skill> skills, java.util.Map<Skill,​java.util.Collection<Item>> map)  
      protected ArmyStatsPanel.WarLine getWarLine​(ArmyStatsPanel.Army army, int line, boolean cat)  
      protected java.util.Set<Unit> getWarLineUnits​(ArmyStatsPanel.WarLine w, java.util.Set<Unit> set)  
      protected ArmyStatsPanel.WeaponGroup getWeaponGroup​(ArmyStatsPanel.WarLine wl, ItemType weapon)  
      protected java.util.Set<Unit> getWeaponGroupUnits​(ArmyStatsPanel.WeaponGroup g, java.util.Set<Unit> set)  
      protected java.util.Collection<Item> getWeaponsForSkill​(Unit unit, Skill skill, java.util.Collection<Item> col)  
      protected java.util.Collection<Skill> getWeaponSkills​(Unit unit, java.util.Collection<Skill> col)  
      protected int guessCombatState​(java.util.Collection<Item> weapons)  
      protected void initTrees​(EventDispatcher ed)  
      void quit()
      DOCUMENT-ME
      void recreate​(GameData data)
      DOCUMENT-ME
      void selectionChanged​(SelectionEvent e)
      Invoked when different objects are activated or selected.
      void setCategorized​(boolean b)  
      void setExcludeCombatStates​(java.util.List<java.lang.Integer> l)
      DOCUMENT-ME
      void setExcludeNames​(java.util.List<java.lang.String> l)
      DOCUMENT-ME
      void setExcludeSkills​(java.util.List<SkillType> l)
      DOCUMENT-ME
      protected void updateData​(GameData data, java.util.Collection<Region> regions)  
      void valueChanged​(javax.swing.event.TreeSelectionEvent treeSelectionEvent)
      DOCUMENT-ME
      • Methods inherited from class javax.swing.JPanel

        getAccessibleContext, getUI, getUIClassID, paramString, 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, 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

        add, add, add, add, add, 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, remove, remove, removeAll, 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

      • treeRoot

        protected javax.swing.tree.DefaultMutableTreeNode treeRoot
      • tree2Root

        protected javax.swing.tree.DefaultMutableTreeNode tree2Root
      • content

        protected javax.swing.JSplitPane content
      • dividerPos

        protected int dividerPos
      • weapons

        protected java.util.Map<Skill,​java.util.List<ItemType>> weapons
      • categorize

        protected boolean categorize
      • excludeSkills

        protected java.util.List<SkillType> excludeSkills
      • excludeNames

        protected java.util.List<java.lang.String> excludeNames
      • excludeCombatStates

        protected java.util.List<java.lang.Integer> excludeCombatStates
      • lastSelected

        protected java.util.Collection<Region> lastSelected
    • Constructor Detail

      • ArmyStatsPanel

        public ArmyStatsPanel​(EventDispatcher ed,
                              GameData data,
                              java.util.Properties settings,
                              boolean doCategorize)
        Creates new ArmyStatsPanel
      • ArmyStatsPanel

        public ArmyStatsPanel​(EventDispatcher ed,
                              GameData data,
                              java.util.Properties settings,
                              boolean doCategorize,
                              java.util.Collection<Region> selRegions)
        Creates a new ArmyStatsPanel object.
    • Method Detail

      • setCategorized

        public void setCategorized​(boolean b)
      • setExcludeSkills

        public void setExcludeSkills​(java.util.List<SkillType> l)
        DOCUMENT-ME
      • setExcludeNames

        public void setExcludeNames​(java.util.List<java.lang.String> l)
        DOCUMENT-ME
      • setExcludeCombatStates

        public void setExcludeCombatStates​(java.util.List<java.lang.Integer> l)
        DOCUMENT-ME
      • updateData

        protected void updateData​(GameData data,
                                  java.util.Collection<Region> regions)
      • doUpdate

        public void doUpdate()
        DOCUMENT-ME
      • recreate

        public void recreate​(GameData data)
        DOCUMENT-ME
      • createTrees

        protected void createTrees()
      • addList

        protected void addList​(javax.swing.tree.DefaultMutableTreeNode root,
                               java.util.Collection<ArmyStatsPanel.Armies> list,
                               boolean mode)
      • addIslandArmies

        protected javax.swing.tree.DefaultMutableTreeNode addIslandArmies​(javax.swing.tree.DefaultMutableTreeNode root,
                                                                          ArmyStatsPanel.IslandArmies armies)
      • addRegionArmies

        protected javax.swing.tree.DefaultMutableTreeNode addRegionArmies​(javax.swing.tree.DefaultMutableTreeNode root,
                                                                          ArmyStatsPanel.RegionArmies armies)
      • getArmyIcon

        protected java.lang.String getArmyIcon​(Faction fac)
      • addWholeArmy

        protected javax.swing.tree.DefaultMutableTreeNode addWholeArmy​(javax.swing.tree.DefaultMutableTreeNode root,
                                                                       ArmyStatsPanel.WholeArmy army)
      • addArmy

        protected void addArmy​(javax.swing.tree.DefaultMutableTreeNode root,
                               ArmyStatsPanel.Army army)
      • addUnits

        protected void addUnits​(javax.swing.tree.DefaultMutableTreeNode root,
                                java.util.Collection<Unit> units)
      • createNodeWrapper

        protected javax.swing.tree.DefaultMutableTreeNode createNodeWrapper​(ArmyStatsPanel.PartUnit partUnit)
      • createArmies

        protected void createArmies​(GameData data)
      • createArmies

        protected void createArmies​(GameData data,
                                    java.util.Collection<Region> regions)
      • createArmies

        protected void createArmies​(GameData data,
                                    java.util.Collection<Region> regions,
                                    boolean cat)
      • createRuleBase

        protected void createRuleBase​(GameData data)
      • guessCombatState

        protected int guessCombatState​(java.util.Collection<Item> weapons)
      • addArmoured

        protected boolean addArmoured​(Unit unit,
                                      int amount,
                                      int skill,
                                      ArmyStatsPanel.Army army,
                                      int line,
                                      ItemType weapon,
                                      ItemType armour,
                                      java.util.Collection<Item> armourCol,
                                      boolean shield,
                                      boolean hasSkill)
      • addUnit

        protected void addUnit​(Unit unit,
                               int persons,
                               int unarmed,
                               ArmyStatsPanel.Army army,
                               int line)
      • getNonSkillWeapons

        protected java.util.Collection<Item> getNonSkillWeapons​(Unit unit,
                                                                java.util.Collection<Skill> used,
                                                                java.util.Collection<Item> col)
      • getArmour

        protected java.util.Collection<Item> getArmour​(Unit unit,
                                                       java.util.Collection<Item> col)
      • getWeaponSkills

        protected java.util.Collection<Skill> getWeaponSkills​(Unit unit,
                                                              java.util.Collection<Skill> col)
      • getWeaponsForSkill

        protected java.util.Collection<Item> getWeaponsForSkill​(Unit unit,
                                                                Skill skill,
                                                                java.util.Collection<Item> col)
      • getSkillsWithWeapons

        protected java.util.Map<Skill,​java.util.Collection<Item>> getSkillsWithWeapons​(Unit unit,
                                                                                             java.util.Collection<Skill> skills,
                                                                                             java.util.Map<Skill,​java.util.Collection<Item>> map)
      • getHighestSkill

        protected Skill getHighestSkill​(Unit unit,
                                        java.util.Collection<Skill> col)
      • valueChanged

        public void valueChanged​(javax.swing.event.TreeSelectionEvent treeSelectionEvent)
        DOCUMENT-ME
        Specified by:
        valueChanged in interface javax.swing.event.TreeSelectionListener