|
Multivalent API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmultivalent.VObject
multivalent.Behavior
multivalent.Span
multivalent.std.span.SelectionSpan
Default selection behavior. Lightens/darkens background of selected text. Reports change in position by sending MSG_SET semantic event.
The change in appearance is restricted in a couple ways. It does not change font or spacing or other attributes that would require formatting, as this would make it hard to drag out a selection. It does not reverse colors, XOR, or use fixed foreground and background colors (e.g., white on blue), since there is no single foreground color on grayscale scanned paper.
Field Summary | |
---|---|
static java.lang.String |
MSG_SET
Announces that selection has been moved to a new location. |
Fields inherited from class multivalent.Span |
---|
GI_END, GI_START, MSG_DELETE, MSG_EDIT, MSG_MORPH, MSG_UNATTACHED, pend, pstart |
Fields inherited from class multivalent.Behavior |
---|
ATTR_BEHAVIOR, name_ |
Fields inherited from class multivalent.VObject |
---|
attr_ |
Fields inherited from interface multivalent.ContextListener |
---|
LITTLE, LOT, PRIORITY_LENS, PRIORITY_MAX, PRIORITY_MIN, PRIORITY_SELECTION, PRIORITY_SPAN, PRIORITY_STRUCT, SOME |
Constructor Summary | |
---|---|
SelectionSpan()
|
Method Summary | |
---|---|
boolean |
appearance(Context cx,
boolean all)
Resets the graphics context every time the object is added to or dropped from the set active over the portion of the document being drawn. |
int |
getPriority()
Paints on top of everything else. |
void |
move(Leaf ln,
int lo,
Leaf rn,
int ro)
No formatting, so can be more efficient, as for dragging out selection. |
void |
moveq(Leaf ln,
int lo,
Leaf rn,
int ro)
Report movement with MSG_SET semantic event, with arg = this. |
boolean |
semanticEventAfter(SemanticEvent se,
java.lang.String msg)
Remove self when referenced document is closed. |
boolean |
semanticEventBefore(SemanticEvent se,
java.lang.String msg)
Doesn't have Morph/Delete/.... |
Methods inherited from class multivalent.Span |
---|
buildAfter, checkRep, close, closeAll, contains, contains, destroy, event, getEnd, getStart, isSet, markDirty, move, move, moveq, moveq, moveqSwap, open, repaint, repaint, restore, save, stretch, toString |
Methods inherited from class multivalent.Behavior |
---|
buildBefore, clipboardAfter, clipboardBefore, createUI, eventAfter, eventBefore, formatAfter, formatBefore, getBrowser, getDocument, getInstance, getInstance, getLayer, getLogger, getName, getPreference, getRoot, isEditable, paintAfter, paintBefore, putPreference, redo, restoreChildren, setName, 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 |
---|
public static final java.lang.String MSG_SET
"setSelection": arg= this
Constructor Detail |
---|
public SelectionSpan()
Method Detail |
---|
public boolean appearance(Context cx, boolean all)
ContextListener
appearance
in interface ContextListener
appearance
in class Span
all
- all attributes or exclude those that are not inheritedpublic int getPriority()
getPriority
in interface ContextListener
getPriority
in class Span
public void move(Leaf ln, int lo, Leaf rn, int ro)
move
in class Span
public void moveq(Leaf ln, int lo, Leaf rn, int ro)
moveq
in class Span
public boolean semanticEventBefore(SemanticEvent se, java.lang.String msg)
semanticEventBefore
in class Span
public boolean semanticEventAfter(SemanticEvent se, java.lang.String msg)
semanticEventAfter
in class Span
|
Multivalent API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |