|
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.JCAbstractIndicator
An indicator points to a particular value on its associated scale. There may be multiple indicators associated with a scale.
JCIndicatorStyle
,
Serialized FormNested 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 com.klg.jclass.swing.gauge.JCIndicatorStyle |
indicatorStyle
The indicator style, one of: JCIndicatorStyle.ARROW
JCIndicatorStyle.CIRCLE
JCIndicatorStyle.POINTER
JCIndicatorStyle.RECTANGLE
JCIndicatorStyle.TRIANGLE
JCIndicatorStyle.TAILED_ARROW
JCIndicatorStyle.TAILED_POINTER
or a user-defined instance of the JCIndicatorStyle class. |
protected double |
indicatorWidth
The indicator's width in pixels. |
protected double |
inner_extent
The inner extent of the indicator as a ratio of the scale's radius. |
protected double |
outer_extent
The outer extent of the indicator as a ratio of the scale's radius. |
protected boolean |
reversed
Asks: "Is the indicator reversed?". |
protected com.klg.jclass.swing.gauge.JCScale |
scale
The indicator's associated scale. |
protected double |
value
The scale value at which this indicator should point. |
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 | |
JCAbstractIndicator(Color foreground,
double indicatorWidth,
com.klg.jclass.swing.gauge.JCScale scale,
boolean visible,
double inner_extent,
double outer_extent,
com.klg.jclass.swing.gauge.JCIndicatorStyle indicatorStyle,
double value)
Creates an indicator. |
|
JCAbstractIndicator(com.klg.jclass.swing.gauge.JCScale scale)
Creates a indicator given a scale. |
Method Summary | |
com.klg.jclass.swing.gauge.JCIndicatorStyle |
getIndicatorStyle()
Returns the JCIndicatorStyle for this indicator. |
double |
getIndicatorWidth()
Returns the indicator width in pixels. |
double |
getInnerExtent()
Returns the inner extent of this indicator as a ratio of the scale's width, height, or radius (depending on the scale's type and orientation). |
double |
getOuterExtent()
Returns the outer extent of this indicator as a ratio of the scale's width, height, or radius (depending on the scale's type and orientation). |
Dimension |
getPreferredSize()
Returns the preferred size for this component. |
com.klg.jclass.swing.gauge.JCScale |
getScale()
Returns the scale associated with this indicator. |
double |
getValue()
Returns the scale value at which this indicator is currently pointing. |
boolean |
isReversed()
Asks :"Is the indicator reversed?". |
abstract void |
paint(Graphics g)
This routine actually draws the indicator object on the screen. |
void |
redraw()
Call this instead of paint so that the repaintEnabled flag can
be checked. |
void |
setIndicatorStyle(com.klg.jclass.swing.gauge.JCIndicatorStyle indicatorStyle)
Sets the JCIndicatorStyle for this indicator. |
void |
setIndicatorWidth(double indicatorWidth)
Sets the indicator width in pixels. |
void |
setInnerExtent(double inner_extent)
Sets the inner extent of this indicator as a ratio of the scale's width, height, or radius (depending on the scale's type and orientation). |
void |
setOuterExtent(double outer_extent)
Sets the outer extent of this indicator as a ratio of the scale's width, height, or radius (depending on the scale's type and orientation). |
void |
setReversed(boolean reversed)
Sets the reversed property of the indicator. |
protected void |
setScale(com.klg.jclass.swing.gauge.JCScale scale)
Sets the indicator's scale to the supplied value. |
void |
setValue(double value)
Sets the scale value to which this indicator should point. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected com.klg.jclass.swing.gauge.JCScale scale
protected double indicatorWidth
protected boolean reversed
protected double inner_extent
protected double outer_extent
protected com.klg.jclass.swing.gauge.JCIndicatorStyle indicatorStyle
JCIndicatorStyle.ARROW
JCIndicatorStyle.CIRCLE
JCIndicatorStyle.POINTER
JCIndicatorStyle.RECTANGLE
JCIndicatorStyle.TRIANGLE
JCIndicatorStyle.TAILED_ARROW
JCIndicatorStyle.TAILED_POINTER
JCIndicatorStyle
class.
protected double value
Constructor Detail |
public JCAbstractIndicator(com.klg.jclass.swing.gauge.JCScale scale)
scale
- the associated circular scalepublic JCAbstractIndicator(Color foreground, double indicatorWidth, com.klg.jclass.swing.gauge.JCScale scale, boolean visible, double inner_extent, double outer_extent, com.klg.jclass.swing.gauge.JCIndicatorStyle indicatorStyle, double value)
foreground
- the indicator's colorindicatorWidth
- the indicator's width in pixelsscale
- the associated circular scalevisible
- a Boolean that controls the visibility of the indicatorinner_extent
- the indicator's inner_extent
, expressed as
a ratio of the indicator's inner position to the top or center of the
associated scaleouter_extent
- the indicator's outer_extent
, expressed as
a ratio of the indicator's outer position to the top or center of the
associated scaleindicatorStyle
- indicator styles are kept in
JCIndicatorStyle
; user-defined indicator styles may be
passed to JCIndicatorStyle
's constructorvalue
- the indicator's value; the indicator points to this value on its
associated scaleMethod Detail |
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public abstract void paint(Graphics g)
paint
in class JComponent
g
- public com.klg.jclass.swing.gauge.JCScale getScale()
getScale
in interface JCIndicator
JCAbstractIndicator
componentprotected void setScale(com.klg.jclass.swing.gauge.JCScale scale)
scale
- the new scalepublic double getValue()
getValue
in interface JCIndicator
public void setValue(double value)
setValue
in interface JCIndicator
value
- the value at which to pointpublic double getInnerExtent()
getInnerExtent
in interface JCIndicator
inner_exent
of this indicator as a ratio of the
scale's width, height, or radius (depending on the scale's type and
orientation)public void setInnerExtent(double inner_extent)
setInnerExtent
in interface JCIndicator
inner_extent
- the inner extent of this indicator as a ratio of the
scale's width, height, or radius (depending on the scale's type and
orientation)public double getOuterExtent()
getOuterExtent
in interface JCIndicator
outer_exent
of this indicator as a ratio of the
scale's width, height, or radius (depending on the scale's type and
orientation)public void setOuterExtent(double outer_extent)
setOuterExtent
in interface JCIndicator
outer_extent
- the outer extent of this indicator as a ratio of the
scale's width, height, or radius (depending on the scale's type and
orientation)public com.klg.jclass.swing.gauge.JCIndicatorStyle getIndicatorStyle()
JCIndicatorStyle
for this indicator.
getIndicatorStyle
in interface JCIndicator
JCIndicatorStyle
of this indicatorpublic void setIndicatorStyle(com.klg.jclass.swing.gauge.JCIndicatorStyle indicatorStyle)
JCIndicatorStyle
for this indicator.
setIndicatorStyle
in interface JCIndicator
indicatorStyle
- the JCIndicatorStyle
for this indicatorpublic double getIndicatorWidth()
getIndicatorWidth
in interface JCIndicator
public void setIndicatorWidth(double indicatorWidth)
setIndicatorWidth
in interface JCIndicator
indicatorWidth
- the indicator width in pixelspublic boolean isReversed()
isReversed
in interface JCIndicator
public void setReversed(boolean reversed)
setReversed
in interface JCIndicator
reversed
- is the indicator's direction reversedpublic void redraw()
repaintEnabled
flag can
be checked. No repaint will occur if that flag is false
.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |