jwo.utils.gui
Class JWGraphItem

java.lang.Object
  extended byjwo.utils.gui.JWGraphItem

public class JWGraphItem
extends Object

Skeleton for a graphical object to be added to Graph. Originally based on the code given in the tutorial Chart your way to custom graph components, by Maria Winslow, 1997 (JavaWorld, July, 1997). See www.javaworld.com/javaworld/jw-07-1997/jw-07-step.html. Modified to use Swing and additional axis labelling.

Version:
2.1, 17th September, 2002.
Author:
Jo Wood

Constructor Summary
JWGraphItem()
          Stores a graphable item (bar, line, point etc.).
JWGraphItem(float x, float y)
          Stores a graphable item (bar, line, point etc.).
JWGraphItem(float x, float y, Color colour)
          Stores a graphable item (bar, line, point etc.).
 
Method Summary
 Color getColour()
          Reports the colour of the graphics component.
 float getXValue()
          Reports the X value of the graphics component.
 float getYValue()
          Reports the Y value of the graphics component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JWGraphItem

public JWGraphItem()
Stores a graphable item (bar, line, point etc.).


JWGraphItem

public JWGraphItem(float x,
                   float y)
Stores a graphable item (bar, line, point etc.).

Parameters:
x - X value associated with the compontent.
y - Y value associated with the compontent.

JWGraphItem

public JWGraphItem(float x,
                   float y,
                   Color colour)
Stores a graphable item (bar, line, point etc.).

Parameters:
x - X value associated with the compontent.
y - Y value associated with the compontent.
colour - Colour of component.
Method Detail

getXValue

public float getXValue()
Reports the X value of the graphics component.

Returns:
X value associated with graph component.

getYValue

public float getYValue()
Reports the Y value of the graphics component.

Returns:
Y value associated with graph component.

getColour

public Color getColour()
Reports the colour of the graphics component.

Returns:
Graph component colour.


Copyright Jo Wood, 1996-2004, last modified, 3rd September, 2004