Multivalent API

multivalent.gui
Class VButton

java.lang.Object
  extended by multivalent.VObject
      extended by multivalent.Node
          extended by multivalent.INode
              extended by multivalent.node.IParaBox
                  extended by multivalent.gui.VButton
All Implemented Interfaces:
java.lang.Cloneable, EventListener, java.util.EventListener
Direct Known Subclasses:
VCheckbox, VRadiobox

public class VButton
extends IParaBox
implements EventListener

Button widget: click to invoke the associated script (as given by SCRIPT attribute). Usable as button and menu item.

Version:
$Revision: 1.3 $ $Date: 2002/01/27 01:59:32 $

Field Summary
 
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
VButton(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attr, INode parent)
           
VButton(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> attr, INode parent, java.lang.String script)
           
 
Method Summary
 boolean breakAfter()
           
 boolean breakBefore()
           
 int dx()
          Skip over border, padding to content area.
 int dy()
          Skip over border, padding to content area.
 void event(java.awt.AWTEvent e)
           
 boolean eventNode(java.awt.AWTEvent e, java.awt.Point rel)
          Stops at first node where bbox.y > rel.y.
 boolean formatNode(int width, int height, Context cx)
          Children report dimensions (width and height), parent places at (x,y).
 void invoke()
          Execute associated VScript, if any.
 void paintNode(java.awt.Rectangle docclip, Context cx)
          Paint (nonexistent) spaces between words, as in background for selection and highlights, underline for hyperlinks
 
Methods inherited from class multivalent.node.IParaBox
reformat
 
Methods inherited from class multivalent.INode
addCategory, appendChild, checkRep, childAt, childNum, clipboardNode, clone, contains, dump, eventBeforeAfter, findDFS, formatBeforeAfter, getElementById, getFirstChild, getFirstLeaf, getLastChild, getLastLeaf, getNextSibling, getPreviousSibling, insertChildAt, isStruct, markDirtySubtreeDown, paintBeforeAfter, 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, getIScrollPane, getName, getNextLeaf, getNextNode, getNodeName, getObservers, getParentNode, getPrevLeaf, getPrevNode, getRelLocation, getRoot, getSticky, indexSticky, intersects, isLeaf, isValid, markDirty, markDirtySubtree, markDirtyTo, morphInto, 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

VButton

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

VButton

public VButton(java.lang.String name,
               java.util.Map<java.lang.String,java.lang.Object> attr,
               INode parent,
               java.lang.String script)
Method Detail

formatNode

public boolean formatNode(int width,
                          int height,
                          Context cx)
Description copied from class: INode
Children report dimensions (width and height), parent places at (x,y). Bbox = union of children's bboxes Children stacked vertically like TeX vbox; override to implement other layout strategies To implement a new layout manager, override this method.

Overrides:
formatNode in class IParaBox
See Also:
FixedI

breakBefore

public boolean breakBefore()
Overrides:
breakBefore in class INode

breakAfter

public boolean breakAfter()
Overrides:
breakAfter in class INode

dx

public int dx()
Description copied from class: INode
Skip over border, padding to content area.

Overrides:
dx in class INode

dy

public int dy()
Description copied from class: INode
Skip over border, padding to content area.

Overrides:
dy in class INode

paintNode

public void paintNode(java.awt.Rectangle docclip,
                      Context cx)
Description copied from class: IParaBox
Paint (nonexistent) spaces between words, as in background for selection and highlights, underline for hyperlinks.

Overrides:
paintNode in class IParaBox

eventNode

public boolean eventNode(java.awt.AWTEvent e,
                         java.awt.Point rel)
Description copied from class: IParaBox
Stops at first node where bbox.y > rel.y. Can "hit" in between nodes to pick up prevailing spans (cur node set to first node following, with offset -1).

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

event

public void event(java.awt.AWTEvent e)
Specified by:
event in interface EventListener

invoke

public void invoke()
Execute associated VScript, if any. VCheckbox and VRadiobox override to change state first.


Multivalent API