Interface pmr.simplegraph.Drawable
All Packages Class Hierarchy This Package Previous Next Index
Interface pmr.simplegraph.Drawable
- public interface Drawable
- extends Object
this interface makes an object Drawable (for, say, use by
ScrollableTopLevel). Examples of how to use it are in
pmr.simplegraph.DrawableObject
- Author:
- (C) P. Murray-Rust, 1996
-
action(Event, Object)
- pass any action events to theDrawable
-
debug()
- for debug
-
display(Graphics)
- displays the object to a pre-selected graphics context
-
display(Graphics, Component)
- this may encapsulate the above routine, as we often need the component, e.g.
-
getScaler2D()
- gets the Scaler2D context from the object (object must contain this)
-
isSelected()
- and find out whether it is
-
mouseDown(Event, int, int)
- traps mouse clicks; if not dealt with by theDrawable, may be passed to
other routines such as MouseManager.
-
mouseDrag(Event, int, int)
- traps mouse drags; if not dealt with by theDrawable, may be passed to
other routines such as MouseManager.
-
mouseUp(Event, int, int)
- traps mouse clicks; if not dealt with by theDrawable, may be passed to
other routines such as MouseManager.
-
processMouseBox(Int2Range)
- requests the Drawable to take action after a mouseBox has been swept
out .
-
setComponent(Component)
- set the component that the Drawable is on (this helps with update, etc)
-
setHighlightable(boolean)
- set the Drawable so that subaddresses are highlighted (marked) rather
than take immediate action
-
setScaler2D(Scaler2D)
- sets the Scaler2D context for the object (object must contain this)
-
setSelected(boolean)
- tell the object it has been selected (e.g.
mouseUp
public abstract boolean mouseUp(Event evt,
int x,
int y)
- traps mouse clicks; if not dealt with by theDrawable, may be passed to
other routines such as MouseManager.
mouseDrag
public abstract boolean mouseDrag(Event evt,
int x,
int y)
- traps mouse drags; if not dealt with by theDrawable, may be passed to
other routines such as MouseManager.
mouseDown
public abstract boolean mouseDown(Event evt,
int x,
int y)
- traps mouse clicks; if not dealt with by theDrawable, may be passed to
other routines such as MouseManager.
processMouseBox
public abstract boolean processMouseBox(Int2Range box)
- requests the Drawable to take action after a mouseBox has been swept
out . The two commonest actions are to select a portion and
zoom, or to return a set of subaddresses from the object.
display
public abstract void display(Graphics g)
- displays the object to a pre-selected graphics context
display
public abstract void display(Graphics g,
Component c)
- this may encapsulate the above routine, as we often need the component, e.g.
for double buffering. Experimental at presnt :-)
getScaler2D
public abstract Scaler2D getScaler2D()
- gets the Scaler2D context from the object (object must contain this)
setScaler2D
public abstract void setScaler2D(Scaler2D s)
- sets the Scaler2D context for the object (object must contain this)
setSelected
public abstract void setSelected(boolean selected)
- tell the object it has been selected (e.g. by a mouse)
isSelected
public abstract boolean isSelected()
- and find out whether it is
action
public abstract boolean action(Event e,
Object arg)
- pass any action events to theDrawable
setHighlightable
public abstract void setHighlightable(boolean b)
- set the Drawable so that subaddresses are highlighted (marked) rather
than take immediate action
setComponent
public abstract void setComponent(Component c)
- set the component that the Drawable is on (this helps with update, etc)
debug
public abstract void debug()
- for debug
All Packages Class Hierarchy This Package Previous Next Index