multivalent.node
public class LeafAscii extends LeafText
Each word gets its own leaf. I used to think this was wasteful, as opposed to having a leaf per screen line, say, but if a word costs 50 bytes instead of 5, that just means that a 10,000 word page (which is big) costs 500K instead of 50K, and 100,000 words cost 5MB instead of 500K. No sweat for today's memory sizes.
Version: $Revision: 1.3 $ $Date: 2002/04/18 23:44:24 $
See Also: ASCII
Constructor Summary | |
---|---|
LeafAscii(String name, Map<String,Object> attr, INode parent) |
Method Summary | |
---|---|
boolean | formatNodeContent(Context cx, int start, int end) Similar to paintNodeContent, set right font, measure with FontMetrics.stringString(); |
boolean | paintNodeContent(Context cx, int start, int end) To paint content, set right font, use Graphics.drawString(); |