|
||||||||||
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.ProductionLabel
public final class ProductionLabel
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.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, 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 | |
---|---|
ProductionLabel(Goods goods,
Canvas parent)
Creates a new ProductionLabel instance. |
|
ProductionLabel(GoodsType goodsType,
int amount,
Canvas parent)
Creates a new ProductionLabel instance. |
|
ProductionLabel(GoodsType goodsType,
int amount,
int maximumProduction,
Canvas parent)
Creates a new ProductionLabel instance. |
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 |
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. |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProductionLabel(Goods goods, Canvas parent)
ProductionLabel
instance.
goods
- a Goods
valueparent
- a Canvas
valuepublic ProductionLabel(GoodsType goodsType, int amount, Canvas parent)
ProductionLabel
instance.
goodsType
- an int
valueamount
- an int
valueparent
- a Canvas
valuepublic ProductionLabel(GoodsType goodsType, int amount, int maximumProduction, Canvas parent)
ProductionLabel
instance.
goodsType
- an int
valueamount
- an int
valuemaximumProduction
- an int
valueparent
- a Canvas
valueMethod 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.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.JComponent
Dimension
valuepublic int getPreferredWidth()
int
valuepublic void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
g
- 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 |