org.jscience.awt.pots
Class Pot

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

public class Pot
extends PotBase

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
static int DEFAULTRADIUS
          DOCUMENT ME!
static int GRADGAPPERCENT
          DOCUMENT ME!
static int GRADLENGTHPERCENT
          DOCUMENT ME!
static int LABELPERCENT
          DOCUMENT ME!
static int MAXPOTTRAVELDEGREES
          DOCUMENT ME!
static int NUMBEROFSECTIONS
          DOCUMENT ME!
static int PAD
          DOCUMENT ME!
static int POTZEROOFFSET
          DOCUMENT ME!
static java.lang.String SECTIONLABELS
          DOCUMENT ME!
static int TICLENGTHPERCENT
          DOCUMENT ME!
static int TICSTARTPERCENT
          DOCUMENT ME!
 
Fields inherited from class org.jscience.awt.pots.PotBase
adjustmentListener, blockIncrement, brighterPanelColor, caption, DEFAULTFONTNAME, DEFAULTFONTSIZE, DEFAULTFONTSTYLE, downPt, font, fontName, fontSize, fontStyle, gradColor, GRADCOLOR, hasFocus, hasHighlight, hasLabels, highlightBrighterColor, highlightDarkerColor, knobColor, KNOBCOLOR, labels, mouseDown, mouseInKnob, numberOfSections, panelColor, PANELCOLOR, potImage, POTRANGE, textColor, TEXTCOLOR, ticColor, TICCOLOR, unitIncrement, value, xCenter, yCenter
 
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
Pot()
          Creates a new Pot object.
Pot(int radius, java.lang.String caption, int value)
          Creates a new Pot object.
Pot(int radius, java.lang.String fontName, int fontStyle, int fontSize, java.lang.String caption, boolean hasLabels, java.lang.String labelsString, boolean captionAtBottom, int value, boolean knobUseTics, boolean gradUseTics, boolean hasHighlight, int ticLengthPercent, int ticStartPercent, int numberOfSections, int gradGapPercent, int gradLengthPercent, int labelPercent, java.awt.Color panelColor, java.awt.Color knobColor, java.awt.Color textColor, java.awt.Color ticColor, java.awt.Color gradColor)
          Creates a new Pot object.
 
Method Summary
protected  void drawDotPolar(java.awt.Graphics g, int xCenter, int yCenter, double angle, int start, int length)
          DOCUMENT ME!
protected  void drawLinePolar(java.awt.Graphics g, int xCenter, int yCenter, double angle, int start, int length)
          DOCUMENT ME!
protected  void drawTextPolar(java.awt.Graphics g, int xCenter, int yCenter, double angle, int start, java.lang.String text)
          DOCUMENT ME!
protected  double getAngleFromValue(int inValue)
          DOCUMENT ME!
 boolean getCaptionAtBottom()
          DOCUMENT ME!
 int getGradGapPercent()
          DOCUMENT ME!
 int getGradLengthPercent()
          DOCUMENT ME!
 boolean getGradUseTics()
          DOCUMENT ME!
 boolean getKnobUseTics()
          DOCUMENT ME!
 int getLabelPercent()
          DOCUMENT ME!
 java.awt.Dimension getPreferredSize()
          DOCUMENT ME!
 int getRadius()
          DOCUMENT ME!
 int getTicLengthPercent()
          DOCUMENT ME!
 int getTicStartPercent()
          DOCUMENT ME!
 void paint(java.awt.Graphics g)
          DOCUMENT ME!
protected  void processKeyEvent(java.awt.event.KeyEvent e)
          DOCUMENT ME!
protected  void processMouseEvent(java.awt.event.MouseEvent e)
          DOCUMENT ME!
protected  void processMouseMotionEvent(java.awt.event.MouseEvent e)
          DOCUMENT ME!
 void setCaptionAtBottom(boolean captionAtBottom)
          DOCUMENT ME!
 void setGradGapPercent(int percent)
          DOCUMENT ME!
 void setGradLengthPercent(int percent)
          DOCUMENT ME!
 void setGradUseTics(boolean useTics)
          DOCUMENT ME!
 void setKnobUseTics(boolean useTics)
          DOCUMENT ME!
 void setLabelPercent(int percent)
          DOCUMENT ME!
 void setRadius(int radius)
          DOCUMENT ME!
 void setTicLengthPercent(int percent)
          DOCUMENT ME!
 void setTicStartPercent(int percent)
          DOCUMENT ME!
 
Methods inherited from class org.jscience.awt.pots.PotBase
addAdjustmentListener, fireAdjustmentEvent, getAttenuation, getBlockIncrement, getCaption, getFont, getFontName, getFontSize, getFontStyle, getGradColor, getHasLabels, getHighlight, getKnobColor, getLabelsString, getMaximum, getMinimum, getNumberOfSections, getOrientation, getPanelColor, getTextColor, getTicColor, getUnitIncrement, getValue, getVisibleAmount, removeAdjustmentListener, round, setBlockIncrement, setCaption, setFont, setFontName, setFontSize, setFontStyle, setGradColor, setHasLabels, setHighlight, setKnobColor, setLabelsString, setMaximum, setMinimum, setNumberOfSections, setPanelColor, setTextColor, setTicColor, setUnitIncrement, setValue, setVisibleAmount, sizeToFit
 
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, 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

DEFAULTRADIUS

public static final int DEFAULTRADIUS
DOCUMENT ME!

See Also:
Constant Field Values

MAXPOTTRAVELDEGREES

public static final int MAXPOTTRAVELDEGREES
DOCUMENT ME!

See Also:
Constant Field Values

POTZEROOFFSET

public static final int POTZEROOFFSET
DOCUMENT ME!

See Also:
Constant Field Values

TICLENGTHPERCENT

public static final int TICLENGTHPERCENT
DOCUMENT ME!

See Also:
Constant Field Values

TICSTARTPERCENT

public static final int TICSTARTPERCENT
DOCUMENT ME!

See Also:
Constant Field Values

NUMBEROFSECTIONS

public static final int NUMBEROFSECTIONS
DOCUMENT ME!

See Also:
Constant Field Values

SECTIONLABELS

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

See Also:
Constant Field Values

GRADGAPPERCENT

public static final int GRADGAPPERCENT
DOCUMENT ME!

See Also:
Constant Field Values

GRADLENGTHPERCENT

public static final int GRADLENGTHPERCENT
DOCUMENT ME!

See Also:
Constant Field Values

LABELPERCENT

public static final int LABELPERCENT
DOCUMENT ME!

See Also:
Constant Field Values

PAD

public static final int PAD
DOCUMENT ME!

See Also:
Constant Field Values
Constructor Detail

Pot

public Pot(int radius,
           java.lang.String fontName,
           int fontStyle,
           int fontSize,
           java.lang.String caption,
           boolean hasLabels,
           java.lang.String labelsString,
           boolean captionAtBottom,
           int value,
           boolean knobUseTics,
           boolean gradUseTics,
           boolean hasHighlight,
           int ticLengthPercent,
           int ticStartPercent,
           int numberOfSections,
           int gradGapPercent,
           int gradLengthPercent,
           int labelPercent,
           java.awt.Color panelColor,
           java.awt.Color knobColor,
           java.awt.Color textColor,
           java.awt.Color ticColor,
           java.awt.Color gradColor)
Creates a new Pot object.

Parameters:
radius - DOCUMENT ME!
fontName - DOCUMENT ME!
fontStyle - DOCUMENT ME!
fontSize - DOCUMENT ME!
caption - DOCUMENT ME!
hasLabels - DOCUMENT ME!
labelsString - DOCUMENT ME!
captionAtBottom - DOCUMENT ME!
value - DOCUMENT ME!
knobUseTics - DOCUMENT ME!
gradUseTics - DOCUMENT ME!
hasHighlight - DOCUMENT ME!
ticLengthPercent - DOCUMENT ME!
ticStartPercent - DOCUMENT ME!
numberOfSections - DOCUMENT ME!
gradGapPercent - DOCUMENT ME!
gradLengthPercent - DOCUMENT ME!
labelPercent - DOCUMENT ME!
panelColor - DOCUMENT ME!
knobColor - DOCUMENT ME!
textColor - DOCUMENT ME!
ticColor - DOCUMENT ME!
gradColor - DOCUMENT ME!

Pot

public Pot(int radius,
           java.lang.String caption,
           int value)
Creates a new Pot object.

Parameters:
radius - DOCUMENT ME!
caption - DOCUMENT ME!
value - DOCUMENT ME!

Pot

public Pot()
Creates a new Pot object.

Method Detail

getPreferredSize

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

Specified by:
getPreferredSize in class PotBase
Returns:
DOCUMENT ME!

drawLinePolar

protected void drawLinePolar(java.awt.Graphics g,
                             int xCenter,
                             int yCenter,
                             double angle,
                             int start,
                             int length)
DOCUMENT ME!

Parameters:
g - DOCUMENT ME!
xCenter - DOCUMENT ME!
yCenter - DOCUMENT ME!
angle - DOCUMENT ME!
start - DOCUMENT ME!
length - DOCUMENT ME!

drawDotPolar

protected void drawDotPolar(java.awt.Graphics g,
                            int xCenter,
                            int yCenter,
                            double angle,
                            int start,
                            int length)
DOCUMENT ME!

Parameters:
g - DOCUMENT ME!
xCenter - DOCUMENT ME!
yCenter - DOCUMENT ME!
angle - DOCUMENT ME!
start - DOCUMENT ME!
length - DOCUMENT ME!

drawTextPolar

protected void drawTextPolar(java.awt.Graphics g,
                             int xCenter,
                             int yCenter,
                             double angle,
                             int start,
                             java.lang.String text)
DOCUMENT ME!

Parameters:
g - DOCUMENT ME!
xCenter - DOCUMENT ME!
yCenter - DOCUMENT ME!
angle - DOCUMENT ME!
start - DOCUMENT ME!
text - DOCUMENT ME!

getAngleFromValue

protected double getAngleFromValue(int inValue)
DOCUMENT ME!

Parameters:
inValue - DOCUMENT ME!
Returns:
DOCUMENT ME!

paint

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

Specified by:
paint in class PotBase
Parameters:
g - DOCUMENT ME!

processMouseEvent

protected void processMouseEvent(java.awt.event.MouseEvent e)
DOCUMENT ME!

Overrides:
processMouseEvent in class java.awt.Component
Parameters:
e - DOCUMENT ME!

processMouseMotionEvent

protected void processMouseMotionEvent(java.awt.event.MouseEvent e)
DOCUMENT ME!

Overrides:
processMouseMotionEvent in class java.awt.Component
Parameters:
e - DOCUMENT ME!

processKeyEvent

protected void processKeyEvent(java.awt.event.KeyEvent e)
DOCUMENT ME!

Overrides:
processKeyEvent in class java.awt.Component
Parameters:
e - DOCUMENT ME!

getRadius

public int getRadius()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setRadius

public void setRadius(int radius)
DOCUMENT ME!

Parameters:
radius - DOCUMENT ME!

getTicLengthPercent

public int getTicLengthPercent()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setTicLengthPercent

public void setTicLengthPercent(int percent)
DOCUMENT ME!

Parameters:
percent - DOCUMENT ME!

getTicStartPercent

public int getTicStartPercent()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setTicStartPercent

public void setTicStartPercent(int percent)
DOCUMENT ME!

Parameters:
percent - DOCUMENT ME!

getGradGapPercent

public int getGradGapPercent()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setGradGapPercent

public void setGradGapPercent(int percent)
DOCUMENT ME!

Parameters:
percent - DOCUMENT ME!

getGradLengthPercent

public int getGradLengthPercent()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setGradLengthPercent

public void setGradLengthPercent(int percent)
DOCUMENT ME!

Parameters:
percent - DOCUMENT ME!

getLabelPercent

public int getLabelPercent()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setLabelPercent

public void setLabelPercent(int percent)
DOCUMENT ME!

Parameters:
percent - DOCUMENT ME!

getKnobUseTics

public boolean getKnobUseTics()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setKnobUseTics

public void setKnobUseTics(boolean useTics)
DOCUMENT ME!

Parameters:
useTics - DOCUMENT ME!

getGradUseTics

public boolean getGradUseTics()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setGradUseTics

public void setGradUseTics(boolean useTics)
DOCUMENT ME!

Parameters:
useTics - DOCUMENT ME!

getCaptionAtBottom

public boolean getCaptionAtBottom()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setCaptionAtBottom

public void setCaptionAtBottom(boolean captionAtBottom)
DOCUMENT ME!

Parameters:
captionAtBottom - DOCUMENT ME!