|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.internal.ui.LineBackgroundPainter
public class LineBackgroundPainter
A painter for configurable background painting a range of text lines.
Replicates also the functionality of the
CursorLinePainter
because only one LineBackgroundListener
is allowed
per StyledText
widget.
Field Summary |
---|
Fields inherited from interface org.eclipse.jface.text.IPainter |
---|
CONFIGURATION, INTERNAL, KEY_STROKE, MOUSE_BUTTON, SELECTION, TEXT_CHANGE |
Constructor Summary | |
---|---|
LineBackgroundPainter(org.eclipse.jface.text.ITextViewer textViewer)
Creates a new painter for the given text viewer. |
Method Summary | |
---|---|
void |
addHighlightPositions(java.util.List positions)
Add highlight positions. |
void |
deactivate(boolean redraw)
|
void |
dispose()
|
void |
enableCursorLine(boolean enable)
Enable/disable cursor line highlighting. |
boolean |
isDisposed()
Query whether this painter is already disposed. |
void |
lineGetBackground(org.eclipse.swt.custom.LineBackgroundEvent event)
|
void |
paint(int reason)
|
void |
redraw()
Trigger redraw of managed positions. |
void |
removeHighlightPositions(java.util.List positions)
Remove highlight positions by identity. |
void |
replaceHighlightPositions(java.util.List removePositions,
java.util.List addPositions)
Replace given highlight positions in one step. |
void |
setBackgroundColor(java.lang.String positionType,
org.eclipse.swt.graphics.Color color)
Sets the color in which to draw the background of the given position type. |
void |
setCursorLineColor(org.eclipse.swt.graphics.Color cursorLineColor)
Sets the color in which to draw the background of the cursor line. |
void |
setDefaultColor(org.eclipse.swt.graphics.Color color)
Sets the color in which to draw the background of untyped positions. |
void |
setHighlightPositions(java.util.List positions)
Set highlight positions. |
void |
setPositionManager(org.eclipse.jface.text.IPaintPositionManager manager)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LineBackgroundPainter(org.eclipse.jface.text.ITextViewer textViewer)
textViewer
- Method Detail |
---|
public void setBackgroundColor(java.lang.String positionType, org.eclipse.swt.graphics.Color color)
positionType
- the position type for which to specify the background colorcolor
- the color in which to draw the background of the given position typepublic void setCursorLineColor(org.eclipse.swt.graphics.Color cursorLineColor)
cursorLineColor
- the color in which to draw the background of the cursor linepublic void setDefaultColor(org.eclipse.swt.graphics.Color color)
color
- the color in which to draw the background of untyped positionspublic void enableCursorLine(boolean enable)
enable
- public void setHighlightPositions(java.util.List positions)
positions
- a list of Position
spublic void addHighlightPositions(java.util.List positions)
positions
- a list of Position
spublic void removeHighlightPositions(java.util.List positions)
positions
- a list of Position
spublic void replaceHighlightPositions(java.util.List removePositions, java.util.List addPositions)
removePositions
- a list of Position
s to removeaddPositions
- a list of Position
s to addpublic void redraw()
public void dispose()
dispose
in interface org.eclipse.jface.text.IPainter
public boolean isDisposed()
true
if the painter is disposedpublic void paint(int reason)
paint
in interface org.eclipse.jface.text.IPainter
public void deactivate(boolean redraw)
deactivate
in interface org.eclipse.jface.text.IPainter
public void setPositionManager(org.eclipse.jface.text.IPaintPositionManager manager)
setPositionManager
in interface org.eclipse.jface.text.IPainter
public void lineGetBackground(org.eclipse.swt.custom.LineBackgroundEvent event)
lineGetBackground
in interface org.eclipse.swt.custom.LineBackgroundListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |