Class pmr.simplegraph.SimpleText
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.simplegraph.SimpleText
java.lang.Object
|
+----pmr.simplegraph.SimpleText
- public class SimpleText
- extends Object
- implements Drawable
A text area which can be drawn onto a Graphics area (as opposed to
a TextArea which is a component. SimpleTexts are composed of one or more
Paragraphs, which are generic containers for paragrahps, list items, etc.
(A paragraph is the smallest coherent chunk of text - yes, I'm sure there's
a better name (?Block)
- Author:
- (C) P. Murray-Rust, 1996
-
BOTTOM
-
-
LEFT
-
-
RIGHT
-
-
TOP
-
-
SimpleText(String)
- create the SimpleText and remember what component it is being drawn on
-
action(Event, Object)
- pass any action events to theDrawable
-
addElement(Paragraph)
- add a Paragraph child to a SimpleText.
-
debug()
- for debug
-
display(Graphics)
- displays the object to a pre-selected graphics context
-
display(Graphics, Component)
- dummy at present until worked out
-
getCurrentY()
- gets the y value after display
-
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
-
process(Graphics, Scaler2D)
-
-
processMouseBox(Int2Range)
- requests the Drawable to take action after a mouseBox has been swept
out .
-
setComponent(Component)
- set the component (recursively) so that graphics can be updated
-
setHighlightable(boolean)
- set the Drawable so that subaddresses are highlighted (marked) rather
than take immediate action
-
setScaler2D(Scaler2D)
- set the scaling module
-
setSelected(boolean)
- tell the object it has been selected (e.g.
TOP
public final static int TOP
LEFT
public final static int LEFT
BOTTOM
public final static int BOTTOM
RIGHT
public final static int RIGHT
SimpleText
public SimpleText(String title)
- create the SimpleText and remember what component it is being drawn on
setComponent
public void setComponent(Component c)
- set the component (recursively) so that graphics can be updated
addElement
public void addElement(Paragraph p)
- add a Paragraph child to a SimpleText.
mouseUp
public boolean mouseUp(Event evt,
int x,
int y)
- traps mouse clicks; if not dealt with by theDrawable, may be passed to
other routines
mouseDrag
public 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 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 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.
setScaler2D
public void setScaler2D(Scaler2D s)
- set the scaling module
display
public void display(Graphics g,
Component c)
- dummy at present until worked out
display
public void display(Graphics g)
- displays the object to a pre-selected graphics context
getCurrentY
public int getCurrentY()
- gets the y value after display
getScaler2D
public Scaler2D getScaler2D()
- gets the Scaler2D context from the object (object must contain this)
setSelected
public void setSelected(boolean selected)
- tell the object it has been selected (e.g. by a mouse)
isSelected
public boolean isSelected()
- and find out whether it is
action
public boolean action(Event e,
Object arg)
- pass any action events to theDrawable
setHighlightable
public void setHighlightable(boolean b)
- set the Drawable so that subaddresses are highlighted (marked) rather
than take immediate action
process
public void process(Graphics g,
Scaler2D sc2d)
debug
public void debug()
- for debug
All Packages Class Hierarchy This Package Previous Next Index