Multivalent API

multivalent.std
Class Note

java.lang.Object
  extended by multivalent.VObject
      extended by multivalent.Behavior
          extended by multivalent.std.Note

public class Note
extends Behavior

Show a PostIt-like note in a VFrame. If URI attribute set, content taken from, and if file:/// written to, to that file, which may be of any document type. Otherwise, saved inline as lines of ASCII (tree: content containing line+). Annotations are saved simply by recursing.

Version:
$Revision: 1.8 $ $Date: 2002/02/17 18:23:33 $

Field Summary
static java.lang.String ATTR_CLOSED
           
static java.lang.String ATTR_FLOATING
           
protected static java.awt.Color defbg_
           
protected static java.awt.Color deffg_
           
protected  Document doc_
          Document nested in VFrame.
static java.lang.String MSG_BACKGROUND
          Set background color of note.
static java.lang.String MSG_DELETE
          Delete note.
static java.lang.String MSG_SET_PINNED
          Pin/unpin note to associate document visually.
static java.lang.String MSG_SHOW
          Show note (visibile = true).
protected static java.util.Random random
           
protected  boolean viz_
          Visible on screen or available in menu.
protected  VFrame win_
          Floating window.
 
Fields inherited from class multivalent.Behavior
ATTR_BEHAVIOR, name_
 
Fields inherited from class multivalent.VObject
attr_
 
Constructor Summary
Note()
           
 
Method Summary
 void buildAfter(Document doc)
          Recurse to nested document.
 void buildBefore(Document doc)
          Recurse to nested document.
 void destroy()
          Remove window node too.
 Node getContent()
           
 void restore(ESISNode n, java.util.Map<java.lang.String,java.lang.Object> attr, Layer layer)
          Takes the place of a constructor's initialization functions; that is, it is invoked exactly once immediately after object instantiation.
 ESISNode save()
          Build up save data as ESIS tree, then write that out.
 boolean semanticEventAfter(SemanticEvent se, java.lang.String msg)
          Catch corresponding VFrame's windowClosed, windowRaised, ....
 boolean semanticEventBefore(SemanticEvent se, java.lang.String msg)
          Change background color, pinned status, ....
 
Methods inherited from class multivalent.Behavior
checkRep, clipboardAfter, clipboardBefore, createUI, eventAfter, eventBefore, formatAfter, formatBefore, getBrowser, getDocument, getInstance, getInstance, getLayer, getLogger, getName, getPreference, getRoot, isEditable, paintAfter, paintBefore, putPreference, redo, restoreChildren, 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

MSG_SHOW

public static final java.lang.String MSG_SHOW
Show note (visibile = true).

"showNote": arg= Boolean (or null to toggle), in= Note Note-instance.

See Also:
Constant Field Values

MSG_DELETE

public static final java.lang.String MSG_DELETE
Delete note.

"deleteNote": in= Note Note-instance.

See Also:
Constant Field Values

MSG_SET_PINNED

public static final java.lang.String MSG_SET_PINNED
Pin/unpin note to associate document visually.

"windowSetPinned": arg= Boolean (or null to toggle), in= Note Note-instance.

See Also:
Constant Field Values

MSG_BACKGROUND

public static final java.lang.String MSG_BACKGROUND
Set background color of note.

"editBackgroundColor": arg= Color / String color, in= Note Note-instance.

See Also:
Constant Field Values

ATTR_CLOSED

public static final java.lang.String ATTR_CLOSED
See Also:
Constant Field Values

ATTR_FLOATING

public static final java.lang.String ATTR_FLOATING
See Also:
Constant Field Values

deffg_

protected static java.awt.Color deffg_

defbg_

protected static java.awt.Color defbg_

random

protected static final java.util.Random random

win_

protected VFrame win_
Floating window.


doc_

protected Document doc_
Document nested in VFrame.


viz_

protected boolean viz_
Visible on screen or available in menu.

Constructor Detail

Note

public Note()
Method Detail

getContent

public Node getContent()

buildBefore

public void buildBefore(Document doc)
Recurse to nested document.

Overrides:
buildBefore in class Behavior
See Also:
Mark

buildAfter

public void buildAfter(Document doc)
Recurse to nested document.

Overrides:
buildAfter in class Behavior

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se,
                                   java.lang.String msg)
Change background color, pinned status, ....

Overrides:
semanticEventBefore in class Behavior

semanticEventAfter

public boolean semanticEventAfter(SemanticEvent se,
                                  java.lang.String msg)
Catch corresponding VFrame's windowClosed, windowRaised, ....

Overrides:
semanticEventAfter in class Behavior

destroy

public void destroy()
Remove window node too.

Overrides:
destroy in class Behavior

restore

public void restore(ESISNode n,
                    java.util.Map<java.lang.String,java.lang.Object> attr,
                    Layer layer)
Description copied from class: Behavior
Takes the place of a constructor's initialization functions; that is, it is invoked exactly once immediately after object instantiation. When restored from hub, passed XML content subtree if any as first parameter and attributes from XML tag's attributes. This protocol cannot be short-circuited.

Overrides:
restore in class Behavior

save

public ESISNode save()
Description copied from class: Behavior
Build up save data as ESIS tree, then write that out. Makes node with GI = behavior name, same attributes, and possibly some children. Attributes are cloned, so if you want to stuff attributes from state, do that before super.save(). Always have Behavior.ATTR_BEHAVIOR from save (short) classname.

Overrides:
save in class Behavior

Multivalent API