Multivalent API

multivalent.std.ui
Class FontRender

java.lang.Object
  extended by multivalent.VObject
      extended by multivalent.Behavior
          extended by multivalent.std.ui.FontRender

public class FontRender
extends Behavior

Font rendering control: fractional metrics. Bitmap placement usually pretty good but still not as good, so let user choose.

Version:
$Revision: 2.0 $ $Date: 2005/07/28 19:37:26 $

Field Summary
static java.lang.String MSG_FONT_BITMAP_CACHE
           
 
Fields inherited from class multivalent.Behavior
ATTR_BEHAVIOR, name_
 
Fields inherited from class multivalent.VObject
attr_
 
Constructor Summary
FontRender()
           
 
Method Summary
 void buildBefore(Document doc)
          A round robin protocol, here traversing all behaviors from highest to lowest priority, during which main contributors of document content (called media adaptors) hack their content into the tree, and annotators set Marks to robust anchor to locations to hack in buildAfter so as not to disturb positioning by other annotations.
 boolean paintAfter(Context cx, Node node)
          A tree walk protocol, called before observed node has been painted.
 boolean paintBefore(Context cx, Node node)
          A tree walk protocol, called before observed node has been painted.
 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, checkRep, clipboardAfter, clipboardBefore, createUI, destroy, eventAfter, eventBefore, formatAfter, formatBefore, getBrowser, getDocument, getInstance, getInstance, getLayer, getLogger, getName, getPreference, getRoot, isEditable, putPreference, redo, restore, 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_FONT_BITMAP_CACHE

public static final java.lang.String MSG_FONT_BITMAP_CACHE
See Also:
Constant Field Values
Constructor Detail

FontRender

public FontRender()
Method Detail

buildBefore

public void buildBefore(Document doc)
Description copied from class: Behavior
A round robin protocol, here traversing all behaviors from highest to lowest priority, during which main contributors of document content (called media adaptors) hack their content into the tree, and annotators set Marks to robust anchor to locations to hack in buildAfter so as not to disturb positioning by other annotations. That is, behaviors build the document tree by constructing nodes, which themselves are usually specialized for concrete document types. This protocol cannot be short-circuited.

Overrides:
buildBefore in class Behavior
See Also:
Mark

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

paintBefore

public boolean paintBefore(Context cx,
                           Node node)
Description copied from class: Behavior
A tree walk protocol, called before observed node has been painted. Called in same coordinate space as node's painting. Can be used draw special background, but usual background setting is done by spans or style sheets.

Overrides:
paintBefore in class Behavior
Returns:
true to short-circuit to paintAfter at that node, bypassing painting of the subtree.

paintAfter

public boolean paintAfter(Context cx,
                          Node node)
Description copied from class: Behavior
A tree walk protocol, called before observed node has been painted. Called in same coordinate space as node's painting. Use to draw annotations at node's location. For instance, Search uses this to decorate the scrollbar (a type of node) with location of matches.

Overrides:
paintAfter in class Behavior

Multivalent API