|
Multivalent API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmultivalent.VObject
multivalent.Node
multivalent.Leaf
multivalent.node.LeafText
Superclass for text leaf nodes.
Field Summary | |
---|---|
protected java.lang.String |
estr_
Name is Unicode, these are characters encoded according to font that will draw them. |
protected static double[] |
Widths_
Array of letter x-positions. |
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 | |
---|---|
LeafText(java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> attr,
INode parent)
|
|
LeafText(java.lang.String name,
java.lang.String estr,
java.util.Map<java.lang.String,java.lang.Object> attr,
INode parent)
|
Method Summary | |
---|---|
void |
append(Leaf l)
Append leaf to the end of this one, adjusting content, spans, and so on. |
void |
append(java.lang.String text)
|
void |
append(java.lang.String text,
java.lang.String estr)
|
void |
clipboardBeforeAfter(java.lang.StringBuffer sb,
int start,
int end)
|
void |
clipboardNode(java.lang.StringBuffer sb)
To build up selection, pass a StringBuffer to media-specific leaves, which fill it as appropriate for that medium. |
java.lang.String |
getText()
Returns Unicode text. |
java.awt.Point |
offset2rel(int offset)
Given an offset into a Leaf, return corresponding subcomponent geometric point. |
int |
size()
Number of addressable components in node: number of children in INode, number of letters in text leaf, zero for invisible nodes such as comments, and otherwise usually one (the default). |
void |
subelementCalc(Context cx)
Calculates an array of x-position at each letter in word. |
int |
subelementHit(java.awt.Point rel)
Given a geometric point within the leaf, return index of corresponding subcomponent (e.g., letter within word). |
Methods inherited from class multivalent.Leaf |
---|
checkRep, copy, cut, delete, dx, dy, eatme, eventBeforeAfter, eventNode, formatBeforeAfter, formatNode, formatNodeContent, getFirstLeaf, getLastLeaf, insert, insert, isLeaf, lengthTo, markDirtySubtreeDown, paintBeforeAfter, paintNode, paintNodeContent, paste, paste, removeTidy, setName, split, subelement |
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, 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 |
Field Detail |
---|
protected static double[] Widths_
protected java.lang.String estr_
Constructor Detail |
---|
public LeafText(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attr, INode parent)
public LeafText(java.lang.String name, java.lang.String estr, java.util.Map<java.lang.String,java.lang.Object> attr, INode parent)
Method Detail |
---|
public java.lang.String getText()
public int size()
Node
size
in class Node
public void append(Leaf l)
Leaf
append
in class Leaf
public void append(java.lang.String text)
public void append(java.lang.String text, java.lang.String estr)
public void clipboardNode(java.lang.StringBuffer sb)
Node
clipboardNode
in class Leaf
public void clipboardBeforeAfter(java.lang.StringBuffer sb, int start, int end)
clipboardBeforeAfter
in class Leaf
public void subelementCalc(Context cx)
subelementCalc
in class Leaf
cx
- is up-to-date for this Nodepublic int subelementHit(java.awt.Point rel)
Leaf
subelementHit
in class Leaf
public java.awt.Point offset2rel(int offset)
Leaf
offset2rel
in class Leaf
|
Multivalent API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |