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
-
CHILD
-
-
NODE
-
-
SGMLTOC(SGMLTree, int)
-
-
action(Event, Object)
- this handles button events in the buttonBar provided by simpleFrame;
if there is a Drawable, passes the event to it
-
addBookmark(SGMLNode)
- add a node to 'bookmark' list
-
addClipboard()
-
-
addFileTransporter()
-
-
addFileTransporter(FileTransporter)
- specialist File Transporter (subclassed)
-
addTrashCan()
-
-
addTreeTransporter()
-
-
addTreeTransporter(TreeTransporter)
- add a specialist TreeTransporter (subclassed)
-
buttonPress(String)
-
-
calculateTOC(int, int)
-
-
deleteNode(SGMLNode)
-
-
destroy()
- kill the Frame in which the SGMLTOC is housed
-
display(Graphics)
-
-
drawHide(Graphics, SGMLNode, int, int, int)
- draw a box with - or + to hide node or its children.
-
drawIcon(Graphics, int, int)
-
-
drawNode(Graphics, SGMLNode, Int2, int)
-
-
drawNodes(Graphics)
- draw the nodes, but don't start till after the calculateTOC has been
done
-
drawTrash(Graphics, int, int)
-
-
getBookmarks()
- get 'bookmark' list
-
getSelectedNode()
- return the currently selected node (e.g.
-
getVert()
- the vertical pixel distance between lines
-
handleEvent(Event)
-
-
keyDown(Event, int)
- this is sent from above since panels don't seem to catch key presses???
-
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
-
mouseDrag(Event, int, int)
-
-
mouseUp(Event, int, int)
- corrects for the scrolling offset and then routes the event to the
mouse manager
-
paint(Graphics)
- this is where all the drawing takes place.
-
paint1(Graphics)
-
-
saveGif()
-
-
search()
-
-
setDepth(int)
-
-
setInlinedObjects(boolean)
- are Objects to displayed on the TOC?
-
setMaxChildren(int)
- the maximum number of children to be displayed
-
showHelp()
- show the help text
NODE
public final static int NODE
CHILD
public final static int CHILD
SGMLTOC
public SGMLTOC(SGMLTree t,
int depth)
showHelp
public void showHelp()
- show the help text
- Overrides:
- showHelp in class ScrollableTopLevel
paint
public void paint(Graphics g)
- this is where all the drawing takes place.
- Overrides:
- paint in class ScrollableTopLevel
paint1
public void paint1(Graphics g)
display
public void display(Graphics g)
destroy
public void destroy()
- kill the Frame in which the SGMLTOC is housed
addFileTransporter
public void addFileTransporter()
addFileTransporter
public void addFileTransporter(FileTransporter ft)
- specialist File Transporter (subclassed)
addTrashCan
public void addTrashCan()
addClipboard
public void addClipboard()
addTreeTransporter
public void addTreeTransporter()
addTreeTransporter
public void addTreeTransporter(TreeTransporter ti)
- add a specialist TreeTransporter (subclassed)
setInlinedObjects
public void setInlinedObjects(boolean b)
- are Objects to displayed on the TOC?
getVert
public int getVert()
- the vertical pixel distance between lines
setDepth
public void setDepth(int depth)
addBookmark
public void addBookmark(SGMLNode n) throws DifferentSGMLTreesException
- add a node to 'bookmark' list
- Throws: DifferentSGMLTreesException
- all Nodes must be on same Tree
getBookmarks
public SGMLNodeIndexSet getBookmarks()
- get 'bookmark' list
setMaxChildren
public void setMaxChildren(int max)
- the maximum number of children to be displayed
calculateTOC
public void calculateTOC(int nodeIndex,
int level)
drawNodes
public void drawNodes(Graphics g)
- draw the nodes, but don't start till after the calculateTOC has been
done
drawNode
public void drawNode(Graphics g,
SGMLNode n,
Int2 p,
int nodeSerial)
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
getSelectedNode
public SGMLNode getSelectedNode()
- return the currently selected node (e.g. title highlighted in green
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
mouseDrag
public boolean mouseDrag(Event evt,
int x,
int y)
- Overrides:
- mouseDrag in class ScrollableTopLevel
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
search
public void search()
deleteNode
public void deleteNode(SGMLNode n)
handleEvent
public boolean handleEvent(Event e)
- Overrides:
- handleEvent in class ScrollableTopLevel
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
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
buttonPress
public boolean buttonPress(String arg)
saveGif
public void saveGif()
drawIcon
public int drawIcon(Graphics g,
int x,
int y)
drawTrash
public Int2Range drawTrash(Graphics g,
int x,
int y)
All Packages Class Hierarchy This Package Previous Next Index