|
Eclipse Platform Release 4.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.text.source.MatchingCharacterPainter
public final class MatchingCharacterPainter
Highlights the peer character matching the character near the caret position, or a pair of peer
characters enclosing the caret position. This painter can be configured with an
ICharacterPairMatcher or an
ICharacterPairMatcherExtension.
Clients instantiate and configure an object of this class.
| Field Summary |
|---|
| Fields inherited from interface org.eclipse.jface.text.IPainter |
|---|
CONFIGURATION, INTERNAL, KEY_STROKE, MOUSE_BUTTON, SELECTION, TEXT_CHANGE |
| Constructor Summary | |
|---|---|
MatchingCharacterPainter(ISourceViewer sourceViewer,
ICharacterPairMatcher matcher)
Creates a new MatchingCharacterPainter for the given source viewer using the given character pair matcher. |
|
| Method Summary | |
|---|---|
void |
deactivate(boolean redraw)
Deactivates this painter. |
void |
dispose()
Disposes this painter. |
void |
paint(int reason)
Requests this painter to repaint because of the given reason. |
void |
paintControl(PaintEvent event)
Sent when a paint event occurs for the control. |
void |
setColor(Color color)
Sets the color in which to highlight the match character. |
void |
setHighlightCharacterAtCaretLocation(boolean highlightCharacterAtCaretLocation)
Sets whether to highlight the character at caret location or not. |
void |
setHighlightEnclosingPeerCharacters(boolean highlightEnclosingPeerCharcters)
Sets whether to highlight enclosing peer characters or not. |
void |
setPositionManager(IPaintPositionManager manager)
Sets the paint position manager that can be used by this painter or removes any previously set paint position manager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MatchingCharacterPainter(ISourceViewer sourceViewer,
ICharacterPairMatcher matcher)
sourceViewer - the source viewermatcher - the character pair matcher| Method Detail |
|---|
public void setHighlightCharacterAtCaretLocation(boolean highlightCharacterAtCaretLocation)
highlightCharacterAtCaretLocation - whether to highlight the character at caret location
or notpublic void setHighlightEnclosingPeerCharacters(boolean highlightEnclosingPeerCharcters)
highlightEnclosingPeerCharcters - whether to highlight enclosing peer characters or notpublic void setColor(Color color)
color - the colorpublic void dispose()
IPainter
dispose in interface IPainterIPainter.deactivate(boolean)public 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 paintControl(PaintEvent event)
PaintListener
paintControl in interface PaintListenerevent - an event containing information about the paintpublic void paint(int reason)
IPainter
paint in interface IPainterreason - the repaint reason, value is one of the constants defined
in this interfacepublic void setPositionManager(IPaintPositionManager manager)
IPainter
setPositionManager in interface IPaintermanager - the paint position manager or null
|
Eclipse Platform Release 4.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2012. All rights reserved.