JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.swing.gauge
Interface JCIndicator

All Known Subinterfaces:
JCNeedle
All Known Implementing Classes:
JCAbstractIndicator, JCAbstractNeedle

public interface JCIndicator

JCIndicator interface for indicators. Those wishing to use their own indicators should implement this interface.


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).
 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?".
 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.
 void setValue(double value)
          Sets the scale value to which this indicator should point.
 

Method Detail

getIndicatorStyle

public com.klg.jclass.swing.gauge.JCIndicatorStyle getIndicatorStyle()
Returns the JCIndicatorStyle for this indicator.

Returns:
the JCIndicatorStyle of this indicator

getIndicatorWidth

public double getIndicatorWidth()
Returns the indicator width in pixels.

Returns:
the indicator width in pixels

getInnerExtent

public 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). For example, in the circular case, 0.75 means draw out to 75% of the scale's radius.

Returns:
The inner_exent of this indicator as a ratio of the scale's width, height, or radius (depending on the scale's type and orientation)

getOuterExtent

public 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). For example, in the circular case, 0.75 means draw out to 75% of the scale's radius.

Returns:
The outer_exent of this indicator as a ratio of the scale's width, height, or radius (depending on the scale's type and orientation)

getValue

public double getValue()
Returns the scale value at which this indicator is currently pointing.

Returns:
the current value pointed to by this indicator

getScale

public com.klg.jclass.swing.gauge.JCScale getScale()
Returns the scale associated with this indicator.

Returns:
the scale for the JCAbstractIndicator component

isReversed

public boolean isReversed()
Asks :"Is the indicator reversed?".

Returns:
whether the indicator is reversed or not

setIndicatorStyle

public void setIndicatorStyle(com.klg.jclass.swing.gauge.JCIndicatorStyle indicatorStyle)
Sets the JCIndicatorStyle for this indicator.

Parameters:
indicatorStyle - the JCIndicatorStyle for this indicator

setIndicatorWidth

public void setIndicatorWidth(double indicatorWidth)
Sets the indicator width in pixels.

Parameters:
indicatorWidth - the indicator width in pixels

setInnerExtent

public 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). For example, in the circular case, 0.75 means draw out to 75% of the scale's radius.

Parameters:
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)

setOuterExtent

public 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). For example, in the circular case, 0.75 means draw out to 75% of the scale's radius.

Parameters:
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)

setReversed

public void setReversed(boolean reversed)
Sets the reversed property of the indicator. If the indicator is reversed it draws in the opposite direction (for example, for linear scales it points left or up instead of right or down, for circular scales it points towards the center instead of away from the center).

Parameters:
reversed - is the indicator's direction reversed

setValue

public void setValue(double value)
Sets the scale value to which this indicator should point.

Parameters:
value - the value at which to point

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