|
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.JCAbstractRange | +--com.klg.jclass.swing.gauge.JCCircularRange
A circular range is used to demarcate some sub-portion of the scale. For example, on a tachometer gauge you could have a range to delimit the "red line" range of revolutions per minute (rpm). A gauge can have zero or more ranges associated with it.
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 | |
protected int |
innerArcStartCompensator
|
protected int |
innerArcStopCompensator
|
Fields inherited from class com.klg.jclass.swing.gauge.JCAbstractRange |
image, innerExtent, outerExtent, rangeCounter, rangeName, scale, scaleImage, startValue, stopValue |
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 | |
JCCircularRange(Color foreground,
com.klg.jclass.swing.gauge.JCCircularScale scale,
double innerExtent,
double outerExtent,
double startValue,
double stopValue)
Creates a circular range. |
Method Summary | |
protected void |
drawImage(Graphics g,
Image image,
Rectangle bounds)
|
protected Polygon |
getCircularRangeShape(double startAngle,
double stopAngle,
double radiusSize,
double innerRadius,
double outerRadius)
|
com.klg.jclass.swing.gauge.JCCircularScale |
getCircularScale()
Returns the circular scale associated with this range. |
int |
getInnerArcStartCompensator()
Compensates for awt drawArc precision
problems when drawing the inner arc
of the range. |
int |
getInnerArcStopCompensator()
Compensates for awt drawArc precision
problems when drawing the inner arc
of the range. |
Dimension |
getPreferredSize()
Returns the preferred size of this range, which will be the preferred size of the scale. |
void |
paintComponent(Graphics g)
This routine will draw a circular range. |
void |
redraw()
Call this instead of paint so that the repaintEnabled flag can
be checked. |
void |
setInnerArcStartCompensator(int innerArcStartCompensator)
Compensates for awt drawArc precision
problems when drawing the inner arc
of the range. |
void |
setInnerArcStopCompensator(int innerArcStopCompensator)
Compensates for awt drawArc precision
problems when drawing the inner arc
of the range. |
Methods inherited from class com.klg.jclass.swing.gauge.JCAbstractRange |
getImage, getInnerExtent, getOuterExtent, getRangeName, getScale, getScaleImage, getStartValue, getStopValue, setImage, setInnerExtent, setOuterExtent, setRangeName, setScaleImage, setStartValue, setStopValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.klg.jclass.swing.gauge.JCRange |
getForeground |
Field Detail |
protected int innerArcStartCompensator
protected int innerArcStopCompensator
Constructor Detail |
public JCCircularRange(Color foreground, com.klg.jclass.swing.gauge.JCCircularScale scale, double innerExtent, double outerExtent, double startValue, double stopValue)
foreground
- the range's colorscale
- the scale associated with this rangeinnerExtent
- the ratio of the radius's length to start drawing this
range from the center (for example, 0.8 means start
drawing this range 80% of the radius's size from the center)outerExtent
- the ratio of the radius's length to end drawing this
range from the center (for example, 0.9 means stop
drawing this range 90% of the radius's size from the center)startValue
- the scale value (not angle) at which to begin the rangestopValue
- the scale value (not angle) at which to stop the rangeMethod Detail |
public com.klg.jclass.swing.gauge.JCCircularScale getCircularScale()
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public int getInnerArcStartCompensator()
drawArc
precision
problems when drawing the inner arc
of the range. This applies to the J version only.
public void setInnerArcStartCompensator(int innerArcStartCompensator)
drawArc
precision
problems when drawing the inner arc
of the range. This applies to the J version only.
innerArcStartCompensator
- the amount by which to overdraw in the
inner arc start anglepublic int getInnerArcStopCompensator()
drawArc
precision
problems when drawing the inner arc
of the range. This applies to the J version only.
public void setInnerArcStopCompensator(int innerArcStopCompensator)
drawArc
precision
problems when drawing the inner arc
of the range. This applies to the J version only.
innerArcStopCompensator
- the amount by which to overdraw in the
inner arc stop anglepublic void paintComponent(Graphics g)
paintComponent
in class JComponent
g
- public void redraw()
repaintEnabled
flag can
be checked. No repaint will occur if that flag is false
.
redraw
in class JCAbstractRange
protected Polygon getCircularRangeShape(double startAngle, double stopAngle, double radiusSize, double innerRadius, double outerRadius)
protected void drawImage(Graphics g, Image image, Rectangle bounds)
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |