|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectli.netcat.chart.util.RectValueLocation
Implementation of a rectangular value location.
Constructor Summary | |
RectValueLocation(float trailX,
float trailY,
float directionX,
float directionY,
float length,
float thickness)
Constructs a new RectValueLocation and initializes all of its fields to the given values. |
Method Summary | |
float |
getLeadX()
Returns the x-coordinate of the lead point. |
float |
getLeadY()
Returns the y-coordinate of the lead point. |
float |
getTrailX()
Returns the x-coordinate of the trail point. |
float |
getTrailY()
Returns the y-coordinate of the trail point. |
float |
getX(float lenghtPosition,
float lenghtShift,
float crossPosition,
float crossShift)
Returns the x-coordinate of an arbitrary point in this value location. |
float |
getY(float lenghtPosition,
float lenghtShift,
float crossPosition,
float crossShift)
Returns the y-coordinate of an arbitrary point in this value location. |
void |
move(float dx,
float dy)
Moves this value location by the given value. |
void |
reflectX()
Reflects this value location at the straight line x=0. |
void |
reflectXY()
Reflects this value location at the straight line x=y. |
void |
reflectY()
Reflects this value location at the straight line y=0. |
void |
setCoordinates(float trailX,
float trailY,
float directionX,
float directionY,
float length,
float thickness)
Sets the coordinates to this value location. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RectValueLocation(float trailX, float trailY, float directionX, float directionY, float length, float thickness)
RectValueLocation
and initializes all of its fields to the given values.
trailX
- The x-coordinate of the trail point.trailY
- The y-coordinate of the trail point.directionX
- The length of the unit vector in x direction.directionY
- The length of the unit vector in y direction.length
- The length of the value location.thickness
- The thickness of the value location.Method Detail |
public void setCoordinates(float trailX, float trailY, float directionX, float directionY, float length, float thickness)
trailX
- The x-coordinate of the trail point.trailY
- The y-coordinate of the trail point.directionX
- The length of the unit vector in x direction.directionY
- The length of the unit vector in y direction.length
- The length of the value location.thickness
- The thickness of the value location.public void reflectX()
public void reflectY()
public void reflectXY()
public float getLeadX()
ValueLocation
getLeadX
in interface ValueLocation
public float getLeadY()
ValueLocation
getLeadY
in interface ValueLocation
public float getTrailX()
ValueLocation
getTrailX
in interface ValueLocation
public float getTrailY()
ValueLocation
getTrailY
in interface ValueLocation
public float getX(float lenghtPosition, float lenghtShift, float crossPosition, float crossShift)
ValueLocation
getX
in interface ValueLocation
lenghtPosition
- The relative position in the length direction. 0.0 refers to the trail point, 1.0 to the lead point.lenghtShift
- The additional shift of the result position in the length direction in pixel.crossPosition
- The relative position in the crosswise direction. 0.5 refers to the middle, 0.0 and 1.0 to the borders.crossShift
- The additional shift of the result position in the crosswise direction in pixel.public float getY(float lenghtPosition, float lenghtShift, float crossPosition, float crossShift)
ValueLocation
getY
in interface ValueLocation
lenghtPosition
- The relative position in the length direction. 0.0 refers to the trail point, 1.0 to the lead point.lenghtShift
- The additional shift of the result position in the length direction in pixel.crossPosition
- The relative position in the crosswise direction. 0.5 refers to the middle, 0.0 and 1.0 to the borders.crossShift
- The additional shift of the result position in the crosswise direction in pixel.public void move(float dx, float dy)
ValueLocation
move
in interface ValueLocation
dx
- Movement in the x direction.dy
- Movement in the y direction.
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |