JClass DesktopViews 6.3.0 API
Documentation

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

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.klg.jclass.swing.gauge.JCGauge
                          |
                          +--com.klg.jclass.swing.gauge.JCLinearGauge
                                |
                                +--com.klg.jclass.swing.gauge.beans.JCLinearGaugeBean
All Implemented Interfaces:
EventListener, ImageObserver, LegendComponentLayoutUser, MenuContainer, MouseListener, MouseMotionListener, Serializable, com.klg.jclass.util.ServerRenderable

public class JCLinearGaugeBean
extends JCLinearGauge
implements Serializable

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

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int DIRECTION_BACKWARD
          Scale values increase from right to left in a horizontal scale and from top to bottom in a vertical scale.
static int DIRECTION_FORWARD
          Scale values increase from left to right in a horizontal scale and from bottom to top in a vertical scale.
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  JCAbstractNeedle.InteractionType[] interactionTypes
          Interaction type to enum mapping.
protected  JCAbstractScale.Direction[] linearDirections
           
static int NEEDLE_ARROW
          Needle style is an arrow polygon using these points.
static int NEEDLE_CIRCLE
          Needle style is a circle.
static int NEEDLE_POINTER
          A pointer needle using these points.
static int NEEDLE_RECTANGLE
          Needle style is a rectangle.
static int NEEDLE_TAILED_ARROW
          Needle style is a tailed arrow polygon.
static int NEEDLE_TAILED_POINTER
          Needles styles is a tailed pointer needle (tail extends beyond center).
static int NEEDLE_TRIANGLE
          Needle style is a triangle.
protected  com.klg.jclass.swing.gauge.JCIndicatorStyle[] needleStyles
           
static int TICK_CIRCLE
          Circle tick style.
static int TICK_DIAMOND
          Diamond tick style.
static int TICK_LINE
          Line tick style.
static int TICK_RECTANGLE
          Rectangle tick style.
static int TICK_REVERSE_TRIANGLE
          Reverse Triangle tick style.
static int TICK_TRIANGLE
          Triangle tick style.
protected  com.klg.jclass.swing.gauge.JCTickStyle[] tickStyles
          JCTickStyle to enum mapping.
 
Fields inherited from class com.klg.jclass.swing.gauge.JCLinearGauge
labels
 
Fields inherited from class com.klg.jclass.swing.gauge.JCGauge
draggedNeedle, footer, footerLayoutHints, gaugeArea, gaugeAreaLayoutHints, header, headerLayoutHints, image, indicators, legend, legendLayoutHints, needles, pickListeners, repaintEnabled, scale, scaleImage, 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
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JCLinearGaugeBean()
          JCLinearGaugeBean no arg constructor.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Adds a property change listener for needle value changes.
 boolean getAutoTickGeneration()
          Returns the automatic boolean for this tick object.
 int getDirection()
          Returns the direction enum for this gauge.
 int getDirectionIndex(JCAbstractScale.Direction direction)
          Returns the enum for a given JCLinearScale.Direction.
 boolean getDrawTickLabels()
          Returns the boolean controlling the drawing of labels.
 boolean getDrawTickMarks()
          Returns the boolean controlling the drawing of ticks.
 int getInteractionTypeIndex(JCAbstractNeedle.InteractionType type)
          Returns the enum index for a needle interaction type.
 Color getNeedleColor()
          Returns the color of the needle.
 double getNeedleInnerExtent()
          Returns the inner extent of the needle as a ratio.
 int getNeedleInteractionType()
          Returns the interation type for this needle.
 double getNeedleLength()
          Returns the length of the needle as a ratio.
 double getNeedleOuterExtent()
          Returns the outer extent of the needle as a ratio.
 int getNeedleStyle()
          Returns the JCIndicatorStyle for this needle.
 int getNeedleStyleIndex(com.klg.jclass.swing.gauge.JCIndicatorStyle style)
          Returns the enum for a given JCIndicatorStyle.
 double getNeedleValue()
          Returns the scale value at which the needle is currently pointing.
 double getNeedleWidth()
          Returns the width of the needle in pixels.
 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()
          Gets the scale's color.
 double getScaleExtent()
          Returns the extent to which the scale's background will be drawn from the center.
 double getScaleMax()
          Returns the value which will appear at the scale's stopAngle.
 double getScaleMin()
          Returns the value which will appear at the scale's startAngle.
 Color getTickColor()
          Returns the color in which tick marks will be drawn.
 Font getTickFont()
          Returns the font in which ticks are to be drawn.
 Color getTickFontColor()
          Returns 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(com.klg.jclass.swing.gauge.JCTickStyle style)
          Returns the enum for a given JCTickStyle.
 double getTickWidth()
          Returns the width in pixels of the tick mark.
 double getZoomFactor()
          Gets the zoom factor for this scale.
 void removePropertyChangeListener(PropertyChangeListener l)
          Removes a property change listener for needle value changes.
 void setAutoTickGeneration(boolean b)
          Sets the automatic boolean for this tick object.
 void setDirection(int direction)
          Sets the direction enum for this gauge.
 void setDrawTickLabels(boolean b)
          Sets the boolean controlling the drawing of labels.
 void setDrawTickMarks(boolean b)
          Sets the boolean controlling the drawing of ticks.
 void setNeedleColor(Color color)
          Sets the color of the needle.
 void setNeedleInnerExtent(double innerExtent)
          Sets the inner extent of the needle as a ratio.
 void setNeedleInteractionType(int type)
          Sets the interation type for this needle.
 void setNeedleLength(double width)
          Sets the length of the needle as a ratio.
 void setNeedleOuterExtent(double outerExtent)
          Sets the outer extent of the needle as a ratio.
 void setNeedleStyle(int style)
          Sets the JCIndicatorStyle for this needle.
 void setNeedleValue(double value)
          Moves the needle to point at this scale value.
 void setNeedleWidth(double width)
          Sets the width of the needle in pixels.
 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)
          Sets the scale's color.
 void setScaleExtent(double extent)
          Sets the extent to which the scale's background will be drawn from the center.
 void setScaleMax(double max)
          Sets the value which will appear at the scale's stopAngle.
 void setScaleMin(double min)
          Sets the value which will appear at the scale's startAngle.
 void setTickColor(Color color)
          Sets the color in which tick marks will be drawn.
 void setTickFont(Font font)
          Sets the font in which ticks are to be drawn.
 void setTickFontColor(Color color)
          Sets 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 setZoomFactor(double zoomFactor)
          Sets the zoom factor for this scale.
 
Methods inherited from class com.klg.jclass.swing.gauge.JCLinearGauge
addLabel, addLabel, drawImage, getClosestNeedle, getGraphics, getLinearScale, mouseClicked, mouseDragged, paintComponent, redraw, removeLabel, serverPaint, serverSnapshot, setGraphics, setScale, setScale, valueToPosition
 
Methods inherited from class com.klg.jclass.swing.gauge.JCGauge
addIndicator, addIndicator, addNeedle, addNeedle, addPickListener, addRange, addRange, addTick, addTick, getAbout, getComponentArea, getDrawingAreaHeight, getDrawingAreaWidth, getFooter, getGaugeArea, getHeader, getImage, getIndicators, getLayoutHints, getLegend, getNeedles, getRanges, getRepaintEnabled, getScale, getScaleImage, getSnapToValue, getTicks, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, pick, removeIndicator, removeNeedle, removePickListener, removeRange, removeTick, sendPickEvent, setAbout, setFooter, setGaugeArea, setHeader, setImage, setIndicatorScales, setLegend, setNeedleScales, setRepaintEnabled, setScaleImage, setSnapToValue
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.klg.jclass.util.legend.LegendComponentLayoutUser
getPreferredSize
 

Field Detail

INTERACTION_NONE

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

See Also:
Constant Field Values

INTERACTION_DRAG

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

See Also:
Constant Field Values

INTERACTION_CLICK

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

See Also:
Constant Field Values

INTERACTION_CLICK_DRAG

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

See Also:
Constant Field Values

interactionTypes

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


TICK_CIRCLE

public static final int TICK_CIRCLE
Circle tick style.

See Also:
Constant Field Values

TICK_DIAMOND

public static final int TICK_DIAMOND
Diamond tick style.

See Also:
Constant Field Values

TICK_LINE

public static final int TICK_LINE
Line tick style.

See Also:
Constant Field Values

TICK_RECTANGLE

public static final int TICK_RECTANGLE
Rectangle tick style.

See Also:
Constant Field Values

TICK_REVERSE_TRIANGLE

public static final int TICK_REVERSE_TRIANGLE
Reverse Triangle tick style.

See Also:
Constant Field Values

TICK_TRIANGLE

public static final int TICK_TRIANGLE
Triangle tick style.

See Also:
Constant Field Values

tickStyles

protected com.klg.jclass.swing.gauge.JCTickStyle[] tickStyles
JCTickStyle to enum mapping.


NEEDLE_RECTANGLE

public static final int NEEDLE_RECTANGLE
Needle style is a rectangle.

See Also:
Constant Field Values

NEEDLE_CIRCLE

public static final int NEEDLE_CIRCLE
Needle style is a circle.

See Also:
Constant Field Values

NEEDLE_POINTER

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

See Also:
Constant Field Values

NEEDLE_TAILED_POINTER

public static final int NEEDLE_TAILED_POINTER
Needles styles is a tailed pointer needle (tail extends beyond center).

See Also:
Constant Field Values

NEEDLE_ARROW

public static final int NEEDLE_ARROW
Needle style is an arrow polygon using these points.

See Also:
Constant Field Values

NEEDLE_TAILED_ARROW

public static final int NEEDLE_TAILED_ARROW
Needle style is a tailed arrow polygon.

See Also:
Constant Field Values

NEEDLE_TRIANGLE

public static final int NEEDLE_TRIANGLE
Needle style is a triangle.

See Also:
Constant Field Values

needleStyles

protected com.klg.jclass.swing.gauge.JCIndicatorStyle[] needleStyles

DIRECTION_BACKWARD

public static final int DIRECTION_BACKWARD
Scale values increase from right to left in a horizontal scale and from top to bottom in a vertical scale.

See Also:
JCTick, Constant Field Values

DIRECTION_FORWARD

public static final int DIRECTION_FORWARD
Scale values increase from left to right in a horizontal scale and from bottom to top in a vertical scale.

See Also:
JCTick, Constant Field Values

linearDirections

protected JCAbstractScale.Direction[] linearDirections
Constructor Detail

JCLinearGaugeBean

public JCLinearGaugeBean()
JCLinearGaugeBean no arg constructor.

Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Adds a property change listener for needle value changes.

Overrides:
addPropertyChangeListener in class JComponent
Parameters:
l -

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Removes a property change listener for needle value changes.

Overrides:
removePropertyChangeListener in class JComponent
Parameters:
l -

getNeedleLength

public double getNeedleLength()
Returns the length of the needle as a ratio.

Returns:
the length of the needle in pixels

setNeedleLength

public void setNeedleLength(double width)
Sets the length of the needle as a ratio.

Parameters:
width - the width in pixels

getNeedleInnerExtent

public double getNeedleInnerExtent()
Returns the inner extent of the needle as a ratio.

Returns:
the inner extent of the needle in pixels

setNeedleInnerExtent

public void setNeedleInnerExtent(double innerExtent)
Sets the inner extent of the needle as a ratio.

Parameters:
innerExtent - extent the needle in pixels

getNeedleOuterExtent

public double getNeedleOuterExtent()
Returns the outer extent of the needle as a ratio.

Returns:
the outer extent of the needle in pixels

setNeedleOuterExtent

public void setNeedleOuterExtent(double outerExtent)
Sets the outer extent of the needle as a ratio.

Parameters:
outerExtent - extent the outer extent in pixels

getNeedleWidth

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

Returns:
the width of the needle in pixels

setNeedleWidth

public void setNeedleWidth(double width)
Sets the width of the needle in pixels.

Parameters:
width - the width in pixels

getNeedleValue

public double getNeedleValue()
Returns 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)
Moves the needle to point at this scale value. Fires 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 JCAbstractNeedle.InteractionType for this needle

setNeedleInteractionType

public void setNeedleInteractionType(int type)
Sets the interation type for this needle.

Parameters:
type - the JCAbstractNeedle.InteractionType for this needle, one of:
  • InteractionType.NONE
  • InteractionType.DRAG
  • InteractionType.CLICK
  • InteractionType.CLICK_DRAG

getNeedleStyle

public int getNeedleStyle()
Returns the JCIndicatorStyle for this needle.

Returns:
the JCIndicatorStyle of this needle

setNeedleStyle

public void setNeedleStyle(int style)
Sets the JCIndicatorStyle for this needle.

Parameters:
style - the JCIndicatorStyle for this needle

getNeedleColor

public Color getNeedleColor()
Returns the color of the needle.

Returns:
the color of the needle

setNeedleColor

public void setNeedleColor(Color color)
Sets the color of the needle.

Parameters:
color - the color of the needle

getScaleColor

public Color getScaleColor()
Gets the scale's color.

Returns:
color the scale's color

setScaleColor

public void setScaleColor(Color color)
Sets the scale's color.

Parameters:
color - the scale color

getScaleExtent

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

Returns:
the extent

setScaleExtent

public void setScaleExtent(double extent)
Sets the extent to which the scale's background will be drawn from the center. This is a fraction of the scale's radius.

Parameters:
extent - the extent

getScaleMin

public double getScaleMin()
Returns 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)
Sets 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()
Returns 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)
Sets the value which will appear at the scale's stopAngle.

Parameters:
max - the value which will appear at the scale's stopAngle

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:
b - 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:
value - 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:
value - 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:
value - 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:
b - 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:
b - 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:
width - 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:
extent - 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:
extent - 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:
style - 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:
extent -

getTickFont

public Font getTickFont()
Returns 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)
Sets the font in which ticks are to be drawn.

Parameters:
font - the font in which ticks are to be drawn

getTickFontColor

public Color getTickFontColor()
Returns 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)
Sets the color in which tick labels will be drawn.

Parameters:
color - the color in which tick labels will be drawn

getTickColor

public Color getTickColor()
Returns 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)
Sets 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:
b - a boolean indicating whether or not a label's precision is calculated by the gauge or set using setPrecision

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

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

getZoomFactor

public double getZoomFactor()
Gets the zoom factor for this scale.

Returns:
zoom factor

setZoomFactor

public void setZoomFactor(double zoomFactor)
Sets the zoom factor for this scale.

Parameters:
zoomFactor - zoom factor

getInteractionTypeIndex

public int getInteractionTypeIndex(JCAbstractNeedle.InteractionType type)
Returns the enum index for a needle interaction type.

Parameters:
type - the type to lookup
Returns:
the enum for this type

getTickStyleIndex

public int getTickStyleIndex(com.klg.jclass.swing.gauge.JCTickStyle style)
Returns the enum for a given JCTickStyle.

Parameters:
style - style for which the index is sought
Returns:
the index of the tick style

getNeedleStyleIndex

public int getNeedleStyleIndex(com.klg.jclass.swing.gauge.JCIndicatorStyle style)
Returns the enum for a given JCIndicatorStyle.

Parameters:
style - style for which the index is sought
Returns:
the index of the needle style

getDirectionIndex

public int getDirectionIndex(JCAbstractScale.Direction direction)
Returns the enum for a given JCLinearScale.Direction.

Parameters:
direction - direction for which the index is sought
Returns:
the index of the JCLinearScale.Direction

Copyright © 2004 Quest Software Inc..
All rights reserved.