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

Method Index

 o clear()
Clear the canvas (and off-screen image) by filling with the background color of the graph.
 o erase(Graphics, Rectangle)
Redraws the graph (thereby erasing any spurious info).
 o getDrawPane()
Get the DrawPane containing this canvas.
 o getGraph()
Get the Graph using this canvas.
 o getImageFlag()
 o getMinimumSize()
Gets the mininimum size of this component.
 o getOSGraphics()
Get the Graphics used by the off-screen image
 o getOSImage()
Get the off-screen image used for double buffering.
 o getPreferredSize()
Gets the preferred size of this component.
 o paint(Graphics)
This method is called to repaint this canvas.
 o paintPostScript(PrintWriter)
Writes a PostScript representation of the canvas to the supplied PrintWriter.
 o resetOSImage()
Reset the off-screen image by setting it to null, a new image will automatically be created the next time paint is called.
 o setImageFlag(boolean)
 o setMinimumSize(Dimension)
 o setMinimumSize(int, int)
 o setSize(Dimension)
Resizes this component so that it has width d.width and height d.height.
 o setSize(int, int)
Resizes this component so that it has width width and height.
 o update(Graphics)
Updates this component.

Methods

 o update
 public void update(Graphics gr)
Updates this component.

Overrides:
update in class Component
 o paint
 public void paint(Graphics gr)
This method is called to repaint this canvas.

Overrides:
paint in class Canvas
 o getOSImage
 public Image getOSImage()
Get the off-screen image used for double buffering.

Returns:
the off-screen image
 o 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.

 o getOSGraphics
 public Graphics getOSGraphics()
Get the Graphics used by the off-screen image

Returns:
the off-screen image Graphics
 o paintPostScript
 public void paintPostScript(PrintWriter pw)
Writes a PostScript representation of the canvas to the supplied PrintWriter.

 o erase
 public void erase(Graphics gr,
                   Rectangle cliprect)
Redraws the graph (thereby erasing any spurious info).

 o clear
 public void clear()
Clear the canvas (and off-screen image) by filling with the background color of the graph.

 o getMinimumSize
 public Dimension getMinimumSize()
Gets the mininimum size of this component.

Overrides:
getMinimumSize in class Component
 o setMinimumSize
 public void setMinimumSize(Dimension d)
 o setMinimumSize
 public void setMinimumSize(int w,
                            int h)
 o getPreferredSize
 public Dimension getPreferredSize()
Gets the preferred size of this component.

Overrides:
getPreferredSize in class Component
 o getDrawPane
 public DrawPane getDrawPane()
Get the DrawPane containing this canvas.

Returns:
the containing pane.
 o getGraph
 public Graph getGraph()
Get the Graph using this canvas.

Returns:
the graph using this canvas
 o 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
 o setSize
 public void setSize(int w,
                     int h)
Resizes this component so that it has width width and height.

Overrides:
setSize in class Component
 o setImageFlag
 public void setImageFlag(boolean mode)
 o getImageFlag
 public boolean getImageFlag()

All Packages  Class Hierarchy  This Package  Previous  Next  Index