|
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 | +--com.klg.jclass.swing.gauge.GaugeConstraint | +--com.klg.jclass.swing.gauge.LinearConstraint
A LinearConstraint
is one that provides layout information for
a component that needs to be placed on a linear gauge. It provides
information to the layout by giving a distance either horizontally or
vertically (depending on the orientation of the gauge's linear scale) from
top-left corner of the scale and a position from the top or left of the
scale.
Field Summary | |
protected double |
position
The position at which to place a label on the scale. |
Fields inherited from class com.klg.jclass.swing.gauge.GaugeConstraint |
extent, gauge |
Constructor Summary | |
LinearConstraint(com.klg.jclass.swing.gauge.JCGauge gauge,
double extent,
double position)
Constructor for LinearConstraint using a JComponent
as the component. |
|
LinearConstraint(com.klg.jclass.swing.gauge.JCGauge gauge,
double extent,
int position)
Constructor for LinearConstraint using a JComponent
as the component. |
Method Summary | |
int |
getPosition()
Returns the position (normally corresponding to a particular scale value) at which this component will be placed on the scale as an integer |
double |
getPositionAsDouble()
Returns the position (normally corresponding to a particular scale value) at which this component will be placed on the scale as a double. |
void |
setPosition(int position)
Sets the position (normally corresponding to a particular scale value) at which this component will be placed as an integer. |
void |
setPositionAsDouble(double position)
Sets the position (normally corresponding to a particular scale value) at which this component will be placed as a double. |
String |
toString()
Return a string version of this constraint |
Methods inherited from class com.klg.jclass.swing.gauge.GaugeConstraint |
getExtent, getGauge, setExtent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected double position
Constructor Detail |
public LinearConstraint(com.klg.jclass.swing.gauge.JCGauge gauge, double extent, int position)
LinearConstraint
using a JComponent
as the component.
extent
- The distance from the top-left of the rectangle. The distance
is vertical for horizontal scales and horizontal for vertical scales and
is specified as a ratio of this distance in pixels to the height or
width of the scale.position
- The position (normally corresponding to a particular scale
value) at which this component will be placed (at an "extent" distance
from the top or left of the scale). The position is specified as a
percent from the width of the scale (horizontal orientation) or the
height of the scale (vertical orientation). Percentage specified as
an integer.public LinearConstraint(com.klg.jclass.swing.gauge.JCGauge gauge, double extent, double position)
LinearConstraint
using a JComponent
as the component.
extent
- The distance from the top-left of the rectangle. The distance
is vertical for horizontal scales and horizontal for vertical scales and
is specified as a ratio of this distance in pixels to the height or
width of the scale.position
- The position (normally corresponding to a particular scale
value) at which this component will be placed (at an "extent" distance
from the top or left of the scale). The position is specified as a
percent from the width of the scale (horizontal orientation) or the
height of the scale (vertical orientation). Percentage specified as an
double.Method Detail |
public int getPosition()
public void setPosition(int position)
position
- The position at which this component will be placedpublic double getPositionAsDouble()
public void setPositionAsDouble(double position)
position
- The position at which this component will be placedpublic String toString()
toString
in class Object
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |