| java.lang.Object org.netbeans.lib.terminalemulator.Sel
Sel | class Sel implements ClipboardOwner(Code) | | Selection expert:
- Tracks gestures
- Retrieves actual selected text
- Paints the selection into a given Graphic
The following actions are understood and dealt with:
- track()
- in general extends a selection.
It is usually connecetd to a mouse drag event.
- track()
- will initiate a character-sized selection if no selection exists.
- select_word()
- selects a "word" after which track() extends the selection by words.
It is usually connected to a left double-click.
- slect_line()
- selects a line after which track() extend the selection by lines.
It is usually connected to a left triple-click.
- done()
- stops tracking. The current selection is stuffed into the clipboard.
It is usually connected to a left release.
- extend()
- only extends an existing selection. (Doesn't start one like track)
It is usually connected to a mouse right-press.
- cancel() nulls the selection.
A Selection has two components that need tracking, the visual feedback
and the selected text. As the history scrolls out the visual feedback
will be eliminated, but we (SHOULD but don't yet) retain the text so
that copy actions still retreieve it properly. DtTerm actually
suffers from this.
The selection has an origin and an extent. In general the origin and
extent are not ordered (that is extent might be _before_ origin). they
get ordered as needed.
|
INT_ABOVE | final public static int INT_ABOVE(Code) | | |
INT_BELOW | final public static int INT_BELOW(Code) | | |
INT_NONE | final public static int INT_NONE(Code) | | |
INT_ON | final public static int INT_ON(Code) | | |
INT_STRADDLES | final public static int INT_STRADDLES(Code) | | |
adjust | void adjust(int afirstline, int amount, int alastline)(Code) | | Adjust the selection against 'afirstline'.
As the selection reaches the top of the history buffer it will get
trimmed until eventually all of it will go away.
This form doesn't work if the selection is "split" by insertion of
lines. Maybe we SHOULD have two arguments, adjust origin and adjust
extent?
|
cancel | public boolean cancel(boolean and_fire)(Code) | | |
intersection | int intersection(int line)(Code) | | |
relocate | void relocate(int from, int to)(Code) | | |
|
|