multigraph
Class PlotPoint

java.lang.Object
  extended bymultigraph.PlotPoint
Direct Known Subclasses:
DatePoint

public class PlotPoint
extends java.lang.Object

The PlotPoint object is used to specify a location for drawing on a Plotter canvas relative to a PlotFrame; see PlotFrame for a more thorough discussion of this.

Note: once created, a PlotPoint simply represents a point in a drawing canvas; its coordinates are stored internally as device pixel coordinates. The PlotFrame used to create the PlotPoint is not retained.

Version:
$Id: PlotPoint.java,v 1.1.1.1 2004/11/30 22:30:41 mphillips Exp $
Author:
Mark Phillips
See Also:
PlotFrame, Plotter

Constructor Summary
PlotPoint(double x, double y)
          Create a PlotPoint having given device pixel coordinates.
PlotPoint(PlotFrame f, double x, double y)
          Create a PlotPoint having coordinates (x,y) in PlotFrame f.
PlotPoint(PlotFrame xf, double x, PlotFrame yf, double y)
          Create a PlotPoint whose x coordinate is specified relative to one frame (xf), and whose y coordinate is specified relative to a different frame (yf).
 
Method Summary
 PlotPoint add(double dx, double dy)
          Return a new PlotPoint whose location is obtained by adding (dx,dy) to the device pixel coordinates of this PlotPoint.
 java.lang.String toString()
          Return a string representation of this PlotPoint.
 int xPixel()
          Return the device pixel x coordinate of this point
 int yPixel()
          Return the device pixel y coordinate of this point
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlotPoint

public PlotPoint(double x,
                 double y)
Create a PlotPoint having given device pixel coordinates.


PlotPoint

public PlotPoint(PlotFrame f,
                 double x,
                 double y)
Create a PlotPoint having coordinates (x,y) in PlotFrame f.


PlotPoint

public PlotPoint(PlotFrame xf,
                 double x,
                 PlotFrame yf,
                 double y)
Create a PlotPoint whose x coordinate is specified relative to one frame (xf), and whose y coordinate is specified relative to a different frame (yf).

Method Detail

xPixel

public int xPixel()
Return the device pixel x coordinate of this point


yPixel

public int yPixel()
Return the device pixel y coordinate of this point


add

public PlotPoint add(double dx,
                     double dy)
Return a new PlotPoint whose location is obtained by adding (dx,dy) to the device pixel coordinates of this PlotPoint.


toString

public java.lang.String toString()
Return a string representation of this PlotPoint.