multivalent.node
Class LeafShadow
java.lang.Object
multivalent.VObject
multivalent.Node
multivalent.Leaf
multivalent.node.LeafShadow
- All Implemented Interfaces:
- java.lang.Cloneable
- public class LeafShadow
- extends Leaf
Leaf to shadow structural node in absolute visual space.
The document tree is primarily structural, but elements such as floats and menus cut across structure when painted.
The node itself is a shadow, but it takes another node to shadow, so it operates as kind of an internal node too.
- Version:
- $Revision: 1.4 $ $Date: 2002/02/02 13:41:40 $
Fields inherited from class multivalent.Node |
align, ALIGN_INVALID, ATTR_ID, ATTR_SCRIPT, baseline, BASELINE, bbox, BOTH, BOTTOM, CENTER, CHAR, FILL, floats, INHERIT, JUSTIFY, LEFT, MAXNONSTRUCTDEPTH, MIDDLE, name_, NONE, observers_, parent_, PROBEWIDTH, RIGHT, sticky_, stickycnt_, TOP, valid_, valign |
Constructor Summary |
LeafShadow(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> attr,
INode parent,
Node shadowed)
|
Method Summary |
boolean |
eventNode(java.awt.AWTEvent e,
java.awt.Point rel)
unless overridden, leaves see if owner is interested |
boolean |
formatBeforeAfter(int width,
int height,
Context cx)
In the depth-first tree traversal to format tree,
Before and after methods of behavior observers invoked here; actual formatting passed on to formatNode(). |
boolean |
formatNode(int width,
int height,
Context cx)
Handles span transitions on node and elided portions. |
Node |
getShadowed()
|
void |
paintNode(java.awt.Rectangle docclip,
Context cx)
Call paintNodeContent with longest range of unchanged Context. |
Methods inherited from class multivalent.Leaf |
append, checkRep, clipboardBeforeAfter, clipboardNode, copy, cut, delete, dx, dy, eatme, eventBeforeAfter, formatNodeContent, getFirstLeaf, getLastLeaf, insert, insert, isLeaf, lengthTo, markDirtySubtreeDown, offset2rel, paintBeforeAfter, paintNodeContent, paste, paste, removeTidy, setName, split, subelement, subelementCalc, subelementHit |
Methods inherited from class multivalent.Node |
addObserver, addSticky, addSticky, breakAfter, breakBefore, childNum, clipboardBeforeAfter, clone, cmp, commonAncestor, commonAncestor, contains, contains, deleteObserver, dump, dump, dump, findBFS, findBFS, findBFS, findDFS, findDFS, findDFS, findDFS, getAbsLocation, getActivesAt, getActivesAt, getActivesAt, getBbox, getBrowser, getDocument, getElementById, getIScrollPane, getName, getNextLeaf, getNextNode, getNodeName, getObservers, getParentNode, getPrevLeaf, getPrevNode, getRelLocation, getRoot, getSticky, indexSticky, intersects, isStruct, isValid, markDirty, markDirtySubtree, markDirtyTo, morphInto, reformat, remove, removeSticky, removeSticky, repaint, repaint, repaint, repaint, scrollTo, scrollTo, setParentNode, setValid, size, sizeSticky, spanChunky, spanChunky, structChildNum, toString |
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 |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LeafShadow
public LeafShadow(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> attr,
INode parent,
Node shadowed)
getShadowed
public Node getShadowed()
formatBeforeAfter
public boolean formatBeforeAfter(int width,
int height,
Context cx)
- Description copied from class:
Node
- In the depth-first tree traversal to format tree,
Before and after methods of behavior observers invoked here; actual formatting passed on to formatNode().
In documents with layed out content, children set their dimensions and parents set their location.
In documents with absolutely positioned content, usually leaves position themselves and internal nodes compute relative coordinates.
If node is valid, its entire subtree is assumed formatted and this method returns without doing anything.
Behavior observers return true to shortcircuit traversal of subtree, which this method on Node passes back up the tree.
- Overrides:
formatBeforeAfter
in class Leaf
- Parameters:
width
- of screen, or fraction thereof available to be taken by nodeheight
- of screen, or fraction thereof available to be taken by node (largely ignored in HTML, which has infinitely long scroll, except in FRAME)- See Also:
Behavior
formatNode
public boolean formatNode(int width,
int height,
Context cx)
- Description copied from class:
Leaf
- Handles span transitions on node and elided portions.
Called medium-specific leaf formatNodeContent in hunks of maximum-length homogeneous span coverage to get content size.
Marks node valid, so if node not (e.g., LeafImage's image not loaded), set valid_=false in formatNodeContent.
- Overrides:
formatNode
in class Leaf
paintNode
public void paintNode(java.awt.Rectangle docclip,
Context cx)
- Description copied from class:
Leaf
- Call paintNodeContent with longest range of unchanged Context.
- Overrides:
paintNode
in class Leaf
eventNode
public boolean eventNode(java.awt.AWTEvent e,
java.awt.Point rel)
- Description copied from class:
Leaf
- unless overridden, leaves see if owner is interested
- Overrides:
eventNode
in class Leaf
- See Also:
TreeEvent
,
SemanticEvent