public final class ReportCompactColonyPanel extends ReportPanel implements java.awt.event.ActionListener
| Modifier and Type | Class and Description |
|---|---|
private static class |
ReportCompactColonyPanel.ColonySummary
Container class for all the information about a colony.
|
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
BUILDQUEUE |
private static java.awt.Color |
cAlarm |
private static java.lang.String |
cAlarmKey |
private static java.awt.Color |
cExport |
private static java.lang.String |
cExportKey |
private static java.awt.Color |
cGood |
private static java.lang.String |
cGoodKey |
private java.util.List<java.util.List<Colony>> |
colonies |
private static java.awt.Color |
cPlain |
private static java.lang.String |
cPlainKey |
private static java.awt.Color |
cWarn |
private static java.lang.String |
cWarnKey |
private java.util.List<GoodsType> |
goodsTypes |
private ImageLibrary |
lib |
private Market |
market |
private Specification |
spec |
header, logger, reportPanel, scrollPaneCANCEL, editable, HELP, MARGIN, OK, okButtonlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
ReportCompactColonyPanel(FreeColClient freeColClient)
Creates a compact colony report.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae) |
private void |
addTogether(java.util.List<? extends javax.swing.JComponent> components) |
private void |
conciseHeaders(Market market)
Display the header area for the concise panel.
|
private void |
loadResources() |
private javax.swing.JButton |
newButton(java.lang.String action,
java.lang.String h,
javax.swing.ImageIcon i,
java.awt.Color c,
StringTemplate t) |
private javax.swing.JLabel |
newLabel(java.lang.String h,
javax.swing.ImageIcon i,
java.awt.Color c) |
private javax.swing.JLabel |
newLabel(java.lang.String h,
javax.swing.ImageIcon i,
java.awt.Color c,
StringTemplate t) |
private static StringTemplate |
stpl(java.lang.String messageId) |
private static StringTemplate |
stpld(java.lang.String messageId) |
private java.util.List<javax.swing.JButton> |
unitButtons(java.util.Map<UnitType,WorkLocation.Suggestion> suggestions,
java.util.List<UnitType> have,
Colony colony) |
private java.util.List<javax.swing.JLabel> |
unitTypeLabels(java.util.Map<UnitType,java.lang.Integer> unitTypeMap,
int maxSize,
StringTemplate t) |
private void |
update()
Update the panel.
|
private void |
updateColony(ReportCompactColonyPanel.ColonySummary s)
Update a single colony.
|
private void |
updateCombinedColonies(java.util.List<ReportCompactColonyPanel.ColonySummary> summaries)
Update several colonies.
|
createUnitTypeLabel, getLocationLabelFor, initialize, removeNotify, setMainComponentaddClosingCallback, createColonyButton, getClientOptions, getFreeColClient, getGame, getGUI, getImageLibrary, getMyPlayer, getSpecification, igc, isEditable, requestFocus, setCancelComponentgetUIClassIDgetAccessibleContext, getUI, paramString, setUI, updateUIaddAncestorListener, 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, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, 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, updateadd, 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, validateTreeaction, 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, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprivate static final java.lang.String BUILDQUEUE
private static final java.lang.String cAlarmKey
private static final java.lang.String cWarnKey
private static final java.lang.String cPlainKey
private static final java.lang.String cExportKey
private static final java.lang.String cGoodKey
private static java.awt.Color cAlarm
private static java.awt.Color cWarn
private static java.awt.Color cPlain
private static java.awt.Color cExport
private static java.awt.Color cGood
private final Specification spec
private final ImageLibrary lib
private final java.util.List<java.util.List<Colony>> colonies
private final Market market
private final java.util.List<GoodsType> goodsTypes
public ReportCompactColonyPanel(FreeColClient freeColClient)
freeColClient - The FreeColClient for the game.private void loadResources()
private static StringTemplate stpl(java.lang.String messageId)
private static StringTemplate stpld(java.lang.String messageId)
private javax.swing.JLabel newLabel(java.lang.String h,
javax.swing.ImageIcon i,
java.awt.Color c)
private javax.swing.JLabel newLabel(java.lang.String h,
javax.swing.ImageIcon i,
java.awt.Color c,
StringTemplate t)
private javax.swing.JButton newButton(java.lang.String action,
java.lang.String h,
javax.swing.ImageIcon i,
java.awt.Color c,
StringTemplate t)
private void addTogether(java.util.List<? extends javax.swing.JComponent> components)
private void updateColony(ReportCompactColonyPanel.ColonySummary s)
s - The ColonySummary to update from.private java.util.List<javax.swing.JButton> unitButtons(java.util.Map<UnitType,WorkLocation.Suggestion> suggestions, java.util.List<UnitType> have, Colony colony)
private void updateCombinedColonies(java.util.List<ReportCompactColonyPanel.ColonySummary> summaries)
summaries - A list of ColonySummarys to update from.private java.util.List<javax.swing.JLabel> unitTypeLabels(java.util.Map<UnitType,java.lang.Integer> unitTypeMap, int maxSize, StringTemplate t)
private void conciseHeaders(Market market)
market - A Market to check goods arrears
status with.private void update()
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class ReportPanel