com.sencha.gxt.chart.client.draw.path
Class EndPointCommand

java.lang.Object
  extended by com.sencha.gxt.chart.client.draw.path.PathCommand
      extended by com.sencha.gxt.chart.client.draw.path.EndPointCommand
Direct Known Subclasses:
CurveTo, CurveToQuadratic, CurveToQuadraticSmooth, CurveToSmooth, EllipticalArc, LineTo, MoveTo

public abstract class EndPointCommand
extends PathCommand

Abstract class representing a PathCommand with an endpoint.


Constructor Summary
EndPointCommand()
          Creates an end point command with default values.
EndPointCommand(double x, double y)
          Creates an end point command with the given end point coordinates.
EndPointCommand(double x, double y, boolean relative)
          Creates an end point command with the given end point coordinates and whether or not the command is relative.
EndPointCommand(EndPointCommand command)
          Creates a copy of the given end point command.
 
Method Summary
 double getX()
          Returns the x-coordinate of the end point of the command.
 double getY()
          Returns the y-coordinate of the end point of the command.
 void setX(double x)
          Sets the x-coordinate of the end point of the command.
 void setY(double y)
          Sets the y-coordinate of the end point of the command.
 void toAbsolute(PrecisePoint currentPoint, PrecisePoint movePoint)
          Converts the path commands to absolute coordinates using the given frame of reference and the last move.
 
Methods inherited from class com.sencha.gxt.chart.client.draw.path.PathCommand
copy, isRelative, nearEqual, setRelative, toCurve
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndPointCommand

public EndPointCommand()
Creates an end point command with default values.


EndPointCommand

public EndPointCommand(double x,
                       double y)
Creates an end point command with the given end point coordinates. Defaults to absolute.

Parameters:
x - ending x-coordinate
y - ending y-coordinate

EndPointCommand

public EndPointCommand(double x,
                       double y,
                       boolean relative)
Creates an end point command with the given end point coordinates and whether or not the command is relative.

Parameters:
x - ending x-coordinate
y - ending y-coordinate
relative - whether or not the command is relative

EndPointCommand

public EndPointCommand(EndPointCommand command)
Creates a copy of the given end point command.

Parameters:
command - the command to be copied
Method Detail

getX

public double getX()
Returns the x-coordinate of the end point of the command.

Returns:
the x-coordinate of the end point of the command

getY

public double getY()
Returns the y-coordinate of the end point of the command.

Returns:
the y-coordinate of the end point of the command

setX

public void setX(double x)
Sets the x-coordinate of the end point of the command.

Parameters:
x - the x-coordinate of the end point of the command

setY

public void setY(double y)
Sets the y-coordinate of the end point of the command.

Parameters:
y - the y-coordinate of the end point of the command

toAbsolute

public void toAbsolute(PrecisePoint currentPoint,
                       PrecisePoint movePoint)
Description copied from class: PathCommand
Converts the path commands to absolute coordinates using the given frame of reference and the last move.

Overrides:
toAbsolute in class PathCommand
Parameters:
currentPoint - frame of reference
movePoint - last move point


Copyright © 2011. All Rights Reserved.