All Packages Class Hierarchy This Package Previous Next Index
Class att.grappa.DrawCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----att.grappa.DrawCanvas
- public class DrawCanvas
- extends Canvas
The canvas used for drawing graphs. Its constructor is called
automatically by the DrawPane
constructor.
- Version:
- 1.1, 30 Sep 1999; Copyright 1996 - 1999 by AT&T Corp.
- Author:
- John Mocenigo, Research @ AT&T Labs
-
clear()
- Clear the canvas (and off-screen image) by filling with the background
color of the graph.
-
erase(Graphics, Rectangle)
- Redraws the graph (thereby erasing any spurious info).
-
getDrawPane()
- Get the
DrawPane
containing this canvas.
-
getGraph()
- Get the
Graph
using this canvas.
-
getImageFlag()
-
-
getMinimumSize()
- Gets the mininimum size of this component.
-
getOSGraphics()
- Get the
Graphics
used by the off-screen image
-
getOSImage()
- Get the off-screen image used for double buffering.
-
getPreferredSize()
-
Gets the preferred size of this component.
-
paint(Graphics)
- This method is called to repaint this canvas.
-
paintPostScript(PrintWriter)
- Writes a PostScript representation
of the canvas to the supplied PrintWriter.
-
resetOSImage()
- Reset the off-screen image by setting it to null, a new image will
automatically be created the next time
paint
is called.
-
setImageFlag(boolean)
-
-
setMinimumSize(Dimension)
-
-
setMinimumSize(int, int)
-
-
setSize(Dimension)
-
Resizes this component so that it has width
d.width
and height d.height
.
-
setSize(int, int)
- Resizes this component so that it has width
width
and height
.
-
update(Graphics)
-
Updates this component.
update
public void update(Graphics gr)
- Updates this component.
- Overrides:
- update in class Component
paint
public void paint(Graphics gr)
- This method is called to repaint this canvas.
- Overrides:
- paint in class Canvas
getOSImage
public Image getOSImage()
- Get the off-screen image used for double buffering.
- Returns:
- the off-screen image
resetOSImage
public void resetOSImage()
- Reset the off-screen image by setting it to null, a new image will
automatically be created the next time
paint
is called.
getOSGraphics
public Graphics getOSGraphics()
- Get the
Graphics
used by the off-screen image
- Returns:
- the off-screen image Graphics
paintPostScript
public void paintPostScript(PrintWriter pw)
- Writes a PostScript representation
of the canvas to the supplied PrintWriter.
erase
public void erase(Graphics gr,
Rectangle cliprect)
- Redraws the graph (thereby erasing any spurious info).
clear
public void clear()
- Clear the canvas (and off-screen image) by filling with the background
color of the graph.
getMinimumSize
public Dimension getMinimumSize()
- Gets the mininimum size of this component.
- Overrides:
- getMinimumSize in class Component
setMinimumSize
public void setMinimumSize(Dimension d)
setMinimumSize
public void setMinimumSize(int w,
int h)
getPreferredSize
public Dimension getPreferredSize()
- Gets the preferred size of this component.
- Overrides:
- getPreferredSize in class Component
getDrawPane
public DrawPane getDrawPane()
- Get the
DrawPane
containing this canvas.
- Returns:
- the containing pane.
getGraph
public Graph getGraph()
- Get the
Graph
using this canvas.
- Returns:
- the graph using this canvas
setSize
public void setSize(Dimension sz)
- Resizes this component so that it has width
d.width
and height d.height
.
- Overrides:
- setSize in class Component
setSize
public void setSize(int w,
int h)
- Resizes this component so that it has width
width
and height
.
- Overrides:
- setSize in class Component
setImageFlag
public void setImageFlag(boolean mode)
getImageFlag
public boolean getImageFlag()
All Packages Class Hierarchy This Package Previous Next Index