Multivalent API

multivalent.node
Class LeafBlock

java.lang.Object
  extended by multivalent.VObject
      extended by multivalent.Node
          extended by multivalent.Leaf
              extended by multivalent.node.LeafBlock
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
FixedLeafBlock

public class LeafBlock
extends Leaf

Block empty rectangular placeholder, for replacing advertisements, say.

Version:
$Revision: 1.3 $ $Date: 2002/02/02 13:41:39 $

Field Summary
 
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
 
Fields inherited from class multivalent.VObject
attr_
 
Constructor Summary
LeafBlock(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attr, INode parent, int w, int h)
           
 
Method Summary
 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().
 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, eventNode, formatNode, 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
 

Constructor Detail

LeafBlock

public LeafBlock(java.lang.String name,
                 java.util.Map<java.lang.String,java.lang.Object> attr,
                 INode parent,
                 int w,
                 int h)
Method Detail

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

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 node
height - 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

Multivalent API