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

Constructor Index

 o Paragraph(String)
create the Paragraph

Method Index

 o action(Event, Object)
pass any action events to theDrawable
 o addLine(String)
add a line of text - EOR assumed (i.e.
 o addString(String)
add a String - NO EOR assumed
 o debug()
for debug
 o display(Graphics)
displays the object to a pre-selected graphics context
 o display(Graphics, Component)
dummy at present until worked out
 o getCurrentY()
gets the y value after display
 o getScaler2D()
gets the Scaler2D context from the object (object must contain this)
 o isSelected()
and find out whether it is
 o mouseDown(Event, int, int)
traps mouse clicks; if not dealt with by theDrawable, may be passed to other routines such as MouseManager.
 o mouseDrag(Event, int, int)
traps mouse drags; if not dealt with by theDrawable, may be passed to other routines such as MouseManager.
 o mouseUp(Event, int, int)
traps mouse clicks; if not dealt with by theDrawable, may be passed to other routines
 o process(Graphics, Scaler2D)
 o processMouseBox(Int2Range)
requests the Drawable to take action after a mouseBox has been swept out .
 o setComponent(Component)
set the component so that graphics can be updated
 o setFont(Font)
set the font so the Paragraph remembers it
 o setHighlightable(boolean)
set the Drawable so that subaddresses are highlighted (marked) rather than take immediate action
 o setScaler2D(Scaler2D)
 o setSelected(boolean)
tell the object it has been selected (e.g.

Constructors

 o Paragraph
  public Paragraph(String title)
create the Paragraph

Methods

 o setComponent
  public void setComponent(Component c)
set the component so that graphics can be updated
 o addString
  public void addString(String s)
add a String - NO EOR assumed
 o addLine
  public void addLine(String l)
add a line of text - EOR assumed (i.e. musn't be given)
 o setFont
  public void setFont(Font f)
set the font so the Paragraph remembers it
 o 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
 o 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.
 o 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.
 o 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.
 o display
  public void display(Graphics g,
                      Component c)
dummy at present until worked out
 o display
  public void display(Graphics g)
displays the object to a pre-selected graphics context
 o getCurrentY
  public int getCurrentY()
gets the y value after display
 o getScaler2D
  public Scaler2D getScaler2D()
gets the Scaler2D context from the object (object must contain this)
 o setScaler2D
  public void setScaler2D(Scaler2D s2d)
 o setSelected
  public void setSelected(boolean selected)
tell the object it has been selected (e.g. by a mouse)
 o isSelected
  public boolean isSelected()
and find out whether it is
 o action
  public boolean action(Event e,
                        Object arg)
pass any action events to theDrawable
 o setHighlightable
  public void setHighlightable(boolean b)
set the Drawable so that subaddresses are highlighted (marked) rather than take immediate action
 o process
  public void process(Graphics g,
                      Scaler2D sc2d)
 o debug
  public void debug()
for debug

All Packages  Class Hierarchy  This Package  Previous  Next  Index