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
-
DrawableX_Node(SGMLTree)
- some nodes will not have GIs - they are given a GI of "UNKNOWN"
-
DrawableX_Node(String, SGMLTree)
-
-
action(Event, Object)
- pass any button actions to the object
-
addTitle(String)
- replaces current title with title and adds TITLE Attribute
-
debug()
- for debug
-
display(Graphics)
- used by the ScrollableTopLevel to paint the object, or can be used to
draw the object to somewhere else.
-
display(Graphics, Component)
- this is the primary mechanism for calling the display and the component
can be captured here.
-
display(Int2Range)
- alternative display routine when we know the target screen area for
the object
-
display(IntSet)
- display the subaddresses in the node; we might need to alter the
hierarchy to cater for this...
-
drawIcon(Graphics, int, int)
- draw a CML icon
-
generalDisplay(Graphics)
- generic display unrelated to object details.
-
getFont()
- get the font for this node
-
getName()
- get the node name (e.g.
-
getTitle()
- get title from TITLE, DICTNAME, BUILTIN if present, else TITLE
-
highlight(IntSet)
- highlight any subAddresses in Node - default is no action unless overridden
-
mayContain(SGMLNode)
- can this node contain others.
-
mouseDown(Event, int, int)
- action when mouse is clicked; if not overridden, no action
-
mouseDrag(Event, int, int)
- action when mouse is dragged; if not overridden, no action
-
mouseUp(Event, int, int)
- action when mouse is unclicked; if not overridden, no action
-
processMouseBox(Int2Range)
- action when mouseBox has been swept out; if not overridden, tries to
scale the object.
-
receiveEvent(Object, int)
- act on a register callback (CRUDE); gets a simple message (an item number)
from a sending object
-
repaint()
- repaint the component (the best we can do)
-
setFont(Font)
- set the font for this node
-
showHelp()
- a help file for the Node.
DrawableX_Node
public DrawableX_Node(SGMLTree tree)
- some nodes will not have GIs - they are given a GI of "UNKNOWN"
DrawableX_Node
public DrawableX_Node(String giName,
SGMLTree tree)
getTitle
public String getTitle()
- get title from TITLE, DICTNAME, BUILTIN if present, else TITLE
- Overrides:
- getTitle in class SGMLNode
addTitle
public void addTitle(String title)
- replaces current title with title and adds TITLE Attribute
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
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
drawIcon
public int drawIcon(Graphics g,
int x,
int y)
- draw a CML icon
- Overrides:
- drawIcon in class SGMLNode
showHelp
public void showHelp()
- a help file for the Node. Usually subclassed
- Overrides:
- showHelp in class DrawableSGMLNode
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
display
public void display(Int2Range screenLimits)
- alternative display routine when we know the target screen area for
the object
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
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
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
display
public void display(IntSet subAddress)
- display the subaddresses in the node; we might need to alter the
hierarchy to cater for this...
setFont
public void setFont(Font f)
- set the font for this node
getFont
public Font getFont()
- get the font for this node
highlight
public void highlight(IntSet is)
- highlight any subAddresses in Node - default is no action unless overridden
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
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
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
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
action
public boolean action(Event e,
Object arg)
- pass any button actions to the object
- Overrides:
- action in class DrawableSGMLNode
repaint
public void repaint()
- repaint the component (the best we can do)
debug
public void debug()
- for debug
- Overrides:
- debug in class DrawableSGMLNode
All Packages Class Hierarchy This Package Previous Next Index