public class CursorLinePainter extends Object implements IPainter, LineBackgroundListener
Clients usually instantiate and configure object of this class.
This class is not intended to be subclassed.
CONFIGURATION, INTERNAL, KEY_STROKE, MOUSE_BUTTON, SELECTION, TEXT_CHANGE| Constructor and Description |
|---|
CursorLinePainter(ITextViewer textViewer)
Creates a new painter for the given source viewer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deactivate(boolean redraw)
Deactivates this painter.
|
void |
dispose()
Disposes this painter.
|
void |
lineGetBackground(LineBackgroundEvent event)
This method is called when a line is about to be drawn in order to get its
background color.
|
void |
paint(int reason)
Requests this painter to repaint because of the given reason.
|
void |
setHighlightColor(Color highlightColor)
Sets the color in which to draw the background of the cursor line.
|
void |
setPositionManager(IPaintPositionManager manager)
Sets the paint position manager that can be used by this painter or removes any previously
set paint position manager.
|
public CursorLinePainter(ITextViewer textViewer)
textViewer - the source viewer for which to create a painterpublic void setHighlightColor(Color highlightColor)
highlightColor - the color in which to draw the background of the cursor linepublic void lineGetBackground(LineBackgroundEvent event)
LineBackgroundListenerThe following event fields are used:
lineGetBackground in interface LineBackgroundListenerevent - the given eventLineBackgroundEventpublic void deactivate(boolean redraw)
IPainterredraw indicates whether the painter
should remove any decoration it previously applied. A deactivated painter
can be reactivated by calling paint.deactivate in interface IPainterredraw - true if any previously applied decoration
should be removedIPainter.paint(int)public void dispose()
IPainterdispose in interface IPainterIPainter.deactivate(boolean)public void paint(int reason)
IPainterpublic void setPositionManager(IPaintPositionManager manager)
IPaintersetPositionManager in interface IPaintermanager - the paint position manager or nullGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.