|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.fife.ui.rsyntaxtextarea.parser.DefaultParserNotice
public class DefaultParserNotice
Base implementation of a parser notice. Most Parser
implementations can return instances of this in their parse result.
Parser
,
ParseResult
Field Summary |
---|
Fields inherited from interface org.fife.ui.rsyntaxtextarea.parser.ParserNotice |
---|
ERROR, INFO, WARNING |
Constructor Summary | |
---|---|
DefaultParserNotice(Parser parser,
java.lang.String msg,
int line)
Constructor. |
|
DefaultParserNotice(Parser parser,
java.lang.String message,
int line,
int offset,
int length)
Constructor. |
Method Summary | |
---|---|
int |
compareTo(ParserNotice other)
Compares this parser notice to another. |
boolean |
containsPosition(int pos)
Returns whether this parser notice contains the specified location in the document. |
boolean |
equals(java.lang.Object obj)
Returns whether this parser notice is equal to another one. |
java.awt.Color |
getColor()
Returns the color to use when painting this notice. |
int |
getLength()
Returns the length of the code the message is concerned with. |
int |
getLevel()
Returns the level of this notice. |
int |
getLine()
Returns the line number the notice is about. |
java.lang.String |
getMessage()
Returns the message from the parser. |
int |
getOffset()
Returns the offset of the code the message is concerned with. |
Parser |
getParser()
Returns the parser that created this message. |
boolean |
getShowInEditor()
Whether a squiggle underline should be drawn in the editor for this notice. |
java.lang.String |
getToolTipText()
Returns the tooltip text to display for this notice. |
int |
hashCode()
Returns the hash code for this notice. |
void |
setColor(java.awt.Color color)
Sets the color to use when painting this notice. |
void |
setLevel(int level)
Sets the level of this notice. |
void |
setShowInEditor(boolean show)
Sets whether a squiggle underline should be drawn in the editor for this notice. |
void |
setToolTipText(java.lang.String text)
Sets the tooltip text to display for this notice. |
java.lang.String |
toString()
Returns a string representation of this parser notice. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultParserNotice(Parser parser, java.lang.String msg, int line)
parser
- The parser that created this notice.msg
- The text of the message.line
- The line number for the message.public DefaultParserNotice(Parser parser, java.lang.String message, int line, int offset, int length)
parser
- The parser that created this notice.message
- The message.line
- The line number corresponding to the message.offset
- The offset in the input stream of the code the
message is concerned with, or -1
if unknown.length
- The length of the code the message is concerned with,
or -1
if unknown.Method Detail |
---|
public int compareTo(ParserNotice other)
compareTo
in interface java.lang.Comparable<ParserNotice>
other
- Another parser notice.
public boolean containsPosition(int pos)
containsPosition
in interface ParserNotice
pos
- The position in the document.
false
if ParserNotice.getOffset()
returns
-1
.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Another parser notice.
public java.awt.Color getColor()
getColor
in interface ParserNotice
public int getLength()
getLength
in interface ParserNotice
-1
if unknown.ParserNotice.getOffset()
,
ParserNotice.getLine()
public int getLevel()
getLevel
in interface ParserNotice
ParserNotice.INFO
, ParserNotice.WARNING
OR ParserNotice.ERROR
.public int getLine()
getLine
in interface ParserNotice
public java.lang.String getMessage()
getMessage
in interface ParserNotice
public int getOffset()
getOffset
in interface ParserNotice
-1
if unknown.ParserNotice.getLength()
,
ParserNotice.getLine()
public Parser getParser()
getParser
in interface ParserNotice
public boolean getShowInEditor()
getShowInEditor
in interface ParserNotice
public java.lang.String getToolTipText()
getToolTipText
in interface ParserNotice
ParserNotice.getMessage()
.public int hashCode()
hashCode
in class java.lang.Object
public void setColor(java.awt.Color color)
color
- The color to use.getColor()
public void setLevel(int level)
level
- The new level.getLevel()
public void setShowInEditor(boolean show)
show
- Whether to draw a squiggle underline.getShowInEditor()
public void setToolTipText(java.lang.String text)
text
- The new tooltip text. This can be HTML. If this is
null
, then tooltips will return the same text as
getMessage()
.getToolTipText()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |