All Packages Class Hierarchy This Package Previous Next Index
Class tropo.awt.TRDelegatedCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----tropo.awt.TRBufferedCanvas
|
+----tropo.awt.TRDelegatedCanvas
- public final class TRDelegatedCanvas
- extends TRBufferedCanvas
A delegated canvas is one in which another class
takes care of sizing and drawing issues.
You do not subclass this - rather you pass in a listener
or painter which take takes care of the real work.
If you know your size when you new this guy then
you pass in a painter and the size, else you only
have to pass in a listener.
In typical usage all you use is the ctr here.
- See Also:
- TRCanvasListener, TRCanvasPainter, TRBufferedCanvas
-
TRDelegatedCanvas(TRCanvasListener)
- Create a delegated canvas when you don't initially know
the size.
-
TRDelegatedCanvas(TRCanvasPainter, int, int)
- Create a delegated canvas when you know the size.
-
draw(Graphics)
-
-
mouseDown(Event, int, int)
-
-
mouseDrag(Event, int, int)
-
-
mouseEnter(Event, int, int)
-
-
mouseExit(Event, int, int)
-
-
mouseMove(Event, int, int)
-
-
mouseUp(Event, int, int)
-
-
setMouser(TRMouseListener)
-
TRDelegatedCanvas
public TRDelegatedCanvas(TRCanvasListener listener)
- Create a delegated canvas when you don't initially know
the size.
- Parameters:
- listener - the guy who knows how to size and paint us
TRDelegatedCanvas
public TRDelegatedCanvas(TRCanvasPainter painter,
int w,
int h)
- Create a delegated canvas when you know the size.
- Parameters:
- painter - the guy who knows how to paint the canvas
- w - the width
- h - the height
setMouser
public void setMouser(TRMouseListener m)
draw
public final void draw(Graphics g)
- Overrides:
- draw in class TRBufferedCanvas
mouseDrag
public boolean mouseDrag(Event e,
int x,
int y)
- Overrides:
- mouseDrag in class Component
mouseDown
public boolean mouseDown(Event e,
int x,
int y)
- Overrides:
- mouseDown in class Component
mouseUp
public boolean mouseUp(Event e,
int x,
int y)
- Overrides:
- mouseUp in class Component
mouseEnter
public boolean mouseEnter(Event e,
int x,
int y)
- Overrides:
- mouseEnter in class Component
mouseExit
public boolean mouseExit(Event e,
int x,
int y)
- Overrides:
- mouseExit in class Component
mouseMove
public boolean mouseMove(Event e,
int x,
int y)
- Overrides:
- mouseMove in class Component
All Packages Class Hierarchy This Package Previous Next Index