All Packages Class Hierarchy This Package Previous Next Index
Class math.topol.Braid.braidCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----graphics.bezier.PlotCanvas
|
+----math.topol.Braid.braidCanvas
- public class braidCanvas
- extends PlotCanvas
- implements ActionListener
Class braidCanvas encapsulates the data and methods required
to draw braids and to interact with them on the screen.
- Version:
- $Id: braidCanvas.java,v 1.8 1999/02/11 21:03:55 djun Exp djun $
-
ColArray
-
-
braidCanvas(Applet, ActionListener)
-
-
braidCanvas(Applet, ActionListener, int, int)
-
-
actionPerformed(ActionEvent)
- Takes care of ActionEvents in this braidCanvas.
-
addPopup(PopupMenu)
- Add a popup menu.
-
draw()
- Plots the braid.
-
drawBraid(braid)
- Draws given braid in this braidCanvas.
-
drawCrossing(int, RealPoint)
- Draws given elementary generator at the given basepoint.
-
initGfx()
- Initializes the graphics.
-
paint(Graphics)
- Calls update to refresh the canvas with the image of the
braid.
-
processMouseEvent(MouseEvent)
- Takes care of MouseEvents in this braidCanvas.
-
register(braid)
- Registers this braid with the canvas so that various operations
can dispense with such operations as threading the braid.
-
toPostScript(braid)
- Generates PostScript output which draws this braid.
-
update(Graphics)
- Update this image.
ColArray
public static Color ColArray[]
braidCanvas
public braidCanvas(Applet a,
ActionListener al)
braidCanvas
public braidCanvas(Applet a,
ActionListener al,
int width,
int height)
initGfx
public void initGfx()
- Initializes the graphics.
paint
public void paint(Graphics g)
- Calls update to refresh the canvas with the image of the
braid.
- Overrides:
- paint in class PlotCanvas
register
public void register(braid b)
- Registers this braid with the canvas so that various operations
can dispense with such operations as threading the braid.
This is done once for every "new" braid.
update
public void update(Graphics g)
- Update this image.
- Overrides:
- update in class PlotCanvas
draw
public void draw()
- Plots the braid.
- Overrides:
- draw in class PlotCanvas
drawCrossing
public void drawCrossing(int index,
RealPoint basepoint)
- Draws given elementary generator at the given basepoint.
toPostScript
public void toPostScript(braid b)
- Generates PostScript output which draws this braid.
drawBraid
public void drawBraid(braid b)
- Draws given braid in this braidCanvas.
addPopup
public void addPopup(PopupMenu pop)
- Add a popup menu. We assume that the popup menu has
had all of its menu items added, and that each has an
action listener defined in another class.
processMouseEvent
public void processMouseEvent(MouseEvent e)
- Takes care of MouseEvents in this braidCanvas.
Pops up the Popup Menu; most other events get passed
upstream to superclasses of this class.
- Overrides:
- processMouseEvent in class Component
actionPerformed
public void actionPerformed(ActionEvent e)
- Takes care of ActionEvents in this braidCanvas. Everything here
gets dispatched to the actionListener which is supplied in the
constructor to this braidCanvas class.
All Packages Class Hierarchy This Package Previous Next Index