soc.client
Class ColorSquareLarger

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended bysoc.client.ColorSquare
              extended bysoc.client.ColorSquareLarger
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable

public class ColorSquareLarger
extends ColorSquare

This is a larger square box with a background color and possibly a number or X in it. This box can be interactive, or non-interactive. The possible colors of the box correspond to resources in SoC. Because ColorSquares and their dimensions are used widely, this subclass limits the changes needed for larger squares for player interaction.

Author:
Jeremy D Monin
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int HEIGHT_L
           
static int WIDTH_L
           
 
Fields inherited from class soc.client.ColorSquare
boolValue, BOUNDED_DEC, BOUNDED_INC, CHECKBOX, CLAY, DESERT, GREY, hasWarnHigh, hasWarnLow, HEIGHT, interactive, intValue, isWarnHigh, isWarnLow, kind, lowerBound, NUMBER, ORE, SHEEP, sqListener, squareH, squareSize, squareW, ttip, ttip_text, ttip_text_warnHigh, ttip_text_warnLow, ttip_text_zero, upperBound, valueVis, warn_bg_grey, WARN_LEVEL_COLOR, WARN_LEVEL_COLOR_BG_FROMGREY, warnHighBound, warnLowBound, WHEAT, WIDTH, WOOD, YES_NO
 
Fields inherited from class java.awt.Canvas
 
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, PROPERTIES, SOMEBITS
 
Constructor Summary
ColorSquareLarger(int k, boolean in, java.awt.Color c)
          Creates a new ColorSquareLarger of the specified kind and background color.
ColorSquareLarger(int k, boolean in, java.awt.Color c, int upper, int lower)
          Creates a new ColorSquare of the specified kind and background color.
 
Methods inherited from class soc.client.ColorSquare
addValue, clearHighWarningLevel, clearLowWarningLevel, getBoolValue, getIntValue, getMinimumSize, getPreferredSize, getSquareListener, getTooltipText, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, paint, setBackground, setBoolValue, setColor, setHighWarningLevel, setIntValue, setLowWarningLevel, setSize, setSquareListener, setTooltipHighWarningLevel, setTooltipLowWarningLevel, setTooltipText, setTooltipZeroText, setVisible, subtractValue
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WIDTH_L

public static final int WIDTH_L
See Also:
Constant Field Values

HEIGHT_L

public static final int HEIGHT_L
See Also:
Constant Field Values
Constructor Detail

ColorSquareLarger

public ColorSquareLarger(int k,
                         boolean in,
                         java.awt.Color c)
Creates a new ColorSquareLarger of the specified kind and background color. Possibly interactive. For kind = NUMBER, upper=99, lower=0.

Parameters:
k - Kind: NUMBER, YES_NO, CHECKBOX, BOUNDED_INC, BOUNDED_DEC
in - interactive flag allowing user interaction
c - background color
See Also:
ColorSquare.ColorSquare(int, boolean, Color)

ColorSquareLarger

public ColorSquareLarger(int k,
                         boolean in,
                         java.awt.Color c,
                         int upper,
                         int lower)
Creates a new ColorSquare of the specified kind and background color. Possibly interactive, with upper and lower bounds specified for NUMBER kinds.

Parameters:
k - Kind: NUMBER, YES_NO, CHECKBOX, BOUNDED_INC, BOUNDED_DEC
in - interactive flag allowing user interaction
c - background color
upper - upper bound if k == NUMBER
lower - lower bound if k == NUMBER