Class TaskTablePanel

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      class  TaskTablePanel.TTShortcutListener  
      protected static class  TaskTablePanel.UpdateEvent
      Holds information about a necessary update on the task panel.
      protected class  TaskTablePanel.UpdateEventDispatcher
      This class registers and handles events in a separate thread.
      • Nested classes/interfaces inherited from class javax.swing.JPanel

        javax.swing.JPanel.AccessibleJPanel
      • 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
      static java.lang.String IDENTIFIER
      Deprecated.
      • 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
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void acknowledge​(int[] selectedRows)  
      void addInspector​(Inspector inspector)
      Adds a new inspector to the list of insprectors
      void addInspectorInterceptor​(InspectorInterceptor interceptor)
      Adds a new inspector interceptor to the list of inspectors
      protected void addProblems​(java.util.List<Problem> problems)  
      PreferencesAdapter createPreferencesAdapter()
      Creates the component for the preferences.
      protected void error​(TaskTablePanel.UpdateEvent event)  
      void gameDataChanged​(GameDataEvent e)
      Clear table and refresh all problems.
      java.util.List<ProblemType> getAllProblemTypes()
      Returns a list of all ProblemTypes of all registered inspectors.
      java.util.Set<ProblemType> getIgnoredProblems()
      Returns a list of all ignored problem types (read from the settings if necessary).
      java.util.List<Inspector> getInspectors()
      Returns a list of all registered inspectors.
      void paint​(java.awt.Graphics g)  
      void quit()
      clean up
      void refreshProblems()
      Rebuild the complete table.
      boolean restrictToActiveRegion()
      Returns true if problems will be restricted to current region.
      boolean restrictToOwner()
      Returns true if problems will be restricted to the owner faction.
      boolean restrictToPassword()
      Returns true if problems will be restricted to factions with known password.
      boolean restrictToSelection()
      Returns true if problems will be restricted to current region selection.
      void selectionChanged​(SelectionEvent e)
      Invoked when different objects are activated or selected.
      protected void selectObjectOnRow​(int row, int col)
      Fire selection event for object associated with row
      void setActiveProblems​(java.util.Set<ProblemType> result)
      Deprecated.
      We use a negative list now
      void setGameData​(GameData data)
      Sets the value of data.
      void setIgnoredProblems​(java.util.Set<ProblemType> set)
      Specifies which problems to ignore.
      void setRestrictToActiveRegion​(boolean value)
      Sets whether problems will be restricted to current region.
      void setRestrictToOwner​(boolean value)
      Sets whether problems will be restricted to the owner faction.
      void setRestrictToPassword​(boolean value)
      Sets whether problems will be restricted to factions with known password.
      void setRestrictToSelection​(boolean value)
      Sets whether problems will be restricted to current selection.
      void setShowGlobal​(boolean value)
      Sets whether global problems will be shown.
      boolean showGlobal()
      Returns true if global problems will be shown.
      protected void showObjectOnRow​(int row)  
      protected void unAcknowledge()  
      void unitChanged​(UnitChangeEvent event)
      Called when a unit has changed in some way.
      void unitOrdersChanged​(UnitOrdersEvent e)
      Updates reviews when orders have changed.
      protected void update​(Unit unit)  
      • 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, 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
    • Constructor Detail

      • TaskTablePanel

        public TaskTablePanel​(EventDispatcher d,
                              GameData initData,
                              java.util.Properties p)
        Creates a new TaskTablePanel object.
        Parameters:
        d -
        initData -
        p -
    • Method Detail

      • unAcknowledge

        protected void unAcknowledge()
      • acknowledge

        protected void acknowledge​(int[] selectedRows)
      • selectObjectOnRow

        protected void selectObjectOnRow​(int row,
                                         int col)
        Fire selection event for object associated with row
        Parameters:
        row - row index of the underlying table
        col - column index of the underlying table
      • showObjectOnRow

        protected void showObjectOnRow​(int row)
      • refreshProblems

        public void refreshProblems()
        Rebuild the complete table.
      • addInspector

        public void addInspector​(Inspector inspector)
        Adds a new inspector to the list of insprectors
      • addInspectorInterceptor

        public void addInspectorInterceptor​(InspectorInterceptor interceptor)
        Adds a new inspector interceptor to the list of inspectors
      • getInspectors

        public java.util.List<Inspector> getInspectors()
        Returns a list of all registered inspectors.
      • getAllProblemTypes

        public java.util.List<ProblemType> getAllProblemTypes()
        Returns a list of all ProblemTypes of all registered inspectors.
      • update

        protected void update​(Unit unit)
      • addProblems

        protected void addProblems​(java.util.List<Problem> problems)
      • setActiveProblems

        @Deprecated
        public void setActiveProblems​(java.util.Set<ProblemType> result)
        Deprecated.
        We use a negative list now
        Specifies which problems to use. Only problems whose ProblemType.getName() matches one in result will be displayed.
        Parameters:
        result - A list of name. If null, all problems will be displayed.
        See Also:
        setIgnoredProblems(Set)
      • setIgnoredProblems

        public void setIgnoredProblems​(java.util.Set<ProblemType> set)
        Specifies which problems to ignore. Only problems whose ProblemType.getName() does not match one in this set will be displayed.
        Parameters:
        set - A list of names. If null, all problems will be displayed.
      • getIgnoredProblems

        public java.util.Set<ProblemType> getIgnoredProblems()
        Returns a list of all ignored problem types (read from the settings if necessary).
      • restrictToOwner

        public boolean restrictToOwner()
        Returns true if problems will be restricted to the owner faction.
      • restrictToPassword

        public boolean restrictToPassword()
        Returns true if problems will be restricted to factions with known password.
      • setRestrictToOwner

        public void setRestrictToOwner​(boolean value)
        Sets whether problems will be restricted to the owner faction.
      • setRestrictToPassword

        public void setRestrictToPassword​(boolean value)
        Sets whether problems will be restricted to factions with known password.
      • restrictToSelection

        public boolean restrictToSelection()
        Returns true if problems will be restricted to current region selection.
      • restrictToActiveRegion

        public boolean restrictToActiveRegion()
        Returns true if problems will be restricted to current region.
      • setRestrictToSelection

        public void setRestrictToSelection​(boolean value)
        Sets whether problems will be restricted to current selection.
      • setRestrictToActiveRegion

        public void setRestrictToActiveRegion​(boolean value)
        Sets whether problems will be restricted to current region.
      • showGlobal

        public boolean showGlobal()
        Returns true if global problems will be shown.
      • setShowGlobal

        public void setShowGlobal​(boolean value)
        Sets whether global problems will be shown.
      • paint

        public void paint​(java.awt.Graphics g)
        Overrides:
        paint in class javax.swing.JComponent