Multivalent API

multivalent.devel
Class ShowDocTree

java.lang.Object
  extended by multivalent.VObject
      extended by multivalent.Behavior
          extended by multivalent.devel.ShowDocTree
All Implemented Interfaces:
EventListener, java.util.EventListener

public class ShowDocTree
extends Behavior
implements EventListener

Replace view current document with infomration on data structure: indented to show nesting, with name/GI, bbox, attributes, stickies, .... Lets the original document paint so it formats properly (including images which load asynchronously). Can scroll to see all of tree vs lame Windoze DOS window. Make a selection in the formatted document to jump to that point on the tree view. If line has red background, the node failed its self test. Click button-3 on node-line for validation details, list of actives. Turn on by going to Help menu and turning on the Debug switch. Then go to the new Debug menu and choose "Show Doc Tree" or "Show Doc Root".

Version:
$Revision: 1.6 $ $Date: 2003/06/02 05:15:11 $
See Also:
- show bbox bounds in context of document

Field Summary
static java.lang.String MSG_SET_SHOWLEAF
          Toggle whether to show leaves or not.
static java.lang.String MSG_SHOW
          Request display of ducment tree.
static java.lang.String MSG_SHOWROOT
          Request display of ducment tree, rooted at uber-Root.
 
Fields inherited from class multivalent.Behavior
ATTR_BEHAVIOR, name_
 
Fields inherited from class multivalent.VObject
attr_
 
Constructor Summary
ShowDocTree()
           
 
Method Summary
protected  int drawStringWidth(java.awt.Graphics2D g, java.lang.String str, int x, int y, java.awt.Color bkgnd, NFont f)
           
 void event(java.awt.AWTEvent e)
           
 boolean eventAfter(java.awt.AWTEvent e, java.awt.Point rel, Node obsn)
          During Behavior.eventBefore(AWTEvent, Point, Node), the behaviors that take primary action to that event should do so, after having given other behaviors the opportunity to filter it during eventBefore.
 boolean eventBefore(java.awt.AWTEvent e, java.awt.Point rel, Node obsn)
           
 void listNodes(Node n, java.util.List<Node> l)
          Compute liinearized tree of nodes.
 boolean paintAfter(Context cx, Node ignore)
          Entire document constructed dynamically as painted.
 void restore(ESISNode n, java.util.Map<java.lang.String,java.lang.Object> attr, Layer layer)
          Takes the place of a constructor's initialization functions; that is, it is invoked exactly once immediately after object instantiation.
 boolean semanticEventAfter(SemanticEvent se, java.lang.String msg)
          Round robin distribution to all behaviors.
 boolean semanticEventBefore(SemanticEvent se, java.lang.String msg)
          Round robin distribution to all behaviors.
 
Methods inherited from class multivalent.Behavior
buildAfter, buildBefore, checkRep, clipboardAfter, clipboardBefore, createUI, destroy, formatAfter, formatBefore, getBrowser, getDocument, getInstance, getInstance, getLayer, getLogger, getName, getPreference, getRoot, isEditable, paintBefore, putPreference, redo, restoreChildren, save, setName, toString, undo
 
Methods inherited from class multivalent.VObject
attrEntrySetIterator, attrKeysIterator, clearAttributes, getAttr, getAttr, getAttributes, getGlobal, getValue, hasAttributes, putAttr, removeAttr, setAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MSG_SHOW

public static final java.lang.String MSG_SHOW
Request display of ducment tree.

"showDocTree".

See Also:
Constant Field Values

MSG_SHOWROOT

public static final java.lang.String MSG_SHOWROOT
Request display of ducment tree, rooted at uber-Root.

"showDocTree/Root".

See Also:
Constant Field Values

MSG_SET_SHOWLEAF

public static final java.lang.String MSG_SET_SHOWLEAF
Toggle whether to show leaves or not.

"showDocTree/setShowLeaf".

See Also:
Constant Field Values
Constructor Detail

ShowDocTree

public ShowDocTree()
Method Detail

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se,
                                   java.lang.String msg)
Description copied from class: Behavior
Round robin distribution to all behaviors. Message and clientData unpacked from SemanticEvent for convenience. Message is interned, so if you compare to a literal, you can use "==". Message can't be changed (it can be short-circuited out of), but client data can be mutated as it is passed along (so it's not passed as a parameter).

Overrides:
semanticEventBefore in class Behavior

semanticEventAfter

public boolean semanticEventAfter(SemanticEvent se,
                                  java.lang.String msg)
Description copied from class: Behavior
Round robin distribution to all behaviors. Message and clientData unpacked from SemanticEvent for convenience. Message is interned, so if you compare to a literal, you can use "==". Message can't be changed (it can be short-circuited out of), but client data can be mutated as it is passed along (so it's not passed as a parameter).

Overrides:
semanticEventAfter in class Behavior

listNodes

public void listNodes(Node n,
                      java.util.List<Node> l)
Compute liinearized tree of nodes.


eventBefore

public boolean eventBefore(java.awt.AWTEvent e,
                           java.awt.Point rel,
                           Node obsn)
Overrides:
eventBefore in class Behavior
See Also:
SemanticEvent, AWTEvent, Browser, LensMan

eventAfter

public boolean eventAfter(java.awt.AWTEvent e,
                          java.awt.Point rel,
                          Node obsn)
Description copied from class: Behavior
During Behavior.eventBefore(AWTEvent, Point, Node), the behaviors that take primary action to that event should do so, after having given other behaviors the opportunity to filter it during eventBefore.

Overrides:
eventAfter in class Behavior

event

public void event(java.awt.AWTEvent e)
Specified by:
event in interface EventListener

drawStringWidth

protected int drawStringWidth(java.awt.Graphics2D g,
                              java.lang.String str,
                              int x,
                              int y,
                              java.awt.Color bkgnd,
                              NFont f)

paintAfter

public boolean paintAfter(Context cx,
                          Node ignore)
Entire document constructed dynamically as painted.

Overrides:
paintAfter in class Behavior

restore

public void restore(ESISNode n,
                    java.util.Map<java.lang.String,java.lang.Object> attr,
                    Layer layer)
Description copied from class: Behavior
Takes the place of a constructor's initialization functions; that is, it is invoked exactly once immediately after object instantiation. When restored from hub, passed XML content subtree if any as first parameter and attributes from XML tag's attributes. This protocol cannot be short-circuited.

Overrides:
restore in class Behavior

Multivalent API