All Packages Class Hierarchy This Package Previous Next Index
Class convexHull.MouseCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----convexHull.MouseCanvas
- public class MouseCanvas
- extends Panel
This is a container for a canvas. This container will display rulers
around the canvas (on the top and left).
-
leftCanvas
- canvas for the left ruler
-
mainCanvas
- the main canvas
-
topCanvas
- canvas for the top ruler
-
MouseCanvas(Canvas)
- Lays out its children (top & left rulers + the user
defined canvas).
-
doLayout()
- Makes sure that the rulers and the main canvas are always properly
laid out.
-
mouseCB(MouseEvent)
- Callback for the mouse
-
setBackground(Color)
- This method allows the user to set the background.
topCanvas
private TopCanvas topCanvas
- canvas for the top ruler
leftCanvas
private LeftCanvas leftCanvas
- canvas for the left ruler
mainCanvas
private Canvas mainCanvas
- the main canvas
MouseCanvas
public MouseCanvas(Canvas mainCanvas)
- Lays out its children (top & left rulers + the user
defined canvas). Associates callbacks with various mouse events,
so that the rulers can be properly updated.
- Parameters:
- mainCanvas - java.awt.Canvas
- the real user-graphics canvas
doLayout
public void doLayout()
- Makes sure that the rulers and the main canvas are always properly
laid out.
- Overrides:
- doLayout in class Container
mouseCB
public void mouseCB(MouseEvent e)
- Callback for the mouse
- Parameters:
- e - java.awt.Event.MouseEvent
- mouse event that triggered this event
setBackground
public void setBackground(Color col)
- This method allows the user to set the background.
- Parameters:
- col - java.awt.Color
- the user defined color
- Overrides:
- setBackground in class Component
All Packages Class Hierarchy This Package Previous Next Index