Class pmr.cml.DrawableX_Node
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pmr.cml.DrawableX_Node

java.lang.Object
   |
   +----pmr.sgml.SGMLNode
           |
           +----pmr.sgml.DrawableSGMLNode
                   |
                   +----pmr.cml.DrawableX_Node

public class DrawableX_Node
extends DrawableSGMLNode
This is the superclass of all CMLNode objects. Objects can be display()ed when they are (by default) added to a ScrollableTopLevel
Author:
(C) P. Murray-Rust, 1996

Constructor Index

 o DrawableX_Node(SGMLTree)
some nodes will not have GIs - they are given a GI of "UNKNOWN"
 o DrawableX_Node(String, SGMLTree)

Method Index

 o action(Event, Object)
pass any button actions to the object
 o addTitle(String)
replaces current title with title and adds TITLE Attribute
 o debug()
for debug
 o display(Graphics)
used by the ScrollableTopLevel to paint the object, or can be used to draw the object to somewhere else.
 o display(Graphics, Component)
this is the primary mechanism for calling the display and the component can be captured here.
 o display(Int2Range)
alternative display routine when we know the target screen area for the object
 o display(IntSet)
display the subaddresses in the node; we might need to alter the hierarchy to cater for this...
 o drawIcon(Graphics, int, int)
draw a CML icon
 o generalDisplay(Graphics)
generic display unrelated to object details.
 o getFont()
get the font for this node
 o getName()
get the node name (e.g.
 o getTitle()
get title from TITLE, DICTNAME, BUILTIN if present, else TITLE
 o highlight(IntSet)
highlight any subAddresses in Node - default is no action unless overridden
 o mayContain(SGMLNode)
can this node contain others.
 o mouseDown(Event, int, int)
action when mouse is clicked; if not overridden, no action
 o mouseDrag(Event, int, int)
action when mouse is dragged; if not overridden, no action
 o mouseUp(Event, int, int)
action when mouse is unclicked; if not overridden, no action
 o processMouseBox(Int2Range)
action when mouseBox has been swept out; if not overridden, tries to scale the object.
 o receiveEvent(Object, int)
act on a register callback (CRUDE); gets a simple message (an item number) from a sending object
 o repaint()
repaint the component (the best we can do)
 o setFont(Font)
set the font for this node
 o showHelp()
a help file for the Node.

Constructors

 o DrawableX_Node
  public DrawableX_Node(SGMLTree tree)
some nodes will not have GIs - they are given a GI of "UNKNOWN"
 o DrawableX_Node
  public DrawableX_Node(String giName,
                        SGMLTree tree)

Methods

 o getTitle
  public String getTitle()
get title from TITLE, DICTNAME, BUILTIN if present, else TITLE
Overrides:
getTitle in class SGMLNode
 o addTitle
  public void addTitle(String title)
replaces current title with title and adds TITLE Attribute
 o mayContain
  public boolean mayContain(SGMLNode n)
can this node contain others. (Full DTD parsing is not enabled, so order and count are not used at present. Subclasses should override this where they can prove that something canNOT be conatined by this node
Overrides:
mayContain in class SGMLNode
 o getName
  public String getName()
get the node name (e.g. required for a FullAddress). If the name is not given, returns a string of form NODE123
 o drawIcon
  public int drawIcon(Graphics g,
                      int x,
                      int y)
draw a CML icon
Overrides:
drawIcon in class SGMLNode
 o showHelp
  public void showHelp()
a help file for the Node. Usually subclassed
Overrides:
showHelp in class DrawableSGMLNode
 o receiveEvent
  public void receiveEvent(Object sender,
                           int item)
act on a register callback (CRUDE); gets a simple message (an item number) from a sending object
 o display
  public void display(Int2Range screenLimits)
alternative display routine when we know the target screen area for the object
 o display
  public void display(Graphics g,
                      Component comp)
this is the primary mechanism for calling the display and the component can be captured here. It's called from the paint(g) routine, so may be used for double buffering, etc. VERY experimental
Overrides:
display in class DrawableSGMLNode
 o display
  public void display(Graphics g)
used by the ScrollableTopLevel to paint the object, or can be used to draw the object to somewhere else. By using the Scaler2D approach it is possible to draw the object to any desired screen location. Normally overriden.
Overrides:
display in class DrawableSGMLNode
 o generalDisplay
  public void generalDisplay(Graphics g)
generic display unrelated to object details. Must be called from the end display(g); EXPERIMENTAL - to test clipboard cut/paste approach
 o display
  public void display(IntSet subAddress)
display the subaddresses in the node; we might need to alter the hierarchy to cater for this...
 o setFont
  public void setFont(Font f)
set the font for this node
 o getFont
  public Font getFont()
get the font for this node
 o highlight
  public void highlight(IntSet is)
highlight any subAddresses in Node - default is no action unless overridden
 o mouseUp
  public boolean mouseUp(Event evt,
                         int x,
                         int y)
action when mouse is unclicked; if not overridden, no action
Overrides:
mouseUp in class DrawableSGMLNode
 o mouseDown
  public boolean mouseDown(Event evt,
                           int x,
                           int y)
action when mouse is clicked; if not overridden, no action
Overrides:
mouseDown in class DrawableSGMLNode
 o mouseDrag
  public boolean mouseDrag(Event evt,
                           int x,
                           int y)
action when mouse is dragged; if not overridden, no action
Overrides:
mouseDrag in class DrawableSGMLNode
 o processMouseBox
  public boolean processMouseBox(Int2Range box)
action when mouseBox has been swept out; if not overridden, tries to scale the object. To disable this, override this method with 'return true'
Overrides:
processMouseBox in class DrawableSGMLNode
 o action
  public boolean action(Event e,
                        Object arg)
pass any button actions to the object
Overrides:
action in class DrawableSGMLNode
 o repaint
  public void repaint()
repaint the component (the best we can do)
 o debug
  public void debug()
for debug
Overrides:
debug in class DrawableSGMLNode

All Packages  Class Hierarchy  This Package  Previous  Next  Index