|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.fife.ui.rsyntaxtextarea.ErrorStrip
public class ErrorStrip
A component to sit alongside an RSyntaxTextArea
that displays
colored markers for locations of interest (parser errors, marked
occurrences, etc.).
An ErrorStrip
can be added to a UI like so:
textArea = createTextArea(); scrollPane = new RTextScrollPane(textArea, true); ErrorStrip es = new ErrorStrip(textArea); JPanel temp = new JPanel(new BorderLayout()); temp.add(scrollPane); temp.add(es, BorderLayout.LINE_END);
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ErrorStrip(RSyntaxTextArea textArea)
Constructor. |
Method Summary | |
---|---|
void |
addNotify()
Overridden so we only start listening for parser notices when this component (and presumably the text area) are visible. |
void |
doLayout()
Manually manages layout since this component uses no layout manager. |
Color |
getCaretMarkerColor()
returns the color to use when painting the caret marker. |
boolean |
getFollowCaret()
Returns whether the caret's position should be drawn. |
int |
getLevelThreshold()
Returns the minimum severity a parser notice must be for it to be displayed in this error strip. |
Dimension |
getPreferredSize()
|
boolean |
getShowMarkedOccurrences()
Returns whether marked occurrences are shown in this error strip. |
String |
getToolTipText(MouseEvent e)
|
protected void |
paintComponent(Graphics g)
Overridden to (possibly) draw the caret's position. |
void |
removeNotify()
|
void |
setCaretMarkerColor(Color color)
Sets the color to use when painting the caret marker. |
void |
setFollowCaret(boolean follow)
Toggles whether the caret's current location should be drawn. |
void |
setLevelThreshold(int level)
Sets the minimum severity a parser notice must be for it to be displayed in this error strip. |
void |
setShowMarkedOccurrences(boolean show)
Sets whether marked occurrences are shown in this error strip. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ErrorStrip(RSyntaxTextArea textArea)
textArea
- The text area we are examining.Method Detail |
---|
public void addNotify()
addNotify
in class JComponent
public void doLayout()
doLayout
in class Container
public Color getCaretMarkerColor()
setCaretMarkerColor(Color)
public boolean getFollowCaret()
setFollowCaret(boolean)
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public int getLevelThreshold()
setLevelThreshold(int)
public boolean getShowMarkedOccurrences()
setShowMarkedOccurrences(boolean)
public String getToolTipText(MouseEvent e)
getToolTipText
in class JComponent
protected void paintComponent(Graphics g)
paintComponent
in class JComponent
g
- The graphics context.public void removeNotify()
removeNotify
in class JComponent
public void setCaretMarkerColor(Color color)
color
- The new caret marker color.getCaretMarkerColor()
public void setFollowCaret(boolean follow)
follow
- Whether the caret's current location should be followed.getFollowCaret()
public void setLevelThreshold(int level)
ParserNotice.WARNING
.
level
- The new severity threshold.getLevelThreshold()
public void setShowMarkedOccurrences(boolean show)
show
- Whether to show marked occurrences.getShowMarkedOccurrences()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |