|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
net.sf.freecol.client.gui.panel.ProductionMultiplesLabel
public final class ProductionMultiplesLabel
The ProductionLabel represents Goods that are produced in a WorkLocation or Settlement. It is similar to the GoodsLabel.
| Nested Class Summary |
|---|
| 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 | |
|---|---|
private boolean |
centered
Whether the ProductionLabel should be centered. |
private int |
compressedWidth
The compressed width of the ProductionLabel. |
private int |
displayNumber
The smallest number to display above the goodsIcons. |
private boolean |
drawPlus
Whether to display positive integers with a "+" sign. |
private javax.swing.ImageIcon[] |
goodsIcon
The goodsIcon for this type of production. |
private GoodsType[] |
goodsType
The type of goods being produced. |
private static java.util.logging.Logger |
logger
|
private int |
maxIcons
The maximum number of goodsIcons to display. |
private int |
maximumProduction
The amount of goods that could be produced. |
private Canvas |
parent
|
private int[] |
production
The amount of goods being produced. |
private int |
stockNumber
The smallest number to display above the goodsIcons. |
private java.lang.String |
toolTipPrefix
Describe toolTipPrefix here. |
private int |
totalProduction
|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, 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 |
|---|
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 |
| Constructor Summary | |
|---|---|
ProductionMultiplesLabel(java.util.List<AbstractGoods> goods,
Canvas parent)
Allow labels to include multiple goods. |
|
| Method Summary | |
|---|---|
boolean |
drawPlus()
Get the DrawPlus value. |
Canvas |
getCanvas()
Returns the parent Canvas object. |
int |
getCompressedWidth()
Get the CompressedWidth value. |
int |
getDisplayNumber()
Get the DisplayNumber value. |
javax.swing.ImageIcon |
getGoodsIcon()
Get the GoodsIcon value. |
int |
getMaxGoodsIcons()
Get the MaxGoodsIcons value. |
int |
getMaximumIconHeight()
Need to determine the tallest icon TODO: Why does this use the image instead of the Icon like width?? |
int |
getMaximumIconWidth()
Need to determine what the phatest icon is |
int |
getMaximumProduction()
Get the MaximumProduction value. |
java.awt.Dimension |
getPreferredSize()
Overrides the getPreferredSize method. |
int |
getPreferredWidth()
Returns only the width component of the preferred size. |
int |
getProduction()
Get the Production value. |
int |
getStockNumber()
Get the stockNumber value. |
java.lang.String |
getToolTipPrefix()
Get the ToolTipPrefix value. |
boolean |
isCentered()
Get the Centered value. |
void |
paintComponent(java.awt.Graphics g)
Paints this ProductionLabel. |
void |
setCentered(boolean newCentered)
Set the Centered value. |
void |
setCompressedWidth(int newCompressedWidth)
Set the CompressedWidth value. |
void |
setDisplayNumber(int newDisplayNumber)
Set the DisplayNumber value. |
void |
setDrawPlus(boolean newDrawPlus)
Set the DrawPlus value. |
void |
setGoodsIcon(javax.swing.ImageIcon newGoodsIcon)
Set the GoodsIcon value. |
void |
setMaxGoodsIcons(int newMaxGoodsIcons)
Set the MaxGoodsIcons value. |
void |
setMaximumProduction(int newMaximumProduction)
Set the MaximumProduction value. |
void |
setProduction(int newProduction)
Set the Production value. |
void |
setStockNumber(int newStockNumber)
Set the stockNumber value. |
void |
setToolTipPrefix(java.lang.String newToolTipPrefix)
Set the ToolTipPrefix value. |
private void |
updateToolTipText()
|
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, 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, updateUI |
| 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static java.util.logging.Logger logger
private final Canvas parent
private int maxIcons
private boolean drawPlus
private boolean centered
private int compressedWidth
private GoodsType[] goodsType
private javax.swing.ImageIcon[] goodsIcon
private int[] production
private int totalProduction
private int maximumProduction
private int displayNumber
private int stockNumber
private java.lang.String toolTipPrefix
| Constructor Detail |
|---|
public ProductionMultiplesLabel(java.util.List<AbstractGoods> goods,
Canvas parent)
goods - The goods to display.parent - | Method Detail |
|---|
public java.lang.String getToolTipPrefix()
ToolTipPrefix value.
String valuepublic void setToolTipPrefix(java.lang.String newToolTipPrefix)
ToolTipPrefix value.
newToolTipPrefix - The new ToolTipPrefix value.public Canvas getCanvas()
public int getDisplayNumber()
DisplayNumber value.
int valuepublic void setDisplayNumber(int newDisplayNumber)
DisplayNumber value.
newDisplayNumber - The new DisplayNumber value.public javax.swing.ImageIcon getGoodsIcon()
GoodsIcon value.
ImageIcon valuepublic void setGoodsIcon(javax.swing.ImageIcon newGoodsIcon)
GoodsIcon value.
newGoodsIcon - The new GoodsIcon value.public int getProduction()
Production value.
int valuepublic void setProduction(int newProduction)
Production value.
newProduction - The new Production value.private void updateToolTipText()
public int getMaximumProduction()
MaximumProduction value.
int valuepublic void setMaximumProduction(int newMaximumProduction)
MaximumProduction value.
newMaximumProduction - The new MaximumProduction value.public int getMaxGoodsIcons()
MaxGoodsIcons value.
int valuepublic void setMaxGoodsIcons(int newMaxGoodsIcons)
MaxGoodsIcons value.
newMaxGoodsIcons - The new MaxGoodsIcons value.public int getStockNumber()
stockNumber value.
used to Show stored items in ReportColonyPanel
int valuepublic void setStockNumber(int newStockNumber)
stockNumber value.
used to Show stored items in ReportColonyPanel
newStockNumber - The new StockNumber value.public boolean drawPlus()
DrawPlus value.
boolean valuepublic void setDrawPlus(boolean newDrawPlus)
DrawPlus value.
newDrawPlus - The new DrawPlus value.public boolean isCentered()
Centered value.
boolean valuepublic void setCentered(boolean newCentered)
Centered value.
newCentered - The new Centered value.public int getCompressedWidth()
CompressedWidth value.
int valuepublic void setCompressedWidth(int newCompressedWidth)
CompressedWidth value.
newCompressedWidth - The new CompressedWidth value.public java.awt.Dimension getPreferredSize()
getPreferredSize method.
getPreferredSize in class javax.swing.JComponentDimension valuepublic int getPreferredWidth()
int valuepublic int getMaximumIconWidth()
public int getMaximumIconHeight()
public void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentg - The graphics context in which to do the painting.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||