|
|||||||||
| Home >> All >> com >> hartmath >> JSci >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.hartmath.JSci.awt
Class Graph2D

java.lang.Objectjava.awt.Component
java.awt.Canvas
com.hartmath.JSci.awt.DoubleBufferedCanvas
com.hartmath.JSci.awt.Graph2D
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.util.EventListener, GraphDataListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
- Direct Known Subclasses:
- LineGraph, ScatterGraph
- public abstract class Graph2D
- extends DoubleBufferedCanvas
- implements GraphDataListener
- extends DoubleBufferedCanvas
The Graph2D superclass provides an abstract encapsulation of 2D graphs.
- Version:
- 1.0
| Nested Class Summary |
| Nested classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected int |
axisPad
Padding. |
protected float |
maxX
Min and max data points. |
protected float |
maxY
Min and max data points. |
protected float |
minX
Min and max data points. |
protected float |
minY
Min and max data points. |
protected Graph2DModel |
model
Data model. |
private boolean |
numbering
Axis numbering. |
protected java.awt.Point |
origin
Origin. |
protected int |
scalePad
Padding. |
protected float |
xScale
Axis scaling. |
protected float |
yScale
Axis scaling. |
| Fields inherited from class com.hartmath.JSci.awt.DoubleBufferedCanvas |
|
| Fields inherited from class java.awt.Canvas |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Graph2D(Graph2DModel gm)
Constructs a 2D graph. |
|
| Method Summary | |
protected java.awt.Point |
dataToScreen(float x,
float y)
Converts a data point to screen coordinates. |
protected void |
drawAxes(java.awt.Graphics g)
Draws the graph axes. |
Graph2DModel |
getModel()
Returns the model used by this graph. |
protected void |
rescale()
Rescales the Graph2D. |
protected float |
round(float x)
Rounds numbers to so many significant figures. |
void |
setBounds(int x,
int y,
int width,
int height)
Reshapes the Graph2D to the specified bounding box. |
void |
setModel(Graph2DModel gm)
Sets the data plotted by this graph to the specified data. |
void |
setNumbering(boolean flag)
Turns axis numbering on/off. |
| Methods inherited from class com.hartmath.JSci.awt.DoubleBufferedCanvas |
offscreenPaint, paint, redraw, update |
| Methods inherited from class java.awt.Canvas |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.hartmath.JSci.awt.GraphDataListener |
dataChanged |
| Field Detail |
model
protected Graph2DModel model
- Data model.
numbering
private boolean numbering
- Axis numbering.
origin
protected java.awt.Point origin
- Origin.
minX
protected float minX
- Min and max data points.
minY
protected float minY
- Min and max data points.
maxX
protected float maxX
- Min and max data points.
maxY
protected float maxY
- Min and max data points.
xScale
protected float xScale
- Axis scaling.
yScale
protected float yScale
- Axis scaling.
scalePad
protected final int scalePad
- Padding.
- See Also:
- Constant Field Values
axisPad
protected final int axisPad
- Padding.
- See Also:
- Constant Field Values
| Constructor Detail |
Graph2D
public Graph2D(Graph2DModel gm)
- Constructs a 2D graph.
| Method Detail |
setModel
public final void setModel(Graph2DModel gm)
- Sets the data plotted by this graph to the specified data.
getModel
public final Graph2DModel getModel()
- Returns the model used by this graph.
setNumbering
public final void setNumbering(boolean flag)
- Turns axis numbering on/off.
setBounds
public final void setBounds(int x,
int y,
int width,
int height)
- Reshapes the Graph2D to the specified bounding box.
rescale
protected final void rescale()
- Rescales the Graph2D.
dataToScreen
protected final java.awt.Point dataToScreen(float x, float y)
- Converts a data point to screen coordinates.
drawAxes
protected final void drawAxes(java.awt.Graphics g)
- Draws the graph axes.
round
protected final float round(float x)
- Rounds numbers to so many significant figures.
|
|||||||||
| Home >> All >> com >> hartmath >> JSci >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC