|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjsyntaxpane.components.Markers
public class Markers
This class contains static utility methods to make highliting in text components easier.
| Nested Class Summary | |
|---|---|
static class |
Markers.SimpleMarker
|
| Constructor Summary | |
|---|---|
Markers()
|
|
| Method Summary | |
|---|---|
static void |
markAll(javax.swing.text.JTextComponent pane,
java.util.regex.Pattern pattern,
Markers.SimpleMarker marker)
Mark all text in the document that matches the given pattern |
static void |
markText(javax.swing.text.JTextComponent pane,
int start,
int end,
Markers.SimpleMarker marker)
add highlights for the given region on the given pane |
static void |
markToken(javax.swing.text.JTextComponent pane,
Token token,
Markers.SimpleMarker marker)
add highlights for the given Token on the given pane |
static void |
removeMarkers(javax.swing.text.JTextComponent editorPane)
Remove all the markers from an JEditorPane |
static void |
removeMarkers(javax.swing.text.JTextComponent component,
Markers.SimpleMarker marker)
Removes only our private highlights This is public so that we can remove the highlights when the editorKit is unregistered. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Markers()
| Method Detail |
|---|
public static void removeMarkers(javax.swing.text.JTextComponent component,
Markers.SimpleMarker marker)
component - the text component whose markers are to be removedmarker - the SimpleMarker to removepublic static void removeMarkers(javax.swing.text.JTextComponent editorPane)
editorPane -
public static void markToken(javax.swing.text.JTextComponent pane,
Token token,
Markers.SimpleMarker marker)
pane - token - marker -
public static void markText(javax.swing.text.JTextComponent pane,
int start,
int end,
Markers.SimpleMarker marker)
pane - start - end - marker -
public static void markAll(javax.swing.text.JTextComponent pane,
java.util.regex.Pattern pattern,
Markers.SimpleMarker marker)
pane - control to usepattern - pattern to matchmarker - marker to use for highlighting
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||