Multivalent API

multivalent.std.ui
Class SemanticUI

java.lang.Object
  extended by multivalent.VObject
      extended by multivalent.Behavior
          extended by multivalent.std.ui.SemanticUI

public class SemanticUI
extends Behavior

Generates from a hub description UI elements that trigger a semantic event when activated.

A good portion of the functionality of the system can be triggered by lone semantic event. It's easy to add a menu item or button that fires a semantic event with a line in a hub document. In fact, much of the default system is built that way. For instance, the menu item named "Home" that shows your home page is generated with the following line in the system hub:

<MenuItem Behavior=SemanticUI event="goHome" title="Home" category="GoInter" />

Likewise, the Home button is generated with the following:

<Button Behavior=SemanticUI event="goHome" title="" category="Toolbar" script='goHome' />

Version:
$Revision: 1.2 $ $Date: 2002/02/01 06:04:05 $
See Also:
SemanticEvent

Field Summary
static java.lang.String ATTR_CATEGORY
          Hub attribute that sets category group within menu.
static java.lang.String ATTR_GENERATE
          Hub attribute to set name of dynamic menu of VMenubutton widgets.
static java.lang.String ATTR_PARENT
          Hub attribute that gives menu (createWidget/parent).
static java.lang.String ATTR_SCRIPT
          Hub attribute to set VScript script to execute when widget is activated.
static java.lang.String ATTR_TITLE
          Hub attribute that gives text to show in menu.
static java.lang.String ATTR_TYPE
          Hub attribute to set type of widget as acceptable by Behavior.createUI(String, String, Object, INode, String, boolean).
static java.lang.String ATTR_WIDTH
          Hub attribute to set width of VEntry widgets.
 
Fields inherited from class multivalent.Behavior
ATTR_BEHAVIOR, name_
 
Fields inherited from class multivalent.VObject
attr_
 
Constructor Summary
SemanticUI()
           
 
Method Summary
 boolean semanticEventBefore(SemanticEvent se, java.lang.String msg)
          Round robin distribution to all behaviors.
 
Methods inherited from class multivalent.Behavior
buildAfter, buildBefore, checkRep, clipboardAfter, clipboardBefore, createUI, destroy, eventAfter, eventBefore, formatAfter, formatBefore, getBrowser, getDocument, getInstance, getInstance, getLayer, getLogger, getName, getPreference, getRoot, isEditable, paintAfter, paintBefore, putPreference, redo, restore, restoreChildren, save, semanticEventAfter, setName, toString, undo
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTR_PARENT

public static final java.lang.String ATTR_PARENT
Hub attribute that gives menu (createWidget/parent).

See Also:
Constant Field Values

ATTR_TITLE

public static final java.lang.String ATTR_TITLE
Hub attribute that gives text to show in menu.

See Also:
Constant Field Values

ATTR_CATEGORY

public static final java.lang.String ATTR_CATEGORY
Hub attribute that sets category group within menu.

See Also:
Constant Field Values

ATTR_TYPE

public static final java.lang.String ATTR_TYPE
Hub attribute to set type of widget as acceptable by Behavior.createUI(String, String, Object, INode, String, boolean).

See Also:
Constant Field Values

ATTR_SCRIPT

public static final java.lang.String ATTR_SCRIPT
Hub attribute to set VScript script to execute when widget is activated.

See Also:
Constant Field Values

ATTR_WIDTH

public static final java.lang.String ATTR_WIDTH
Hub attribute to set width of VEntry widgets.

See Also:
Constant Field Values

ATTR_GENERATE

public static final java.lang.String ATTR_GENERATE
Hub attribute to set name of dynamic menu of VMenubutton widgets.

See Also:
Constant Field Values
Constructor Detail

SemanticUI

public SemanticUI()
Method Detail

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se,
                                   java.lang.String msg)
Description copied from class: Behavior
Round robin distribution to all behaviors. Message and clientData unpacked from SemanticEvent for convenience. Message is interned, so if you compare to a literal, you can use "==". Message can't be changed (it can be short-circuited out of), but client data can be mutated as it is passed along (so it's not passed as a parameter).

Overrides:
semanticEventBefore in class Behavior

Multivalent API