org.jscience.awt.pots
Class PotBase

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by org.jscience.awt.pots.PotBase
All Implemented Interfaces:
java.awt.Adjustable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
Direct Known Subclasses:
Pot, SlidePot

public abstract class PotBase
extends java.awt.Canvas
implements java.awt.Adjustable

DOCUMENT ME!

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
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
protected  java.awt.event.AdjustmentListener adjustmentListener
          DOCUMENT ME!
protected  int blockIncrement
          DOCUMENT ME!
protected  java.awt.Color brighterPanelColor
          DOCUMENT ME!
protected  java.lang.String caption
          DOCUMENT ME!
static java.lang.String DEFAULTFONTNAME
          DOCUMENT ME!
static int DEFAULTFONTSIZE
          DOCUMENT ME!
static int DEFAULTFONTSTYLE
          DOCUMENT ME!
protected  java.awt.Point downPt
          DOCUMENT ME!
protected  java.awt.Font font
          DOCUMENT ME!
protected  java.lang.String fontName
          DOCUMENT ME!
protected  int fontSize
          DOCUMENT ME!
protected  int fontStyle
          DOCUMENT ME!
protected  java.awt.Color gradColor
          DOCUMENT ME!
static java.awt.Color GRADCOLOR
          DOCUMENT ME!
protected  boolean hasFocus
          DOCUMENT ME!
protected  boolean hasHighlight
          DOCUMENT ME!
protected  boolean hasLabels
          DOCUMENT ME!
protected  java.awt.Color highlightBrighterColor
          DOCUMENT ME!
protected  java.awt.Color highlightDarkerColor
          DOCUMENT ME!
protected  java.awt.Color knobColor
          DOCUMENT ME!
static java.awt.Color KNOBCOLOR
          DOCUMENT ME!
protected  java.util.Vector labels
          DOCUMENT ME!
protected  boolean mouseDown
          DOCUMENT ME!
protected  boolean mouseInKnob
          DOCUMENT ME!
protected  int numberOfSections
          DOCUMENT ME!
protected  java.awt.Color panelColor
          DOCUMENT ME!
static java.awt.Color PANELCOLOR
          DOCUMENT ME!
protected  java.awt.Image potImage
          DOCUMENT ME!
static int POTRANGE
          DOCUMENT ME!
protected  java.awt.Color textColor
          DOCUMENT ME!
static java.awt.Color TEXTCOLOR
          DOCUMENT ME!
protected  java.awt.Color ticColor
          DOCUMENT ME!
static java.awt.Color TICCOLOR
          DOCUMENT ME!
protected  int unitIncrement
          DOCUMENT ME!
protected  int value
          DOCUMENT ME!
protected  int xCenter
          DOCUMENT ME!
protected  int yCenter
          DOCUMENT ME!
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.Adjustable
HORIZONTAL, NO_ORIENTATION, VERTICAL
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PotBase(java.lang.String fontName, int fontStyle, int fontSize, java.lang.String caption, boolean hasLabels, java.lang.String labelsString, int value, boolean hasHighlight, int numberOfSections, java.awt.Color panelColor, java.awt.Color knobColor, java.awt.Color textColor, java.awt.Color ticColor, java.awt.Color gradColor)
          Creates a new PotBase object.
 
Method Summary
 void addAdjustmentListener(java.awt.event.AdjustmentListener l)
           
 void fireAdjustmentEvent()
          DOCUMENT ME!
 double getAttenuation()
          DOCUMENT ME!
 int getBlockIncrement()
          DOCUMENT ME!
 java.lang.String getCaption()
          DOCUMENT ME!
 java.awt.Font getFont()
          DOCUMENT ME!
 java.lang.String getFontName()
          DOCUMENT ME!
 int getFontSize()
          DOCUMENT ME!
 int getFontStyle()
          DOCUMENT ME!
 java.awt.Color getGradColor()
          DOCUMENT ME!
 boolean getHasLabels()
          DOCUMENT ME!
 boolean getHighlight()
          DOCUMENT ME!
 java.awt.Color getKnobColor()
          DOCUMENT ME!
 java.lang.String getLabelsString()
          DOCUMENT ME!
 int getMaximum()
          DOCUMENT ME!
 int getMinimum()
          DOCUMENT ME!
 int getNumberOfSections()
          DOCUMENT ME!
 int getOrientation()
          DOCUMENT ME!
 java.awt.Color getPanelColor()
          DOCUMENT ME!
abstract  java.awt.Dimension getPreferredSize()
          DOCUMENT ME!
 java.awt.Color getTextColor()
          DOCUMENT ME!
 java.awt.Color getTicColor()
          DOCUMENT ME!
 int getUnitIncrement()
          DOCUMENT ME!
 int getValue()
          DOCUMENT ME!
 int getVisibleAmount()
          DOCUMENT ME!
abstract  void paint(java.awt.Graphics g)
          DOCUMENT ME!
 void removeAdjustmentListener(java.awt.event.AdjustmentListener l)
          DOCUMENT ME!
protected  int round(double d)
          DOCUMENT ME!
 void setBlockIncrement(int b)
          DOCUMENT ME!
 void setCaption(java.lang.String caption)
          DOCUMENT ME!
 void setFont(java.awt.Font font)
          DOCUMENT ME!
 void setFontName(java.lang.String fontName)
          DOCUMENT ME!
 void setFontSize(int fontSize)
          DOCUMENT ME!
 void setFontStyle(int fontStyle)
          DOCUMENT ME!
 void setGradColor(java.awt.Color gradColor)
          DOCUMENT ME!
 void setHasLabels(boolean hasLabels)
          DOCUMENT ME!
 void setHighlight(boolean hasHighlight)
          DOCUMENT ME!
 void setKnobColor(java.awt.Color knobColor)
          DOCUMENT ME!
 void setLabelsString(java.lang.String s)
          DOCUMENT ME!
 void setMaximum(int m)
          DOCUMENT ME!
 void setMinimum(int m)
          DOCUMENT ME!
 void setNumberOfSections(int numberOfSections)
          DOCUMENT ME!
 void setPanelColor(java.awt.Color panelColor)
          DOCUMENT ME!
 void setTextColor(java.awt.Color textColor)
          DOCUMENT ME!
 void setTicColor(java.awt.Color ticColor)
          DOCUMENT ME!
 void setUnitIncrement(int unitIncrement)
          DOCUMENT ME!
 void setValue(int newValue)
          DOCUMENT ME!
 void setVisibleAmount(int a)
          DOCUMENT ME!
protected  void sizeToFit()
          DOCUMENT ME!
 
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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, 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

POTRANGE

public static final int POTRANGE
DOCUMENT ME!

See Also:
Constant Field Values

PANELCOLOR

public static final java.awt.Color PANELCOLOR
DOCUMENT ME!


KNOBCOLOR

public static final java.awt.Color KNOBCOLOR
DOCUMENT ME!


TEXTCOLOR

public static final java.awt.Color TEXTCOLOR
DOCUMENT ME!


TICCOLOR

public static final java.awt.Color TICCOLOR
DOCUMENT ME!


GRADCOLOR

public static final java.awt.Color GRADCOLOR
DOCUMENT ME!


DEFAULTFONTNAME

public static final java.lang.String DEFAULTFONTNAME
DOCUMENT ME!

See Also:
Constant Field Values

DEFAULTFONTSTYLE

public static final int DEFAULTFONTSTYLE
DOCUMENT ME!

See Also:
Constant Field Values

DEFAULTFONTSIZE

public static final int DEFAULTFONTSIZE
DOCUMENT ME!

See Also:
Constant Field Values

blockIncrement

protected int blockIncrement
DOCUMENT ME!


unitIncrement

protected int unitIncrement
DOCUMENT ME!


panelColor

protected java.awt.Color panelColor
DOCUMENT ME!


brighterPanelColor

protected java.awt.Color brighterPanelColor
DOCUMENT ME!


knobColor

protected java.awt.Color knobColor
DOCUMENT ME!


textColor

protected java.awt.Color textColor
DOCUMENT ME!


ticColor

protected java.awt.Color ticColor
DOCUMENT ME!


gradColor

protected java.awt.Color gradColor
DOCUMENT ME!


highlightBrighterColor

protected java.awt.Color highlightBrighterColor
DOCUMENT ME!


highlightDarkerColor

protected java.awt.Color highlightDarkerColor
DOCUMENT ME!


hasHighlight

protected boolean hasHighlight
DOCUMENT ME!


hasLabels

protected boolean hasLabels
DOCUMENT ME!


value

protected transient int value
DOCUMENT ME!


