All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class polymtl.magi.awt.Graphique2D

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----polymtl.magi.awt.Graphique2D

public final class Graphique2D
extends Canvas
A line graph AWT component.


Constructor Index

 o Graphique2D(double[][])
Construct a line graph.

Method Index

 o getMinimumSize()
Returns the minimum size of this component.
 o getPreferredSize()
Returns the preferred size of this component.
 o paint(Graphics)
Paint the graph.
 o setBounds(int, int, int, int)
Reshapes the Graphique2D to the specified bounding box.
 o setColor(int, Color)
Sets the line color of the nth y-series.
 o setData(double[][])
Sets the data plotted by this Graphique2D to the specified data.
 o setExtremas(double, double)
 o setNumbering(boolean)
Turns axis numbering on/off.

Constructors

 o Graphique2D
 public Graphique2D(double array[][])
Construct a line graph.

Parameters:
array - [0][] contains the x-series, [n][] contains the nth y-series

Methods

 o setData
 public void setData(double array[][])
Sets the data plotted by this Graphique2D to the specified data.

Parameters:
array - [0][] contains the x-series, [n][] contains the nth y-series
 o setExtremas
 public void setExtremas(double miny,
                         double maxy)
 o setColor
 public void setColor(int n,
                      Color c)
Sets the line color of the nth y-series.

Parameters:
n - the index of the y-series
c - the line color
 o setNumbering
 public void setNumbering(boolean flag)
Turns axis numbering on/off.

 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of this component.

Overrides:
getPreferredSize in class Component
 o getMinimumSize
 public Dimension getMinimumSize()
Returns the minimum size of this component.

Overrides:
getMinimumSize in class Component
 o setBounds
 public void setBounds(int x,
                       int y,
                       int width,
                       int height)
Reshapes the Graphique2D to the specified bounding box.

Overrides:
setBounds in class Component
 o paint
 public void paint(Graphics g)
Paint the graph.

Overrides:
paint in class Canvas

All Packages  Class Hierarchy  This Package  Previous  Next  Index