analyzer.plot
Class PlotElement

java.lang.Object
  |
  +--analyzer.plot.PlotElement
Direct Known Subclasses:
Axis, Line, PlotBox, PlotFrame, XWindowMarks, XYBarPlot, XYPlot, XYPoints

public class PlotElement
extends java.lang.Object

The base class of all plot elements. The subclass PlotBox serves as a container for PlotElements.


Field Summary
protected  java.awt.Paint color
          The Paint for this PlotElement.
protected  PlotBox parent
          The container that holds this plot element.
protected  java.awt.Stroke stroke
          The Stroke for this PlotElement.
 
Constructor Summary
PlotElement()
           
 
Method Summary
 void addElement(PlotElement child)
          Attempt to add a child PlotElement.
 void paint(java.awt.Graphics2D g)
          Draw the object and all children.
 void setPaint(java.awt.Paint p)
          Set the paint
protected  void setParent(PlotBox parent)
          Protected method for setting the parent, should be called by the parent's addElement method.
 void setStroke(java.awt.Stroke s)
          Set the stroke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected PlotBox parent
The container that holds this plot element.

color

protected java.awt.Paint color
The Paint for this PlotElement. Can be a color or something more complicated. Default is black.

stroke

protected java.awt.Stroke stroke
The Stroke for this PlotElement. Defaults to a thin unbroken line.
Constructor Detail

PlotElement

public PlotElement()
Method Detail

setParent

protected void setParent(PlotBox parent)
Protected method for setting the parent, should be called by the parent's addElement method.

paint

public void paint(java.awt.Graphics2D g)
Draw the object and all children.

addElement

public void addElement(PlotElement child)
Attempt to add a child PlotElement.

setPaint

public void setPaint(java.awt.Paint p)
Set the paint

setStroke

public void setStroke(java.awt.Stroke s)
Set the stroke


Email questions and comments to
shumway@uiuc.edu or nzhong@ncsa.uiuc.edu