numberOfSections

protected int numberOfSections
DOCUMENT ME!


fontName

protected java.lang.String fontName
DOCUMENT ME!


fontStyle

protected int fontStyle
DOCUMENT ME!


fontSize

protected int fontSize
DOCUMENT ME!


font

protected java.awt.Font font
DOCUMENT ME!


caption

protected java.lang.String caption
DOCUMENT ME!


labels

protected java.util.Vector labels
DOCUMENT ME!


adjustmentListener

protected java.awt.event.AdjustmentListener adjustmentListener
DOCUMENT ME!


xCenter

protected int xCenter
DOCUMENT ME!


yCenter

protected int yCenter
DOCUMENT ME!


mouseDown

protected boolean mouseDown
DOCUMENT ME!


mouseInKnob

protected boolean mouseInKnob
DOCUMENT ME!


downPt

protected java.awt.Point downPt
DOCUMENT ME!


hasFocus

protected boolean hasFocus
DOCUMENT ME!


potImage

protected java.awt.Image potImage
DOCUMENT ME!

Constructor Detail

PotBase

public PotBase(java.lang.String fontName,
               int fontStyle,
               int fontSize,
               java.lang.String caption,
               boolean hasLabels,
               java.lang.String labelsString,
               int value,
               boolean hasHighlight,
               int numberOfSections,
               java.awt.Color panelColor,
               java.awt.Color knobColor,
               java.awt.Color textColor,
               java.awt.Color ticColor,
               java.awt.Color gradColor)
Creates a new PotBase object.

Parameters:
fontName - DOCUMENT ME!
fontStyle - DOCUMENT ME!
fontSize - DOCUMENT ME!
caption - DOCUMENT ME!
hasLabels - DOCUMENT ME!
labelsString - DOCUMENT ME!
value - DOCUMENT ME!
hasHighlight - DOCUMENT ME!
numberOfSections - DOCUMENT ME!
panelColor - DOCUMENT ME!
knobColor - DOCUMENT ME!
textColor - DOCUMENT ME!
ticColor - DOCUMENT ME!
gradColor - DOCUMENT ME!
Method Detail

getPreferredSize

public abstract java.awt.Dimension getPreferredSize()
DOCUMENT ME!

Overrides:
getPreferredSize in class java.awt.Component
Returns:
DOCUMENT ME!

paint

public abstract void paint(java.awt.Graphics g)
DOCUMENT ME!

Overrides:
paint in class java.awt.Canvas
Parameters:
g - DOCUMENT ME!

sizeToFit

protected void sizeToFit()
DOCUMENT ME!


round

protected int round(double d)
DOCUMENT ME!

Parameters:
d - DOCUMENT ME!
Returns:
DOCUMENT ME!

getPanelColor

public java.awt.Color getPanelColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setPanelColor

public void setPanelColor(java.awt.Color panelColor)
DOCUMENT ME!

Parameters:
panelColor - DOCUMENT ME!

getKnobColor

public java.awt.Color getKnobColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setKnobColor

public void setKnobColor(java.awt.Color knobColor)
DOCUMENT ME!

Parameters:
knobColor - DOCUMENT ME!

getTextColor

public java.awt.Color getTextColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setTextColor

public void setTextColor(java.awt.Color textColor)
DOCUMENT ME!

Parameters:
textColor - DOCUMENT ME!

getTicColor

public java.awt.Color getTicColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setTicColor

public void setTicColor(java.awt.Color ticColor)
DOCUMENT ME!

Parameters:
ticColor - DOCUMENT ME!

getGradColor

public java.awt.Color getGradColor()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setGradColor

public void setGradColor(java.awt.Color gradColor)
DOCUMENT ME!

Parameters:
gradColor - DOCUMENT ME!

getHighlight

public boolean getHighlight()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setHighlight

public void setHighlight(boolean hasHighlight)
DOCUMENT ME!

Parameters:
hasHighlight - DOCUMENT ME!

getValue

public int getValue()
DOCUMENT ME!

Specified by:
getValue in interface java.awt.Adjustable
Returns:
DOCUMENT ME!

setValue

public void setValue(int newValue)
DOCUMENT ME!

Specified by:
setValue in interface java.awt.Adjustable
Parameters:
newValue - DOCUMENT ME!

getAttenuation

public double getAttenuation()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getHasLabels

public boolean getHasLabels()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setHasLabels

public void setHasLabels(boolean hasLabels)
DOCUMENT ME!

Parameters:
hasLabels - DOCUMENT ME!

getLabelsString

public java.lang.String getLabelsString()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setLabelsString

public void setLabelsString(java.lang.String s)
DOCUMENT ME!

Parameters:
s - DOCUMENT ME!

getFont

public java.awt.Font getFont()
DOCUMENT ME!

Specified by:
getFont in interface java.awt.MenuContainer
Overrides:
getFont in class java.awt.Component
Returns:
DOCUMENT ME!

setFont

public void setFont(java.awt.Font font)
DOCUMENT ME!

Overrides:
setFont in class java.awt.Component
Parameters:
font - DOCUMENT ME!

getFontName

public java.lang.String getFontName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setFontName

public void setFontName(java.lang.String fontName)
DOCUMENT ME!

Parameters:
fontName - DOCUMENT ME!

getFontStyle

public int getFontStyle()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setFontStyle

public void setFontStyle(int fontStyle)
DOCUMENT ME!

Parameters:
fontStyle - DOCUMENT ME!

getFontSize

public int getFontSize()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setFontSize

public void setFontSize(int fontSize)
DOCUMENT ME!

Parameters:
fontSize - DOCUMENT ME!

getCaption

public java.lang.String getCaption()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setCaption

public void setCaption(java.lang.String caption)
DOCUMENT ME!

Parameters:
caption - DOCUMENT ME!

getNumberOfSections

public int getNumberOfSections()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setNumberOfSections

public void setNumberOfSections(int numberOfSections)
DOCUMENT ME!

Parameters:
numberOfSections - DOCUMENT ME!

getBlockIncrement

public int getBlockIncrement()
DOCUMENT ME!

Specified by:
getBlockIncrement in interface java.awt.Adjustable
Returns:
DOCUMENT ME!

setBlockIncrement

public void setBlockIncrement(int b)
DOCUMENT ME!

Specified by:
setBlockIncrement in interface java.awt.Adjustable
Parameters:
b - DOCUMENT ME!

getMaximum

public int getMaximum()
DOCUMENT ME!

Specified by:
getMaximum in interface java.awt.Adjustable
Returns:
DOCUMENT ME!

setMaximum

public void setMaximum(int m)
DOCUMENT ME!

Specified by:
setMaximum in interface java.awt.Adjustable
Parameters:
m - DOCUMENT ME!

getMinimum

public int getMinimum()
DOCUMENT ME!

Specified by:
getMinimum in interface java.awt.Adjustable
Returns:
DOCUMENT ME!

setMinimum

public void setMinimum(int m)
DOCUMENT ME!

Specified by:
setMinimum in interface java.awt.Adjustable
Parameters:
m - DOCUMENT ME!

getOrientation

public int getOrientation()
DOCUMENT ME!

Specified by:
getOrientation in interface java.awt.Adjustable
Returns:
DOCUMENT ME!

getUnitIncrement

public int getUnitIncrement()
DOCUMENT ME!

Specified by:
getUnitIncrement in interface java.awt.Adjustable
Returns:
DOCUMENT ME!

setUnitIncrement

public void setUnitIncrement(int unitIncrement)
DOCUMENT ME!

Specified by:
setUnitIncrement in interface java.awt.Adjustable
Parameters:
unitIncrement - DOCUMENT ME!

getVisibleAmount

public int getVisibleAmount()
DOCUMENT ME!

Specified by:
getVisibleAmount in interface java.awt.Adjustable
Returns:
DOCUMENT ME!

setVisibleAmount

public void setVisibleAmount(int a)
DOCUMENT ME!

Specified by:
setVisibleAmount in interface java.awt.Adjustable
Parameters:
a - DOCUMENT ME!

addAdjustmentListener

public void addAdjustmentListener(java.awt.event.AdjustmentListener l)
Specified by:
addAdjustmentListener in interface java.awt.Adjustable

removeAdjustmentListener

public void removeAdjustmentListener(java.awt.event.AdjustmentListener l)
DOCUMENT ME!

Specified by:
removeAdjustmentListener in interface java.awt.Adjustable
Parameters:
l - DOCUMENT ME!

fireAdjustmentEvent

public void fireAdjustmentEvent()
DOCUMENT ME!