ChartCat 1.2

li.netcat.chart.util
Class RectValueLocation

java.lang.Object
  extended byli.netcat.chart.util.RectValueLocation
All Implemented Interfaces:
ValueLocation

public class RectValueLocation
extends java.lang.Object
implements ValueLocation

Implementation of a rectangular value location.

Author:
Arthur Marxer

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

RectValueLocation

public 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.

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

setCoordinates

public void setCoordinates(float trailX,
                           float trailY,
                           float directionX,
                           float directionY,
                           float length,
                           float thickness)
Sets the coordinates to this value location.

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

reflectX

public void reflectX()
Reflects this value location at the straight line x=0.


reflectY

public void reflectY()
Reflects this value location at the straight line y=0.


reflectXY

public void reflectXY()
Reflects this value location at the straight line x=y.


getLeadX

public float getLeadX()
Description copied from interface: ValueLocation
Returns the x-coordinate of the lead point.

Specified by:
getLeadX in interface ValueLocation
Returns:
The x-coordinate of the lead point.

getLeadY

public float getLeadY()
Description copied from interface: ValueLocation
Returns the y-coordinate of the lead point.

Specified by:
getLeadY in interface ValueLocation
Returns:
The y-coordinate of the lead point.

getTrailX

public float getTrailX()
Description copied from interface: ValueLocation
Returns the x-coordinate of the trail point.

Specified by:
getTrailX in interface ValueLocation
Returns:
The x-coordinate of the trail point.

getTrailY

public float getTrailY()
Description copied from interface: ValueLocation
Returns the y-coordinate of the trail point.

Specified by:
getTrailY in interface ValueLocation
Returns:
The y-coordinate of the trail point.

getX

public float getX(float lenghtPosition,
                  float lenghtShift,
                  float crossPosition,
                  float crossShift)
Description copied from interface: ValueLocation
Returns the x-coordinate of an arbitrary point in this value location.

Specified by:
getX in interface ValueLocation
Parameters:
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.

getY

public float getY(float lenghtPosition,
                  float lenghtShift,
                  float crossPosition,
                  float crossShift)
Description copied from interface: ValueLocation
Returns the y-coordinate of an arbitrary point in this value location.

Specified by:
getY in interface ValueLocation
Parameters:
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.

move

public void move(float dx,
                 float dy)
Description copied from interface: ValueLocation
Moves this value location by the given value.

Specified by:
move in interface ValueLocation
Parameters:
dx - Movement in the x direction.
dy - Movement in the y direction.

ChartCat 1.2

Copyright © 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print