Multivalent API

multivalent.gui
Class VTextArea

java.lang.Object
  extended by multivalent.VObject
      extended by multivalent.Node
          extended by multivalent.INode
              extended by multivalent.IScrollPane
                  extended by multivalent.gui.VTextArea
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
VEntry

public class VTextArea
extends IScrollPane

Editable area (not necessarily all text). Depends on other behaviors, such as BindingsDefault and BindingsEmacs, for key bindings, and other nodes to display content.

Content kept as subtree, available as string from getContent().

Version:
$Revision: 1.3 $ $Date: 2003/06/02 05:21:29 $

Field Summary
 
Fields inherited from class multivalent.IScrollPane
editable, hchars_, ibbox, MSG_FORMATTED, MSG_SCROLL_TO, wchars_
 
Fields inherited from class multivalent.INode
border, INSETS, INSETS_ZERO, margin, padding
 
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
VTextArea(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attr, INode parent)
           
VTextArea(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attr, INode parent, INode layout)
           
 
Method Summary
 boolean breakAfter()
           
 boolean breakBefore()
           
 boolean eventNode(java.awt.AWTEvent e, java.awt.Point rel)
          If no content, route mouse to 0-length leaf, so can click and type.
protected  void fixContent()
          appendChild() adds to formatting node, which is VTextArea's first and only child, instead.
 boolean formatNode(int width, int height, Context cx)
          If length of dimension set in characters or to dynamic (these mutually cancel each other out--last one set wins), use that to set corresponding bounding box dimension.
 java.lang.String getContent()
          Collect up textual leaves into a space-separated String.
 void paintNode(java.awt.Rectangle docclip, Context cx)
          Paints contents in scrolled, clipped Graphics2D.
 
Methods inherited from class multivalent.IScrollPane
checkRep, dump, dx, dy, getHsb, getIScrollPane, getVsb, paintBeforeAfter, scrollBy, scrollTo, scrollTo, setScrollbarShowPolicy, setSizeChars
 
Methods inherited from class multivalent.INode
addCategory, appendChild, childAt, childNum, clipboardNode, clone, contains, eventBeforeAfter, findDFS, formatBeforeAfter, getElementById, getFirstChild, getFirstLeaf, getLastChild, getLastLeaf, getNextSibling, getPreviousSibling, insertChildAt, isStruct, markDirtySubtreeDown, removeAllChildren, removeChild, removeChildAt, setChildAt, setName, size, structChildAt, structChildNum, structsize
 
Methods inherited from class multivalent.Node
addObserver, addSticky, addSticky, childNum, clipboardBeforeAfter, cmp, commonAncestor, commonAncestor, contains, deleteObserver, dump, dump, findBFS, findBFS, findBFS, findDFS, findDFS, findDFS, getAbsLocation, getActivesAt, getActivesAt, getActivesAt, getBbox, getBrowser, getDocument, getName, getNextLeaf, getNextNode, getNodeName, getObservers, getParentNode, getPrevLeaf, getPrevNode, getRelLocation, getRoot, getSticky, indexSticky, intersects, isLeaf, isValid, markDirty, markDirtySubtree, markDirtyTo, morphInto, reformat, remove, removeSticky, removeSticky, removeTidy, 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
 

Constructor Detail

VTextArea

public VTextArea(java.lang.String name,
                 java.util.Map<java.lang.String,java.lang.Object> attr,
                 INode parent)

VTextArea

public VTextArea(java.lang.String name,
                 java.util.Map<java.lang.String,java.lang.Object> attr,
                 INode parent,
                 INode layout)
Parameters:
layout - INode, defaults to IParaBox. Content should be added to this node, which should be the single child of VTextArea.
Method Detail

fixContent

protected void fixContent()
appendChild() adds to formatting node, which is VTextArea's first and only child, instead.


formatNode

public boolean formatNode(int width,
                          int height,
                          Context cx)
Description copied from class: IScrollPane
If length of dimension set in characters or to dynamic (these mutually cancel each other out--last one set wins), use that to set corresponding bounding box dimension. Else maintain length, which should have been set externally beforehand. Sends IScrollPane.MSG_FORMATTED.

Overrides:
formatNode in class IScrollPane
See Also:
FixedI

breakBefore

public boolean breakBefore()
Overrides:
breakBefore in class INode

breakAfter

public boolean breakAfter()
Overrides:
breakAfter in class INode

paintNode

public void paintNode(java.awt.Rectangle docclip,
                      Context cx)
Description copied from class: IScrollPane
Paints contents in scrolled, clipped Graphics2D.

Overrides:
paintNode in class IScrollPane

eventNode

public boolean eventNode(java.awt.AWTEvent e,
                         java.awt.Point rel)
If no content, route mouse to 0-length leaf, so can click and type.

Overrides:
eventNode in class IScrollPane
See Also:
TreeEvent, SemanticEvent

getContent

public java.lang.String getContent()
Collect up textual leaves into a space-separated String.


Multivalent API