Package org.fife.ui.rsyntaxtextarea
Class ErrorStrip.MarkedOccurrenceNotice
- java.lang.Object
-
- org.fife.ui.rsyntaxtextarea.ErrorStrip.MarkedOccurrenceNotice
-
- All Implemented Interfaces:
java.lang.Comparable<ParserNotice>,ParserNotice
- Enclosing class:
- ErrorStrip
private class ErrorStrip.MarkedOccurrenceNotice extends java.lang.Object implements ParserNotice
A notice that wraps a "marked occurrence" instance.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.fife.ui.rsyntaxtextarea.parser.ParserNotice
ParserNotice.Level
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.Colorcolorprivate DocumentRangerange
-
Constructor Summary
Constructors Constructor Description MarkedOccurrenceNotice(DocumentRange range, java.awt.Color color)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ParserNotice other)booleancontainsPosition(int pos)Returns whether this parser notice contains the specified location in the document.booleanequals(java.lang.Object o)java.awt.ColorgetColor()Returns the color to use when painting this notice.booleangetKnowsOffsetAndLength()Returns whether this parser notice has offset and length information (as opposed to just what line number to mark).intgetLength()Returns the length of the code the message is concerned with.ParserNotice.LevelgetLevel()Returns the level of this notice.intgetLine()Returns the line number the notice is about.java.lang.StringgetMessage()Returns the message from the parser.intgetOffset()Returns the offset of the code the message is concerned with.ParsergetParser()Returns the parser that created this message.booleangetShowInEditor()Whether a squiggle underline should be drawn in the editor for this notice.java.lang.StringgetToolTipText()Returns the tool tip text to display for this notice.inthashCode()
-
-
-
Field Detail
-
range
private DocumentRange range
-
color
private java.awt.Color color
-
-
Constructor Detail
-
MarkedOccurrenceNotice
MarkedOccurrenceNotice(DocumentRange range, java.awt.Color color)
-
-
Method Detail
-
compareTo
public int compareTo(ParserNotice other)
- Specified by:
compareToin interfacejava.lang.Comparable<ParserNotice>
-
containsPosition
public boolean containsPosition(int pos)
Description copied from interface:ParserNoticeReturns whether this parser notice contains the specified location in the document.- Specified by:
containsPositionin interfaceParserNotice- Parameters:
pos- The position in the document.- Returns:
- Whether the position is contained. This will always return
falseifParserNotice.getOffset()returns-1.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
getColor
public java.awt.Color getColor()
Description copied from interface:ParserNoticeReturns the color to use when painting this notice.- Specified by:
getColorin interfaceParserNotice- Returns:
- The color.
-
getKnowsOffsetAndLength
public boolean getKnowsOffsetAndLength()
Description copied from interface:ParserNoticeReturns whether this parser notice has offset and length information (as opposed to just what line number to mark).- Specified by:
getKnowsOffsetAndLengthin interfaceParserNotice- Returns:
- Whether the offset and length of the notice are specified.
- See Also:
ParserNotice.getLine(),ParserNotice.getOffset(),ParserNotice.getLength()
-
getLength
public int getLength()
Description copied from interface:ParserNoticeReturns the length of the code the message is concerned with.- Specified by:
getLengthin interfaceParserNotice- Returns:
- The length of the code the message is concerned with, or
-1if unknown. - See Also:
ParserNotice.getOffset(),ParserNotice.getLine()
-
getLevel
public ParserNotice.Level getLevel()
Description copied from interface:ParserNoticeReturns the level of this notice.- Specified by:
getLevelin interfaceParserNotice- Returns:
- A value from the
ParserNotice.Levelenumeration.
-
getLine
public int getLine()
Description copied from interface:ParserNoticeReturns the line number the notice is about.- Specified by:
getLinein interfaceParserNotice- Returns:
- The line number.
-
getMessage
public java.lang.String getMessage()
Description copied from interface:ParserNoticeReturns the message from the parser.- Specified by:
getMessagein interfaceParserNotice- Returns:
- The message from the parser.
-
getOffset
public int getOffset()
Description copied from interface:ParserNoticeReturns the offset of the code the message is concerned with.- Specified by:
getOffsetin interfaceParserNotice- Returns:
- The offset, or
-1if unknown. - See Also:
ParserNotice.getLength(),ParserNotice.getLine()
-
getParser
public Parser getParser()
Description copied from interface:ParserNoticeReturns the parser that created this message.- Specified by:
getParserin interfaceParserNotice- Returns:
- The parser.
-
getShowInEditor
public boolean getShowInEditor()
Description copied from interface:ParserNoticeWhether a squiggle underline should be drawn in the editor for this notice.- Specified by:
getShowInEditorin interfaceParserNotice- Returns:
- Whether a squiggle underline should be drawn.
-
getToolTipText
public java.lang.String getToolTipText()
Description copied from interface:ParserNoticeReturns the tool tip text to display for this notice.- Specified by:
getToolTipTextin interfaceParserNotice- Returns:
- The tool tip text. If none has been explicitly set, this
method returns the same text as
ParserNotice.getMessage().
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-