ChartCat 1.2

li.netcat.chart.util
Class ArcValueLocation

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

public class ArcValueLocation
extends java.lang.Object
implements ValueLocation

Implementation of a value location that describes an arc.

Author:
Arthur Marxer

Constructor Summary
ArcValueLocation(float centerX, float centerY, float radius, float thickness, double trailAngle, double leadAngle)
          Constructs a new ArcValueLocation and initializes all of its fields to the given values.
ArcValueLocation(float centerX, float centerY, float radius, float thickness, double trailAngle, double leadAngle, float stretch)
          Constructs a new ArcValueLocation and initializes all of its fields to the given values.
 
Method Summary
 float getCenterX()
          Returns the x-coordinate of the center point.
 float getCenterY()
          Returns the y-coordinate of the center point.
 float getInnerRadius()
          Returns the inner radius form the center to the inner bound of the arc.
 double getLeadAngle()
          Returns the angle of the lead value.
 float getLeadX()
          Returns the x-coordinate of the lead point.
 float getLeadY()
          Returns the y-coordinate of the lead point.
 float getOuterRadius()
          Returns the outer radius form the center to the outer bound of the arc.
 float getRadius()
          Returns the radius form the center to the middle of the arc.
 float getStretch()
          Returns the stretch value in x-Direction.
 float getThickness()
          Returns the thickness of the arc i.e. the difference between inner and outer radius.
 double getTrailAngle()
          Returns the angle of the trail value.
 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 moveRadial(float amount)
          Moves this value location in the radial direction by the given amount.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcValueLocation

public ArcValueLocation(float centerX,
                        float centerY,
                        float radius,
                        float thickness,
                        double trailAngle,
                        double leadAngle)
Constructs a new ArcValueLocation and initializes all of its fields to the given values.

Parameters:
centerX - The x-coordinate of the center point.
centerY - The y-coordinate of the center point.
radius - The radius form the center to the middle of the arc, must be > 0.0.
thickness - The thickness of the arc.
trailAngle - The angle to the trail value in radians.
leadAngle - The angle to the lead value in radians.

ArcValueLocation

public ArcValueLocation(float centerX,
                        float centerY,
                        float radius,
                        float thickness,
                        double trailAngle,
                        double leadAngle,
                        float stretch)
Constructs a new ArcValueLocation and initializes all of its fields to the given values.

Parameters:
centerX - The x-coordinate of the center point.
centerY - The y-coordinate of the center point.
radius - The radius form the center to the middle of the arc, must be > 0.0.
thickness - The thickness of the arc.
trailAngle - The angle to the trail value in radians.
leadAngle - The angle to the lead value in radians.
stretch - The stretch value in x-Direction. 1.0f is the default.
Method Detail

getCenterX

public float getCenterX()
Returns the x-coordinate of the center point.

Returns:
The x-coordinate of the center point.

getCenterY

public float getCenterY()
Returns the y-coordinate of the center point.

Returns:
The y-coordinate of the center point.

getRadius

public float getRadius()
Returns the radius form the center to the middle of the arc.

Returns:
The radius form the center to the middle of the arc.

getOuterRadius

public float getOuterRadius()
Returns the outer radius form the center to the outer bound of the arc.

Returns:
The outer radius of the arc.

getInnerRadius

public float getInnerRadius()
Returns the inner radius form the center to the inner bound of the arc.

Returns:
The inner radius of the arc.

getThickness

public float getThickness()
Returns the thickness of the arc i.e. the difference between inner and outer radius.

Returns:
The thickness of the arc.

getTrailAngle

public double getTrailAngle()
Returns the angle of the trail value.

Returns:
The angle of the trail value in degrees.

getLeadAngle

public double getLeadAngle()
Returns the angle of the lead value.

Returns:
The angle of the lead value in degrees.

getStretch

public float getStretch()
Returns the stretch value in x-Direction. A value of 1.0f refers to a normal circle, other values lead to an ellipse.

Returns:
The stretch value in x-Direction.

moveRadial

public void moveRadial(float amount)
Moves this value location in the radial direction by the given amount.

Parameters:
amount - The move amount in pixel. Positive values move towards the outside.

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