net.moioli.drawables
Class BigPoint

java.lang.Object
  extended by net.moioli.drawables.DoublePoint
      extended by net.moioli.drawables.BigPoint
All Implemented Interfaces:
DrawableI

public class BigPoint
extends DoublePoint

Represents an important point on the DefaultChart, it will be circled and a description will be added.

Version:
2005/10/5
Author:
Silvio Moioli

Field Summary
 
Fields inherited from class net.moioli.drawables.DoublePoint
x, y
 
Constructor Summary
BigPoint()
          Default constructor ((0,0), no description)
BigPoint(double x, double y, java.lang.String description)
          Standard constructor.
 
Method Summary
 void drawMe(GraphicsI g, Scale s, java.lang.Object c)
          This method is automatically called by DefaultChart to draw the objects it contains, so end users should never call drawMe directly.
 java.lang.String getDescription()
          Returns the description.
 double maxY(double minX, double maxX)
          Returns the maximum y value that should be represented in the DefaultChart for this object to be drawn properly.
 double minY(double minX, double maxX)
          Returns the minimum y value that should be represented in the DefaultChart for this object to be drawn properly.
 void setDescription(java.lang.String description)
          Changes the point's description
 
Methods inherited from class net.moioli.drawables.DoublePoint
getX, getY, setX, setY, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BigPoint

public BigPoint()
Default constructor ((0,0), no description)


BigPoint

public BigPoint(double x,
                double y,
                java.lang.String description)
Standard constructor.

Parameters:
x - x coordinate of the BigPoint
y - y coordinate of the BigPoint
description - label
Method Detail

drawMe

public void drawMe(GraphicsI g,
                   Scale s,
                   java.lang.Object c)
This method is automatically called by DefaultChart to draw the objects it contains, so end users should never call drawMe directly. Inside this method there must be all the code to draw the object on a DefaultChart, and all the operations which involve scaling should be done via the passed Scale object.

Specified by:
drawMe in interface DrawableI
Parameters:
g - the surface where this object will be drawn
s - the DefaultChart's Scale object
c - the color to be used for drawing

getDescription

public java.lang.String getDescription()
Returns the description.

Returns:
the description.

setDescription

public void setDescription(java.lang.String description)
Changes the point's description

Parameters:
description - the new description

minY

public double minY(double minX,
                   double maxX)
Returns the minimum y value that should be represented in the DefaultChart for this object to be drawn properly.

Specified by:
minY in interface DrawableI
Parameters:
minX - the minimum x value represented in this DefaultChart
maxX - the maximum x value represented in this DefaultChart
Returns:
the minimum y value

maxY

public double maxY(double minX,
                   double maxX)
Returns the maximum y value that should be represented in the DefaultChart for this object to be drawn properly.

Specified by:
maxY in interface DrawableI
Parameters:
minX - the minimum x value represented in this DefaultChart
maxX - the maximum x value represented in this DefaultChart
Returns:
the maximum y value