Class pmr.sgml.SGMLTOC
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pmr.sgml.SGMLTOC

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----pmr.simplegraph.ScrollableTopLevel
                                   |
                                   +----pmr.sgml.SGMLTOC

public class SGMLTOC
extends ScrollableTopLevel
Table of Contents - could be one for each tree
Author:
(C) P. Murray-Rust, 1996

Variable Index

 o CHILD
 o NODE

Constructor Index

 o SGMLTOC(SGMLTree, int)

Method Index

 o action(Event, Object)
this handles button events in the buttonBar provided by simpleFrame; if there is a Drawable, passes the event to it
 o addBookmark(SGMLNode)
add a node to 'bookmark' list
 o addClipboard()
 o addFileTransporter()
 o addFileTransporter(FileTransporter)
specialist File Transporter (subclassed)
 o addTrashCan()
 o addTreeTransporter()
 o addTreeTransporter(TreeTransporter)
add a specialist TreeTransporter (subclassed)
 o buttonPress(String)
 o calculateTOC(int, int)
 o deleteNode(SGMLNode)
 o destroy()
kill the Frame in which the SGMLTOC is housed
 o display(Graphics)
 o drawHide(Graphics, SGMLNode, int, int, int)
draw a box with - or + to hide node or its children.
 o drawIcon(Graphics, int, int)
 o drawNode(Graphics, SGMLNode, Int2, int)
 o drawNodes(Graphics)
draw the nodes, but don't start till after the calculateTOC has been done
 o drawTrash(Graphics, int, int)
 o getBookmarks()
get 'bookmark' list
 o getSelectedNode()
return the currently selected node (e.g.
 o getVert()
the vertical pixel distance between lines
 o handleEvent(Event)
 o keyDown(Event, int)
this is sent from above since panels don't seem to catch key presses???
 o mouseDown(Event, int, int)
at present mouseDown is used for sweeping out boxes, so no other action; but now we are developing it for dragging and scaling objects
 o mouseDrag(Event, int, int)
 o mouseUp(Event, int, int)
corrects for the scrolling offset and then routes the event to the mouse manager
 o paint(Graphics)
this is where all the drawing takes place.
 o paint1(Graphics)
 o saveGif()
 o search()
 o setDepth(int)
 o setInlinedObjects(boolean)
are Objects to displayed on the TOC?
 o setMaxChildren(int)
the maximum number of children to be displayed
 o showHelp()
show the help text

Variables

 o NODE
  public final static int NODE
 o CHILD
  public final static int CHILD

Constructors

 o SGMLTOC
  public SGMLTOC(SGMLTree t,
                 int depth)

Methods

 o showHelp
  public void showHelp()
show the help text
Overrides:
showHelp in class ScrollableTopLevel
 o paint
  public void paint(Graphics g)
this is where all the drawing takes place.
Overrides:
paint in class ScrollableTopLevel
 o paint1
  public void paint1(Graphics g)
 o display
  public void display(Graphics g)
 o destroy
  public void destroy()
kill the Frame in which the SGMLTOC is housed
 o addFileTransporter
  public void addFileTransporter()
 o addFileTransporter
  public void addFileTransporter(FileTransporter ft)
specialist File Transporter (subclassed)
 o addTrashCan
  public void addTrashCan()
 o addClipboard
  public void addClipboard()
 o addTreeTransporter
  public void addTreeTransporter()
 o addTreeTransporter
  public void addTreeTransporter(TreeTransporter ti)
add a specialist TreeTransporter (subclassed)
 o setInlinedObjects
  public void setInlinedObjects(boolean b)
are Objects to displayed on the TOC?
 o getVert
  public int getVert()
the vertical pixel distance between lines
 o setDepth
  public void setDepth(int depth)
 o addBookmark
  public void addBookmark(SGMLNode n) throws DifferentSGMLTreesException
add a node to 'bookmark' list
Throws: DifferentSGMLTreesException
all Nodes must be on same Tree
 o getBookmarks
  public SGMLNodeIndexSet getBookmarks()
get 'bookmark' list
 o setMaxChildren
  public void setMaxChildren(int max)
the maximum number of children to be displayed
 o calculateTOC
  public void calculateTOC(int nodeIndex,
                           int level)
 o drawNodes
  public void drawNodes(Graphics g)
draw the nodes, but don't start till after the calculateTOC has been done
 o drawNode
  public void drawNode(Graphics g,
                       SGMLNode n,
                       Int2 p,
                       int nodeSerial)
 o drawHide
  public Int2Range drawHide(Graphics g,
                            SGMLNode n,
                            int x,
                            int y,
                            int flag)
draw a box with - or + to hide node or its children. If not meaningful, skip, but return the same area
 o getSelectedNode
  public SGMLNode getSelectedNode()
return the currently selected node (e.g. title highlighted in green
 o mouseDown
  public boolean mouseDown(Event evt,
                           int x,
                           int y)
at present mouseDown is used for sweeping out boxes, so no other action; but now we are developing it for dragging and scaling objects
Overrides:
mouseDown in class ScrollableTopLevel
 o mouseDrag
  public boolean mouseDrag(Event evt,
                           int x,
                           int y)
Overrides:
mouseDrag in class ScrollableTopLevel
 o mouseUp
  public boolean mouseUp(Event evt,
                         int x,
                         int y)
corrects for the scrolling offset and then routes the event to the mouse manager
Overrides:
mouseUp in class ScrollableTopLevel
 o search
  public void search()
 o deleteNode
  public void deleteNode(SGMLNode n)
 o handleEvent
  public boolean handleEvent(Event e)
Overrides:
handleEvent in class ScrollableTopLevel
 o keyDown
  public boolean keyDown(Event e,
                         int key)
this is sent from above since panels don't seem to catch key presses???
Overrides:
keyDown in class Component
 o action
  public boolean action(Event e,
                        Object arg)
this handles button events in the buttonBar provided by simpleFrame; if there is a Drawable, passes the event to it
Overrides:
action in class ScrollableTopLevel
 o buttonPress
  public boolean buttonPress(String arg)
 o saveGif
  public void saveGif()
 o drawIcon
  public int drawIcon(Graphics g,
                      int x,
                      int y)
 o drawTrash
  public Int2Range drawTrash(Graphics g,
                             int x,
                             int y)

All Packages  Class Hierarchy  This Package  Previous  Next  Index