|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
A Bean which exposes gauge properties suitable for editing in an Integrated Development Environment (IDE).
Nested Class Summary |
Nested classes inherited from class com.klg.jclass.swing.gauge.JCCircularGauge |
JCCircularGauge.GaugeType |
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 | |
protected JCAbstractScale.Direction[] |
circularDirections
|
static int |
DIRECTION_BACKWARD
Scale values increase in a counterclockwise direction. |
static int |
DIRECTION_CLOCKWISE
Scale values increase in a clockwise direction. |
static int |
DIRECTION_COUNTERCLOCKWISE
Scale values increase in a clockwise direction. |
static int |
DIRECTION_FORWARD
Scale values increase in a counterclockwise direction. |
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 JCAbstractNeedle.InteractionType[] |
interactionTypes
Interaction type to enum mapping. |
static int |
NEEDLE_ARROW
Arrow polygon using these points. |
static int |
NEEDLE_CIRCLE
Circle needle style. |
static int |
NEEDLE_POINTER
A pointer needle using these points. |
static int |
NEEDLE_RECTANGLE
Rectangle needle style. |
static int |
NEEDLE_TAILED_ARROW
Tailed Arrow polygon needle style. |
static int |
NEEDLE_TAILED_POINTER
A tailed pointer needle (tail extends beyond center). |
static int |
NEEDLE_TRIANGLE
Triangle needle style. |
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. |
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, 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 | |
JCCircularGaugeBean()
JCCircularGaugeBean 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. |
Color |
getCenterColor()
Gets the center's color. |
double |
getCenterRadius()
Gets the radius of the center. |
int |
getDirection()
Returns the direction enum for this gauge. |
int |
getDirectionIndex(JCAbstractScale.Direction direction)
Returns 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)
Returns the enum for a given JCCircularGauge.GaugeType . |
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. |
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()
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 . |
double |
getStartAngle()
Gets the start angle of the scale. |
double |
getStopAngle()
Gets the stop angle of the scale. |
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. |
int |
getType()
Returns the JCCircularGauge type for this gauge. |
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 |
setCenterColor(Color color)
Sets 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. |
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 length)
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 |
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)
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 |
setStartAngle(double angle)
Sets the start angle of the scale. |
void |
setStopAngle(double angle)
Sets the stop angle of the scale. |
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 |
setType(int type)
Sets the JCCircularGaugeBean type for this gauge. |
void |
setZoomFactor(double zoomFactor)
Sets the zoom factor for this scale. |
Methods inherited from class com.klg.jclass.swing.gauge.JCCircularGauge |
addLabel, addLabel, drawImage, getArcBounds, getCenter, getCircularScale, getClosestNeedle, getGaugeType, getGraphics, mouseClicked, mouseDragged, paintComponent, redraw, removeLabel, serverPaint, serverSnapshot, setCenter, setCenter, setGaugeType, setGraphics, setScale, setScale, valueToAngle |
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 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 |
public static final int INTERACTION_NONE
public static final int INTERACTION_DRAG
public static final int INTERACTION_CLICK
public static final int INTERACTION_CLICK_DRAG
protected JCAbstractNeedle.InteractionType[] interactionTypes
public static final int TICK_CIRCLE
public static final int TICK_DIAMOND
public static final int TICK_LINE
public static final int TICK_RECTANGLE
public static final int TICK_REVERSE_TRIANGLE
public static final int TICK_TRIANGLE
protected com.klg.jclass.swing.gauge.JCTickStyle[] tickStyles
JCTickStyle
to enum mapping.
public static final int NEEDLE_RECTANGLE
public static final int NEEDLE_CIRCLE
public static final int NEEDLE_POINTER
public static final int NEEDLE_TAILED_POINTER
public static final int NEEDLE_ARROW
public static final int NEEDLE_TAILED_ARROW
public static final int NEEDLE_TRIANGLE
protected com.klg.jclass.swing.gauge.JCIndicatorStyle[] needleStyles
public static final int TYPE_FULL_CIRCLE
public static final int TYPE_TOP_HALF_CIRCLE
public static final int TYPE_BOTTOM_HALF_CIRCLE
public static final int TYPE_LEFT_HALF_CIRCLE
public static final int TYPE_RIGHT_HALF_CIRCLE
public static final int TYPE_UPPER_RIGHT_QUARTER_CIRCLE
public static final int TYPE_LOWER_RIGHT_QUARTER_CIRCLE
public static final int TYPE_UPPER_LEFT_QUARTER_CIRCLE
public static final int TYPE_LOWER_LEFT_QUARTER_CIRCLE
protected JCCircularGauge.GaugeType[] gaugeTypes
public static final int DIRECTION_CLOCKWISE
JCTick
,
Constant Field Valuespublic static final int DIRECTION_COUNTERCLOCKWISE
JCTick
,
Constant Field Valuespublic static final int DIRECTION_FORWARD
JCTick
,
Constant Field Valuespublic static final int DIRECTION_BACKWARD
JCTick
,
Constant Field Valuesprotected JCAbstractScale.Direction[] circularDirections
Constructor Detail |
public JCCircularGaugeBean()
JCCircularGaugeBean
no arg constructor.
Method Detail |
public void addPropertyChangeListener(PropertyChangeListener l)
addPropertyChangeListener
in class JComponent
l
- public void removePropertyChangeListener(PropertyChangeListener l)
removePropertyChangeListener
in class JComponent
l
- public double getCenterRadius()
public void setCenterRadius(double radius)
radius
parameter is a decimal
fraction of the scale's radius.
radius
- the radius of the center as a proportion of the circular
scale's radiuspublic Color getCenterColor()
public void setCenterColor(Color color)
color
- the center's colorpublic double getNeedleLength()
public void setNeedleLength(double length)
length
- the length in pixelspublic double getNeedleInnerExtent()
public void setNeedleInnerExtent(double innerExtent)
innerExtent
- extent the needle in pixelspublic double getNeedleOuterExtent()
public void setNeedleOuterExtent(double outerExtent)
outerExtent
- the outer extent in pixelspublic double getNeedleWidth()
public void setNeedleWidth(double width)
width
- the width in pixelspublic double getNeedleValue()
public void setNeedleValue(double value)
needleValue
property change event.
value
- the value at which to pointpublic int getNeedleInteractionType()
JCAbstractNeedle.InteractionType
for this needlepublic void setNeedleInteractionType(int type)
type
- the JCAbstractNeedle.InteractionType
for this
needle; one of: InteractionType.NONE
InteractionType.DRAG
InteractionType.CLICK
InteractionType.CLICK_DRAG
public int getNeedleStyle()
JCIndicatorStyle
for this needle.
JCIndicatorStyle
of this needlepublic void setNeedleStyle(int style)
JCIndicatorStyle
for this needle.
style
- the JCIndicatorStyle
for this needlepublic Color getNeedleColor()
public void setNeedleColor(Color color)
color
- the color of the needlepublic Color getScaleColor()
public void setScaleColor(Color color)
color
- the scale colorpublic double getStartAngle()
public void setStartAngle(double angle)
angle
- the angle at which the scale starts; angles
increase counterclockwise from 3 o'clock -- 0 degreespublic double getStopAngle()
public void setStopAngle(double angle)
angle
- the angle at which the scale terminates; angles
increase counterclockwise from 3 o'clock -- 0 degreespublic double getScaleExtent()
public void setScaleExtent(double extent)
extent
- the extentpublic double getScaleMin()
startAngle
.
startAngle
public void setScaleMin(double min)
startAngle
.
min
- the value which will appear at the scale's startAngle
public double getScaleMax()
stopAngle
.
stopAngle
public void setScaleMax(double max)
stopAngle
.
max
- the value which will appear at the scale's stopAngle
public boolean getPaintCompleteBackground()
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
.
true
means paint all the background; false
means just the area spanned by scale's sweep anglepublic void setPaintCompleteBackground(boolean b)
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
.
b
- true
means paint all of the background
consistent with the gauge typepublic boolean getAutoTickGeneration()
automatic
boolean for this tick object.
true
means ticks
and increments are dynamically determined by the gauge; otherwise,
startValue
, stopValue
, and
incrementValue
are used to lay out tickspublic void setAutoTickGeneration(boolean b)
automatic
boolean for this tick object.
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 tickspublic double getTickStartValue()
startValue
public void setTickStartValue(double value)
value
- the startValue
public double getTickStopValue()
stopValue
public void setTickStopValue(double value)
value
- the stopValue
public double getTickIncrement()
incrementValue
along the scale.
public void setTickIncrement(double value)
incrementValue
along the scale.
value
- the spacing between adjacent tick markspublic boolean getDrawTickLabels()
true
means draw the labels, false
means hide the labels.
public void setDrawTickLabels(boolean b)
true
means draw the labels, false
means hide the labels.
b
- the boolean controlling the drawing of labelspublic boolean getDrawTickMarks()
True
means draw the ticks, false
means hide the ticks.
public void setDrawTickMarks(boolean b)
true
means draw the ticks, false
means hide the ticks.
b
- the boolean controlling the drawing of tickspublic double getTickWidth()
public void setTickWidth(double width)
width
- the width of the tick to be drawn in pixelspublic double getTickInnerExtent()
innerExtent
of the tick markpublic void setTickInnerExtent(double extent)
extent
- the inner extent of the tick markpublic double getTickOuterExtent()
outerExtent
of the tick markpublic void setTickOuterExtent(double extent)
extent
- the outerExtent
of the tick markpublic int getTickStyle()
JCTickStyle
controlling the shape of the tick.
JCTickStyle
public void setTickStyle(int style)
JCTickStyle
controlling the shape of the tick.
Users may define their own tick style, if desired.
style
- one of the built-in tick styles, or a user-supplied styleJCTickStyle
public double getTickLabelExtent()
public void setTickLabelExtent(double extent)
extent
- the extent at which labels will be drawnpublic Font getTickFont()
public void setTickFont(Font font)
font
- the font in which ticks are to be drawnpublic Color getTickFontColor()
public void setTickFontColor(Color color)
color
- the color in which tick labels will be drawnpublic Color getTickColor()
public void setTickColor(Color color)
color
- the color in which tick marks will be drawnpublic boolean getPrecisionUseDefault()
true
, uses gauge-determined precision for tick labels;
otherwise, uses setPrecision
to label tick marks.
setPrecision
public void setPrecisionUseDefault(boolean b)
true
, uses gauge-determined precision for tick labels;
otherwise, uses setPrecision
to label tick marks.
b
- a boolean indicating whether or not a label's precision is
calculated by the gauge or set using setPrecision
public int getPrecision()
precisionUseDefault
is set to
true
.
public void setPrecision(int precision)
precisionUseDefault
is set to
true
.
precision
- an integerpublic int getType()
JCCircularGauge
type for this gauge.
JCCircularGaugeBean
type of this gaugepublic void setType(int type)
JCCircularGaugeBean
type for this gauge.
type
- the JCCircularGaugeBean
type for this gaugepublic int getDirection()
public void setDirection(int direction)
direction
- the direction enum for this gaugepublic double getZoomFactor()
public void setZoomFactor(double zoomFactor)
zoomFactor
- zoom factorpublic int getInteractionTypeIndex(JCAbstractNeedle.InteractionType type)
type
- the type to lookup
public int getTickStyleIndex(com.klg.jclass.swing.gauge.JCTickStyle style)
JCTickStyle
.
style
- for which the index is sought
public int getNeedleStyleIndex(com.klg.jclass.swing.gauge.JCIndicatorStyle style)
JCIndicatorStyle
.
style
- for which the index is sought
public int getGaugeTypeIndex(JCCircularGauge.GaugeType type)
JCCircularGauge.GaugeType
.
type
- for which the index is sought
JCCircularGauge.GaugeType
public int getDirectionIndex(JCAbstractScale.Direction direction)
JCCircularScale.Direction
.
direction
- for which the index is sought
JCCircularScale.Direction
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |