de.hunsicker.jalopy.plugin.jdeveloper.message
Class Message

java.lang.Object
  |
  +--de.hunsicker.jalopy.plugin.jdeveloper.message.Message

public class Message
extends java.lang.Object

A message that can be displayed in a log page.

Version:
$Revision: 1.2 $
Author:
Marco Hunsicker

Field Summary
protected  int endOffset
          The end offset of an issue in a line.
protected  java.io.File file
          The file this message belongs to.
protected  int line
          The line number where an issue was found.
protected  javax.swing.tree.TreeCellRenderer renderer
          The renderer used to draw messages in the tree.
protected  int startOffset
          The start offset of an issue in a line.
protected  java.lang.String text
          The message text.
protected  MessageType type
          The message type
 
Constructor Summary
Message(java.lang.String text)
          Creates a new Message object.
Message(java.lang.String text, java.io.File file, int line)
          Creates a new Message object.
Message(java.lang.String text, java.io.File file, int line, int startOffset, int endOffset, MessageType type)
          Creates a new Message object.
Message(java.lang.String text, java.io.File file, int line, MessageType type)
          Creates a new Message object.
Message(java.lang.String text, MessageType type)
          Creates a new Message object.
 
Method Summary
 java.io.File getFile()
          Returns the file this message is associated with.
 int getLine()
          Returns the line number of the document this message is related to.
 java.lang.String getText()
          Returns the text of the message.
 MessageType getType()
          Returns the type of the message.
 void setCellRenderer(javax.swing.tree.TreeCellRenderer renderer)
          Sets the cell renderer that does the actual drawing of the message.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

file

protected java.io.File file
The file this message belongs to.


type

protected MessageType type
The message type


text

protected java.lang.String text
The message text.


renderer

protected javax.swing.tree.TreeCellRenderer renderer
The renderer used to draw messages in the tree.


endOffset

protected int endOffset
The end offset of an issue in a line.


line

protected int line
The line number where an issue was found.


startOffset

protected int startOffset
The start offset of an issue in a line.

Constructor Detail

Message

public Message(java.lang.String text)
Creates a new Message object.

Parameters:
text - the message text.

Message

public Message(java.lang.String text,
               MessageType type)
Creates a new Message object.

Parameters:
text - the message text.
type - the message type.

Message

public Message(java.lang.String text,
               java.io.File file,
               int line)
Creates a new Message object.

Parameters:
text - the message text.
file - the file this message belongs to.
line - the line where the an issue was found (1-based).

Message

public Message(java.lang.String text,
               java.io.File file,
               int line,
               MessageType type)
Creates a new Message object.

Parameters:
text - the message text.
file - the file this message belongs to.
line - the line where the an issue was found (1-based).
type - the message type.

Message

public Message(java.lang.String text,
               java.io.File file,
               int line,
               int startOffset,
               int endOffset,
               MessageType type)
Creates a new Message object.

Parameters:
text - the message text.
file - the file this message belongs to.
line - the line where the an issue was found (1-based).
startOffset - the start offset of the issue (1-based).
endOffset - the end offset of the issue (1-based).
type - the message type.
Method Detail

setCellRenderer

public void setCellRenderer(javax.swing.tree.TreeCellRenderer renderer)
Sets the cell renderer that does the actual drawing of the message.

Parameters:
renderer - a tree cell renderer. If none is set the default cell renderer will be used.

getFile

public java.io.File getFile()
Returns the file this message is associated with.

Returns:
the associated file. Returns null if this is a stand-alone message.

getLine

public int getLine()
Returns the line number of the document this message is related to.

Returns:
the line number of the document this message points to. A value <= 0 indicates that this message is not associated with a specific position of a document.

getText

public java.lang.String getText()
Returns the text of the message.

Returns:
the message text.

getType

public MessageType getType()
Returns the type of the message.

Returns:
the message type.

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this object.
See Also:
getText()


Copyright © 1997-2005 Jalopy. All Rights Reserved.