multivalent.std.span

Class SelectionSpan

public class SelectionSpan extends Span

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.

Version: $Revision: 1.3 $ $Date: 2002/02/02 13:16:27 $

Field Summary
static StringMSG_SET
Announces that selection has been moved to a new location.
Method Summary
booleanappearance(Context cx, boolean all)
intgetPriority()
Paints on top of everything else.
voidmove(Leaf ln, int lo, Leaf rn, int ro)
No formatting, so can be more efficient, as for dragging out selection.
voidmoveq(Leaf ln, int lo, Leaf rn, int ro)
Report movement with MSG_SET semantic event, with arg = this.
booleansemanticEventAfter(SemanticEvent se, String msg)
Remove self when referenced document is closed.
booleansemanticEventBefore(SemanticEvent se, String msg)
Doesn't have Morph/Delete/....

Field Detail

MSG_SET

public static final String MSG_SET
Announces that selection has been moved to a new location.

"setSelection": arg= this

Method Detail

appearance

public boolean appearance(Context cx, boolean all)

getPriority

public int getPriority()
Paints on top of everything else.

move

public void move(Leaf ln, int lo, Leaf rn, int ro)
No formatting, so can be more efficient, as for dragging out selection.

moveq

public void moveq(Leaf ln, int lo, Leaf rn, int ro)
Report movement with MSG_SET semantic event, with arg = this.

semanticEventAfter

public boolean semanticEventAfter(SemanticEvent se, String msg)
Remove self when referenced document is closed.

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se, String msg)
Doesn't have Morph/Delete/....