Class pmr.simplegraph.Paragraph
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.simplegraph.Paragraph
java.lang.Object
|
+----pmr.simplegraph.Paragraph
- public class Paragraph
- extends Object
- implements Drawable
the basic unit of SimpleText. Paragraphs are the smallest 'chunk' that
is useful - maybe even a heading or something.
- Author:
- (C) P. Murray-Rust, 1996
-
Paragraph(String)
- create the Paragraph
-
action(Event, Object)
- pass any action events to theDrawable
-
addLine(String)
- add a line of text - EOR assumed (i.e.
-
addString(String)
- add a String - NO EOR assumed
-
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 so that graphics can be updated
-
setFont(Font)
- set the font so the Paragraph remembers it
-
setHighlightable(boolean)
- set the Drawable so that subaddresses are highlighted (marked) rather
than take immediate action
-
setScaler2D(Scaler2D)
-
-
setSelected(boolean)
- tell the object it has been selected (e.g.
Paragraph
public Paragraph(String title)
- create the Paragraph
setComponent
public void setComponent(Component c)
- set the component so that graphics can be updated
addString
public void addString(String s)
- add a String - NO EOR assumed
addLine
public void addLine(String l)
- add a line of text - EOR assumed (i.e. musn't be given)
setFont
public void setFont(Font f)
- set the font so the Paragraph remembers it
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.
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)
setScaler2D
public void setScaler2D(Scaler2D s2d)
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