JClass 4.5.0 API
Documentation

com.klg.jclass.swing.gauge.beans
Class JCCircularGaugeBean

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.klg.jclass.swing.gauge.JCGauge
                          |
                          +--com.klg.jclass.swing.gauge.JCCircularGauge
                                |
                                +--com.klg.jclass.swing.gauge.beans.JCCircularGaugeBean

public class JCCircularGaugeBean
extends JCCircularGauge
implements Serializable

A bean which exposes gauge properties suitable for editing in an Integrated Development Environment (IDE).

See Also:
Serialized Form

Inner classes inherited from class com.klg.jclass.swing.gauge.JCCircularGauge
JCCircularGauge.GaugeType
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
static int DIRECTION_CLOCKWISE
          Scale values increase in a clockwise direction.
static int DIRECTION_COUNTERCLOCKWISE
          Scale values increase in a counterclockwise direction.
protected  JCScale.Direction[] directions
           
protected  JCCircularGauge.GaugeType[] gaugeTypes
           
static int INTERACTION_CLICK
          The needle snaps to a mouse click.
static int INTERACTION_CLICK_DRAG
          The needle responds to both mouse click and mouse drag actions.
static int INTERACTION_DRAG
          The needle follows a mouse drag action.
static int INTERACTION_NONE
          Neither clicking nor dragging affects the needle.
protected  JCNeedle.InteractionType[] interactionTypes
          Interaction type to enum mapping
static int NEEDLE_ARROW
          Arrow polygon using these points.
static int NEEDLE_POINTER
          A pointer needle using these points,
static int NEEDLE_TAILED_ARROW
          Tailed Arrow polygon
static int NEEDLE_TAILED_POINTER
          A tailed pointer needle (tail extends beyond center).
static int NEEDLE_TRIANGLE
          Triangle
protected  JCNeedleStyle[] needleStyles
           
static int TICK_CIRCLE
          Circle tick style.
static int TICK_DIAMOND
          Diamond
static int TICK_LINE
          Line tick style.
static int TICK_RECTANGLE
          Rectangle tick style.
static int TICK_REVERSE_TRIANGLE
          Reverse Triangle
static int TICK_TRIANGLE
          Triangle tick style.
protected  JCTickStyle[] tickStyles
          JCTickStyle to enum mapping
static int TYPE_BOTTOM_HALF_CIRCLE
          The scale is a semicircle oriented so that its diameter is horizontal and its circumference is below its base.
static int TYPE_FULL_CIRCLE
          The scale is a full circle.
static int TYPE_LEFT_HALF_CIRCLE
          The scale is a semicircle oriented so that its diameter is vertical and its circumference is to the left of its base.
static int TYPE_LOWER_LEFT_QUARTER_CIRCLE
          A quadrant whose arc lies southwest.
static int TYPE_LOWER_RIGHT_QUARTER_CIRCLE
          A quadrant whose arc lies southeast.
static int TYPE_RIGHT_HALF_CIRCLE
          The scale is a semicircle oriented so that its diameter is vertical and its circumference is to the right of its base.
static int TYPE_TOP_HALF_CIRCLE
          The scale is a semicircle oriented so that its diameter is horizontal and its circumference is above its base.
static int TYPE_UPPER_LEFT_QUARTER_CIRCLE
          A quadrant whose arc lies northwest.
static int TYPE_UPPER_RIGHT_QUARTER_CIRCLE
          A quadrant whose arc lies northeast.
 
Fields inherited from class com.klg.jclass.swing.gauge.JCCircularGauge
center, gaugeType, labels
 
Fields inherited from class com.klg.jclass.swing.gauge.JCGauge
draggedNeedle, footer, footerLayoutHints, gaugeArea, gaugeAreaLayoutHints, header, headerLayoutHints, legend, legendLayoutHints, needles, pickListeners, ranges, repaintEnabled, scale, snapToValue
 
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
 
