multivalent.node

Class LeafText

public class LeafText extends Leaf

Superclass for text leaf nodes.

Version: $Revision: 1.7 $ $Date: 2002/02/02 13:41:40 $

Field Summary
protected Stringestr_
Name is Unicode, these are characters encoded according to font that will draw them.
protected static int[]Widths_
Array of letter x-positions.
Constructor Summary
LeafText(String name, Map<String,Object> attr, INode parent)
LeafText(String name, String estr, Map<String,Object> attr, INode parent)
Method Summary
voidappend(Leaf l)
voidappend(String text)
voidappend(String text, String estr)
voidclipboardBeforeAfter(StringBuffer sb, int start, int end)
voidclipboardNode(StringBuffer sb)
StringgetText()
Returns Unicode text.
Pointoffset2rel(int offset)
intsize()
voidsubelementCalc(Context cx)
Calculates an array of x-position at each letter in word.
intsubelementHit(Point rel)

Field Detail

estr_

protected String estr_
Name is Unicode, these are characters encoded according to font that will draw them.

Widths_

protected static int[] Widths_
Array of letter x-positions.

Constructor Detail

LeafText

public LeafText(String name, Map<String,Object> attr, INode parent)

LeafText

public LeafText(String name, String estr, Map<String,Object> attr, INode parent)

Method Detail

append

public void append(Leaf l)

append

public void append(String text)

append

public void append(String text, String estr)

clipboardBeforeAfter

public void clipboardBeforeAfter(StringBuffer sb, int start, int end)

clipboardNode

public void clipboardNode(StringBuffer sb)

getText

public String getText()
Returns Unicode text.

offset2rel

public Point offset2rel(int offset)

size

public int size()

subelementCalc

public void subelementCalc(Context cx)
Calculates an array of x-position at each letter in word.

Parameters: Context is up-to-date for this Node

subelementHit

public int subelementHit(Point rel)