org.apache.batik.swing.gvt
public class TextSelectionManager extends Object
Nested Class Summary | |
---|---|
protected class | TextSelectionManager.MouseListener
To implement a GraphicsNodeMouseListener. |
protected class | TextSelectionManager.SelectionOverlay
The selection overlay. |
protected class | TextSelectionManager.TextSelectionListener
To implements a selection listener. |
Field Summary | |
---|---|
protected AbstractJGVTComponent | component
The associated JGVTComponent. |
protected TextSelectionManager.MouseListener | mouseListener
The mouse listener. |
protected Cursor | previousCursor
To store the previous cursor. |
protected Shape | selectionHighlight
The selection highlight. |
protected Overlay | selectionOverlay
The selection overlay. |
protected Color | selectionOverlayColor
The color of the selection overlay. |
protected Color | selectionOverlayStrokeColor
The color of the outline of the selection overlay. |
protected SelectionListener | textSelectionListener
The text selection listener. |
protected ConcreteTextSelector | textSelector
The text selector. |
static Cursor | TEXT_CURSOR
The cursor indicating that a text selection operation is under way. |
protected boolean | xorMode
A flag bit that indicates whether or not the selection overlay is
painted in XOR mode. |
Constructor Summary | |
---|---|
TextSelectionManager(AbstractJGVTComponent comp, AWTEventDispatcher ed)
Creates a new TextSelectionManager. |
Method Summary | |
---|---|
void | addSelectionListener(SelectionListener sl)
Add a selection listener to be notified when the
text selection changes in the document. |
void | clearSelection()
Clears the selection. |
protected Rectangle | getHighlightBounds()
The highlight bounds. |
Object | getSelection()
Returns the current text selection or null if there is none. |
Overlay | getSelectionOverlay()
Returns the selection overlay. |
Color | getSelectionOverlayColor()
Returns the color of the selection overlay. |
Color | getSelectionOverlayStrokeColor()
Returns the color of the outline of the selection overlay. |
boolean | isSelectionOverlayXORMode()
Returns true if the selection overlay is painted in XOR mode, false
otherwise. |
protected Rectangle | outset(Rectangle r, int amount) |
void | removeSelectionListener(SelectionListener sl)
Remove a selection listener to be notified when the
text selection changes in the document. |
void | setSelection(Mark start, Mark end)
Sets the selected text |
void | setSelectionOverlayColor(Color color)
Sets the color of the selection overlay to the specified color.
|
void | setSelectionOverlayStrokeColor(Color color)
Sets the color of the outline of the selection overlay to the specified
color.
|
void | setSelectionOverlayXORMode(boolean state)
Sets whether or not the selection overlay will be painted in XOR mode,
depending on the specified parameter.
|
Parameters: color the new color of the selection overlay
Parameters: color the new color of the outline of the selection overlay
Parameters: state true implies the selection overlay will be in XOR mode