Constructor Summary
JCCircularGaugeBean()
          JCCircularGaugeBean no arg constructor.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Add a property change listener for needle value changes.
 boolean getAutoTickGeneration()
          Returns the automatic Boolean for this tick object.
 Color getCenterColor()
          Get the center's color.
 double getCenterRadius()
          Gets the radius of the center.
 int getDirection()
          Returns the direction enum for this gauge.
 int getDirectionIndex(JCScale.Direction direction)
          Return the enum for a given JCCircularScale.Direction.
 boolean getDrawTickLabels()
          Returns the Boolean controlling the drawing of labels.
 boolean getDrawTickMarks()
          Returns the Boolean controlling the drawing of ticks.
 int getGaugeTypeIndex(JCCircularGauge.GaugeType type)
          Return the enum for a given JCCircularGauge.GaugeType.
 int getInteractionTypeIndex(JCNeedle.InteractionType type)
          Return the enum index for a needle interaction type.
 Color getNeedleColor()
          Return the color of the needle.
 int getNeedleInteractionType()
          Returns the interation type for this needle.
 int getNeedleStyle()
          Returns the JCNeedleStyle for this needle.
 int getNeedleStyleIndex(JCNeedleStyle style)
          Return the enum for a given JCNeedleStyle.
 double getNeedleValue()
          Return the scale value at which the needle is currently pointing.
 double getNeedleWidth()
          Return the width of the needle in pixels.
 boolean getPaintCompleteBackground()
          Paints the complete background defined by the GaugeType, not just area swept by scale.
 int getPrecision()
          Returns the format for numbers in a tick label: positive values denote the number of places after the decimal point (for example, 3 means multiples of 0.001); negative values indicate the positive number of zeros are used before the decimal place (for example, -3 means numbering will be in multiples of 1000).
 boolean getPrecisionUseDefault()
          If true, uses gauge-determined precision for tick labels, otherwise uses setPrecision to label tick marks.
 Color getScaleColor()
          Get the scale's color.
 double getScaleExtent()
          Return the extent to which the scale's background will be draw from the center.
 double getScaleMax()
          Return the value which will appear at the scale's stopAngle.
 double getScaleMin()
          Return the value which will appear at the scale's startAngle
 double getStartAngle()
          Get the start angle of the scale.
 double getStopAngle()
          Get the stop angle of the scale.
 Color getTickColor()
          Return the color in which tick marks will be drawn
 Font getTickFont()
          Return the font in which ticks are to be drawn.
 Color getTickFontColor()
          Return the color in which tick labels will be drawn
 double getTickIncrement()
          In non-automatic mode, uses this value as the increment value, that is, places ticks at every incrementValue along the scale.
 double getTickInnerExtent()
          Returns the percentage of the scale's radius (as a decimal) at at which to begin drawing ticks radially outward.
 double getTickLabelExtent()
          Returns the position, expressed as a decimal fraction of the scale's radius, where tick labels are placed.
 double getTickOuterExtent()
          Returns the percentage of the scale's radius (as a decimal) at which to stop drawing the ticks.
 double getTickStartValue()
          In non-automatic mode, uses this value as the start value.
 double getTickStopValue()
          In non-automatic mode, uses this value as the stop value.
 int getTickStyle()
          Returns the JCTickStyle controlling the shape of the tick.
 int getTickStyleIndex(JCTickStyle style)
          Return the enum for a given JCTickStyle.
 double getTickWidth()
          Returns the width in pixels of the tick mark.
 int getType()
          Returns the JCCircularGauge type for this gauge.
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove a property change listener for needle value changes.
 void setAutoTickGeneration(boolean b)
          Sets the automatic Boolean for this tick object.
 void setCenterColor(Color color)
          Set the center's color.
 void setCenterRadius(double radius)
          Sets the radius of the disk.
 void setDirection(int direction)
          Sets the direction enum for this gauge.
 void setDrawTickLabels(boolean b)
          Sets the Boolean controlling the drawing of labels.True means draw the labels, false means hide the labels.
 void setDrawTickMarks(boolean b)
          Sets the Boolean controlling the drawing of ticks.True means draw the ticks, false means hide the ticks.
 void setNeedleColor(Color color)
          Set the color of the needle.
 void setNeedleInteractionType(int type)
          Sets the interation type for this needle.
 void setNeedleStyle(int style)
          Sets the JCNeedleStyle for this needle.
 void setNeedleValue(double value)
          Move the needle to point at this scale value.
 void setNeedleWidth(double width)
          Set the width of the needle in pixels.
 void setPaintCompleteBackground(boolean b)
          If true, paints the complete background for this GaugeType, not just area between the scale's start and stop angles.
 void setPrecision(int precision)
          Sets the format for numbers in a tick label: positive values denote the number of places after the decimal point (for example, 3 means multiples of 0.001); negative values indicate the positive number of zeros are used before the decimal place (for example, -3 means numbering will be in multiples of 1000).
 void setPrecisionUseDefault(boolean b)
          If true, uses gauge-determined precision for tick labels, otherwise uses setPrecision to label tick marks.
 void setScaleColor(Color color)
          Set the scale's color.
 void setScaleExtent(double extent)
          Set the extent to which the scale's background will be draw from the center.
 void setScaleMax(double max)
          Set the value which will appear at the scale's stopAngle.
 void setScaleMin(double min)
          Set the value which will appear at the scale's startAngle.
 void setStartAngle(double angle)
          Set the start angle of the scale.
 void setStopAngle(double angle)
          Set the stop angle of the scale.
 void setTickColor(Color color)
          Set the color in which tick marks will be drawn.
 void setTickFont(Font font)
          Set the font in which ticks are to be drawn.
 void setTickFontColor(Color color)
          Set the color in which tick labels will be drawn.
 void setTickIncrement(double value)
          In non-automatic mode, uses this value as the increment value, that is, places ticks at every incrementValue along the scale.
 void setTickInnerExtent(double extent)
          Sets the percentage of the scale's radius (as a decimal) at at which to begin drawing ticks radially outward.
 void setTickLabelExtent(double extent)
          Sets the percentage, expressed as a decimal fraction of the scale's radius, at which to place the center of the tick label objects.
 void setTickOuterExtent(double extent)
          Sets the percentage of the scale's radius (as a decimal) at which to stop drawing the ticks.
 void setTickStartValue(double value)
          In non-automatic mode, uses this value as the start value.
 void setTickStopValue(double value)
          In non-automatic mode, uses this value as the stop value.
 void setTickStyle(int style)
          Sets the JCTickStyle controlling the shape of the tick.
 void setTickWidth(double width)
          Sets the width in pixels of the tick mark.
 void setType(int type)
          Sets the JCCircularGaugeBean type for this gauge.
 
Methods inherited from class com.klg.jclass.swing.gauge.JCCircularGauge
addLabel, addLabel, getArcBounds, getCenter, getClosestNeedle, getGaugeType, mouseClicked, mouseDragged, paintComponent, redraw, removeLabel, setCenter, setCenter, setGaugeType, valueToAngle
 
Methods inherited from class com.klg.jclass.swing.gauge.JCGauge
addNeedle, addNeedle, addPickListener, addRange, addRange, addTick, addTick, getComponentArea, getDrawingAreaHeight, getDrawingAreaWidth, getFooter, getGaugeArea, getHeader, getLayoutHints, getLegend, getNeedles, getRanges, getRepaintEnabled, getScale, getSnapToValue, getTicks, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, pick, removeNeedle, removePickListener, removeRange, removeTick, sendPickEvent, setFooter, setGaugeArea, setHeader, setLegend, setRepaintEnabled, setScale, setSnapToValue
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INTERACTION_NONE

public static final int INTERACTION_NONE
Neither clicking nor dragging affects the needle.

INTERACTION_DRAG

public static final int INTERACTION_DRAG
The needle follows a mouse drag action.

INTERACTION_CLICK

public static final int INTERACTION_CLICK
The needle snaps to a mouse click.

INTERACTION_CLICK_DRAG

public static final int INTERACTION_CLICK_DRAG
The needle responds to both mouse click and mouse drag actions.

interactionTypes

protected JCNeedle.InteractionType[] interactionTypes
Interaction type to enum mapping

TICK_DIAMOND

public static final int TICK_DIAMOND
Diamond

TICK_TRIANGLE

public static final int TICK_TRIANGLE
Triangle tick style.

TICK_REVERSE_TRIANGLE

public static final int TICK_REVERSE_TRIANGLE
Reverse Triangle

TICK_RECTANGLE

public static final int TICK_RECTANGLE
Rectangle tick style.

TICK_LINE

public static final int TICK_LINE
Line tick style.

TICK_CIRCLE

public static final int TICK_CIRCLE
Circle tick style.

tickStyles

protected JCTickStyle[] tickStyles
JCTickStyle to enum mapping

NEEDLE_POINTER

public static final int NEEDLE_POINTER
A pointer needle using these points,

NEEDLE_TAILED_POINTER

public static final int NEEDLE_TAILED_POINTER
A tailed pointer needle (tail extends beyond center).

NEEDLE_ARROW

public static final int NEEDLE_ARROW
Arrow polygon using these points.

NEEDLE_TAILED_ARROW

public static final int NEEDLE_TAILED_ARROW
Tailed Arrow polygon

NEEDLE_TRIANGLE

public static final int NEEDLE_TRIANGLE
Triangle

needleStyles

protected JCNeedleStyle[] needleStyles

TYPE_FULL_CIRCLE

public static final int TYPE_FULL_CIRCLE
The scale is a full circle.

TYPE_TOP_HALF_CIRCLE

public static final int TYPE_TOP_HALF_CIRCLE
The scale is a semicircle oriented so that its diameter is horizontal and its circumference is above its base.

TYPE_BOTTOM_HALF_CIRCLE

public static final int TYPE_BOTTOM_HALF_CIRCLE
The scale is a semicircle oriented so that its diameter is horizontal and its circumference is below its base.

TYPE_LEFT_HALF_CIRCLE

public static final int TYPE_LEFT_HALF_CIRCLE
The scale is a semicircle oriented so that its diameter is vertical and its circumference is to the left of its base.

TYPE_RIGHT_HALF_CIRCLE

public static final int TYPE_RIGHT_HALF_CIRCLE
The scale is a semicircle oriented so that its diameter is vertical and its circumference is to the right of its base.

TYPE_UPPER_RIGHT_QUARTER_CIRCLE

public static final int TYPE_UPPER_RIGHT_QUARTER_CIRCLE
A quadrant whose arc lies northeast.

TYPE_LOWER_RIGHT_QUARTER_CIRCLE

public static final int TYPE_LOWER_RIGHT_QUARTER_CIRCLE
A quadrant whose arc lies southeast.

TYPE_UPPER_LEFT_QUARTER_CIRCLE

public static final int TYPE_UPPER_LEFT_QUARTER_CIRCLE
A quadrant whose arc lies northwest.

TYPE_LOWER_LEFT_QUARTER_CIRCLE

public static final int TYPE_LOWER_LEFT_QUARTER_CIRCLE
A quadrant whose arc lies southwest.

gaugeTypes

protected JCCircularGauge.GaugeType[] gaugeTypes

DIRECTION_CLOCKWISE

public static final int DIRECTION_CLOCKWISE
Scale values increase in a clockwise direction. For example, a scale whose start angle is 0° and whose stop angle is 180°, and whose max and min values are 0 and 100 places its zeroth tick mark at 180° and its 100th tick mark at 0°.
See Also:
JCTick

DIRECTION_COUNTERCLOCKWISE

public static final int DIRECTION_COUNTERCLOCKWISE
Scale values increase in a counterclockwise direction. For example, a scale whose start angle is 0° and whose stop angle is 180°, and whose max and min values are 0 and 100 places its zeroth tick mark at 0° and its 100th tick mark at 180°.
See Also:
JCTick

directions

protected JCScale.Direction[] directions
Constructor Detail

JCCircularGaugeBean

public JCCircularGaugeBean()
JCCircularGaugeBean no arg constructor.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Add a property change listener for needle value changes.
Overrides:
addPropertyChangeListener in class JComponent

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Remove a property change listener for needle value changes.
Overrides:
removePropertyChangeListener in class JComponent

getCenterRadius

public double getCenterRadius()
Gets the radius of the center. The value is a decimal fraction of the scale's radius.
Returns:
the radius as a fraction of the scale's radius

setCenterRadius

public void setCenterRadius(double radius)
Sets the radius of the disk. The radius parameter is a decimal fraction of the scale's radius.
Parameters:
radius - The radius of the center as a proportion of the circular scale's radius.

getCenterColor

public Color getCenterColor()
Get the center's color.
Returns:
the center's color

setCenterColor

public void setCenterColor(Color color)
Set the center's color.
Parameters:
color - the center's color

getNeedleWidth

public double getNeedleWidth()
Return the width of the needle in pixels.
Returns:
the widht of the needle in pixels

setNeedleWidth

public void setNeedleWidth(double width)
Set the width of the needle in pixels.
Parameters:
width - the width in pixels

getNeedleValue

public double getNeedleValue()
Return the scale value at which the needle is currently pointing.
Returns:
the scale value at which the needle is currently pointing.

setNeedleValue

public void setNeedleValue(double value)
Move the needle to point at this scale value. Fire the "needleValue" property change event.
Parameters:
value - the value at which to point

getNeedleInteractionType

public int getNeedleInteractionType()
Returns the interation type for this needle.
Returns:
the JCNeedle.InteractionType for this needle

setNeedleInteractionType

public void setNeedleInteractionType(int type)
Sets the interation type for this needle.
Parameters:
interactionType - The JCNeedle.InteractionType for this needle, one of
  • InteractionType NONE
  • InteractionType DRAG
  • InteractionType.CLICK
  • InteractionType CLICK_DRAG

getNeedleStyle

public int getNeedleStyle()
Returns the JCNeedleStyle for this needle.
Returns:
the JCNeedleStyle of this needle

setNeedleStyle

public void setNeedleStyle(int style)
Sets the JCNeedleStyle for this needle.
Parameters:
needleStyle - The JCNeedleStyle for this needle

getNeedleColor

public Color getNeedleColor()
Return the color of the needle.
Parameters:
return - the color of the needle

setNeedleColor

public void setNeedleColor(Color color)
Set the color of the needle.
Parameters:
color - the color of the needle

getScaleColor

public Color getScaleColor()
Get the scale's color.
Returns:
color the scale's color

setScaleColor

public void setScaleColor(Color color)
Set the scale's color.
Parameters:
color - the scale color

getStartAngle

public double getStartAngle()
Get the start angle of the scale.
Returns:
the angle at which the scale starts; angles increase counterclockwise from 3 o'clock -- 0 degrees

setStartAngle

public void setStartAngle(double angle)
Set the start angle of the scale.
Parameters:
angle - set the angle at which the scale starts; angles increase counterclockwise from 3 o'clock -- 0 degrees

getStopAngle

public double getStopAngle()
Get the stop angle of the scale.
Returns:
the angle at which the scale terminates; angles increase counterclockwise from 3 o'clock -- 0 degrees

setStopAngle

public void setStopAngle(double angle)
Set the stop angle of the scale.
Parameters:
angle - set the angle at which the scale terminates; angles increase counterclockwise from 3 o'clock -- 0 degrees

getScaleExtent

public double getScaleExtent()
Return the extent to which the scale's background will be draw from the center. This is a fraction of the scale's radius.
Returns:
the extent

setScaleExtent

public void setScaleExtent(double extent)
Set the extent to which the scale's background will be draw from the center. This is a fraction of the scale's radius.
Parameters:
extent - the extent

getScaleMin

public double getScaleMin()
Return the value which will appear at the scale's startAngle
Returns:
the value which will appear at the scale's startAngle

setScaleMin

public void setScaleMin(double min)
Set the value which will appear at the scale's startAngle.
Parameters:
min - the value which will appear at the scale's startAngle

getScaleMax

public double getScaleMax()
Return the value which will appear at the scale's stopAngle.
Returns:
the value which will appear at the scale's stopAngle.

setScaleMax

public void setScaleMax(double max)
Set the value which will appear at the scale's stopAngle.
Parameters:
max - the value which will appear at the scale's stopAngle.

getPaintCompleteBackground

public boolean getPaintCompleteBackground()
Paints the complete background defined by the GaugeType, not just area swept by scale. For instance, you can have a scale defined from 0° to 270° for a FULL_CIRCLE, yet have the full circle background painted, not just from 0° to 270°. The default is false.
Returns:
True means paint all the background, false means just the area spanned by scale's sweep angle.

setPaintCompleteBackground

public void setPaintCompleteBackground(boolean b)
If true, paints the complete background for this GaugeType, not just area between the scale's start and stop angles. For instance, a scale defined from 0° to 270° and having gauge type FULL_CIRCLE has the full circular background painted, not just the part from 0° to 270°. The default is false.
Parameters:
paintCompleteBackground - True means paint all of the background consistent with the gauge type.

getAutoTickGeneration

public boolean getAutoTickGeneration()
Returns the automatic Boolean for this tick object.
Returns:
The automatic setting for this tick, true means ticks and increments are dynamically determined by the gauge. Otherwise, startValue, stopValue and incrementValue are used to lay out ticks.

setAutoTickGeneration

public void setAutoTickGeneration(boolean b)
Sets the automatic Boolean for this tick object.
Parameters:
automatic - The automatic setting for this tick, true means ticks and increments are dynamically determined by the gauge. Otherwise, startValue, stopValue and incrementValue are used to lay out ticks.

getTickStartValue

public double getTickStartValue()
In non-automatic mode, uses this value as the start value.
Returns:
the startValue

setTickStartValue

public void setTickStartValue(double value)
In non-automatic mode, uses this value as the start value.
Parameters:
startValue - The startValue

getTickStopValue

public double getTickStopValue()
In non-automatic mode, uses this value as the stop value.
Returns:
the stopValue

setTickStopValue

public void setTickStopValue(double value)
In non-automatic mode, uses this value as the stop value.
Parameters:
stopValue - The stopValue

getTickIncrement

public double getTickIncrement()
In non-automatic mode, uses this value as the increment value, that is, places ticks at every incrementValue along the scale.
Returns:
The spacing between adjacent tick marks

setTickIncrement

public void setTickIncrement(double value)
In non-automatic mode, uses this value as the increment value, that is, places ticks at every incrementValue along the scale.
Parameters:
incrementValue - The spacing between adjacent tick marks

getDrawTickLabels

public boolean getDrawTickLabels()
Returns the Boolean controlling the drawing of labels. True means draw the labels, false means hide the labels.
Returns:
the boolean controlling the drawing of labels.

setDrawTickLabels

public void setDrawTickLabels(boolean b)
Sets the Boolean controlling the drawing of labels.True means draw the labels, false means hide the labels.
Parameters:
drawLabels - the boolean controlling the drawing of labels.

getDrawTickMarks

public boolean getDrawTickMarks()
Returns the Boolean controlling the drawing of ticks. True means draw the ticks, false means hide the ticks.
Returns:
the boolean controlling the drawing of ticks.

setDrawTickMarks

public void setDrawTickMarks(boolean b)
Sets the Boolean controlling the drawing of ticks.True means draw the ticks, false means hide the ticks.
Parameters:
drawTicks - the boolean controlling the drawing of ticks.

getTickWidth

public double getTickWidth()
Returns the width in pixels of the tick mark.
Returns:
The width of the tick to be drawn

setTickWidth

public void setTickWidth(double width)
Sets the width in pixels of the tick mark.
Parameters:
tickWidth - The width of the tick to be drawn in pixels

getTickInnerExtent

public double getTickInnerExtent()
Returns the percentage of the scale's radius (as a decimal) at at which to begin drawing ticks radially outward.
Returns:
The innerExtent of the tick mark

setTickInnerExtent

public void setTickInnerExtent(double extent)
Sets the percentage of the scale's radius (as a decimal) at at which to begin drawing ticks radially outward.
Parameters:
innerExtent - The inner extent of the tick mark

getTickOuterExtent

public double getTickOuterExtent()
Returns the percentage of the scale's radius (as a decimal) at which to stop drawing the ticks.
Returns:
The outerExtent of the tick mark

setTickOuterExtent

public void setTickOuterExtent(double extent)
Sets the percentage of the scale's radius (as a decimal) at which to stop drawing the ticks.
Parameters:
outerExtent - The outerExtent of the tick mark

getTickStyle

public int getTickStyle()
Returns the JCTickStyle controlling the shape of the tick.
Returns:
The tick style
See Also:
JCTickStyle

setTickStyle

public void setTickStyle(int style)
Sets the JCTickStyle controlling the shape of the tick. Users may define their own tick style, if desired.
Parameters:
tickStyle - One of the built-in tick styles, or a user-supplied style
See Also:
JCTickStyle

getTickLabelExtent

public double getTickLabelExtent()
Returns the position, expressed as a decimal fraction of the scale's radius, where tick labels are placed.
Returns:
the extent at which labels will be drawn

setTickLabelExtent

public void setTickLabelExtent(double extent)
Sets the percentage, expressed as a decimal fraction of the scale's radius, at which to place the center of the tick label objects.
Parameters:
labelExtent -  

getTickFont

public Font getTickFont()
Return the font in which ticks are to be drawn.
Returns:
the font in which ticks are to be drawn

setTickFont

public void setTickFont(Font font)
Set the font in which ticks are to be drawn.
Parameters:
font - the font in which ticks are to be drawn

getTickFontColor

public Color getTickFontColor()
Return the color in which tick labels will be drawn
Returns:
the color in which tick labels will be drawn

setTickFontColor

public void setTickFontColor(Color color)
Set the color in which tick labels will be drawn.
Parameters:
color - the color in which tick labels will be drawn

getTickColor

public Color getTickColor()
Return the color in which tick marks will be drawn
Returns:
the color in which tick marks will be drawn

setTickColor

public void setTickColor(Color color)
Set the color in which tick marks will be drawn.
Parameters:
color - the color in which tick marks will be drawn

getPrecisionUseDefault

public boolean getPrecisionUseDefault()
If true, uses gauge-determined precision for tick labels, otherwise uses setPrecision to label tick marks.
Returns:
A Boolean indicating whether or not a label's precision is calculated by the gauge or set using setPrecision.

setPrecisionUseDefault

public void setPrecisionUseDefault(boolean b)
If true, uses gauge-determined precision for tick labels, otherwise uses setPrecision to label tick marks.
Parameters:
precisionUseDefault -  

getPrecision

public int getPrecision()
Returns the format for numbers in a tick label: positive values denote the number of places after the decimal point (for example, 3 means multiples of 0.001); negative values indicate the positive number of zeros are used before the decimal place (for example, -3 means numbering will be in multiples of 1000). Overridden if precisionUseDefault is set to true.
Returns:
the precision

setPrecision

public void setPrecision(int precision)
Sets the format for numbers in a tick label: positive values denote the number of places after the decimal point (for example, 3 means multiples of 0.001); negative values indicate the positive number of zeros are used before the decimal place (for example, -3 means numbering will be in multiples of 1000). Overridden if precisionUseDefault is set to true.
Parameters:
precision - An integer

getType

public int getType()
Returns the JCCircularGauge type for this gauge.
Returns:
the JCCircularGaugeBean type of this gauge

setType

public void setType(int type)
Sets the JCCircularGaugeBean type for this gauge.
Parameters:
type - The JCCircularGaugeBean type for this gauge

getDirection

public int getDirection()
Returns the direction enum for this gauge.
Returns:
the direction enum for this gauge

setDirection

public void setDirection(int direction)
Sets the direction enum for this gauge.
Parameters:
direction - The direction enum for this gauge

getInteractionTypeIndex

public int getInteractionTypeIndex(JCNeedle.InteractionType type)
Return the enum index for a needle interaction type.
Parameters:
JCNeedle.InteractionType - the type to lookup
Returns:
the enum for this type

getTickStyleIndex

public int getTickStyleIndex(JCTickStyle style)
Return the enum for a given JCTickStyle.
Parameters:
JCTickStyle - for which the index is sought
Returns:
the index of the tick style

getNeedleStyleIndex

public int getNeedleStyleIndex(JCNeedleStyle style)
Return the enum for a given JCNeedleStyle.
Parameters:
JCNeedleStyle - for which the index is sought
Returns:
the index of the needle style

getGaugeTypeIndex

public int getGaugeTypeIndex(JCCircularGauge.GaugeType type)
Return the enum for a given JCCircularGauge.GaugeType.
Parameters:
JCCircularGauge.GaugeType - for which the index is sought
Returns:
the index of the JCCircularGauge.GaugeType

getDirectionIndex

public int getDirectionIndex(JCScale.Direction direction)
Return the enum for a given JCCircularScale.Direction.
Parameters:
JCCircularScale.Direction - for which the index is sought
Returns:
the index of the JCCircularScale.Direction

Copyright© 1999-2000 KL Group Inc.
All rights reserved.