visidia.simulation.process.messages
Class MessageType

java.lang.Object
  extended by visidia.simulation.process.messages.MessageType
All Implemented Interfaces:
java.io.Serializable

public class MessageType
extends java.lang.Object
implements java.io.Serializable

This class represents the type of the messages. The programmer can create as many types as he wants for his messages, and specify for each type if he thinks that the messages must be displayed or not. By default the messages are displayed. For each type of messages the programmer can also specify the color he prefers to use when the messages will be displayed. The default color is red. During the simulation of the algorithm, the user knows all the types used by the algorithm and can choose to display them or not.

See Also:
Serialized Form

Field Summary
static MessageType defaultMessageType
          This type is used each time that the programmer of the algorithm does not specify the type of a message.
 
Constructor Summary
MessageType(java.lang.String typeName)
          Instantiates a new message type.
MessageType(java.lang.String typeName, boolean toPaint)
          Instantiates a new message type.
MessageType(java.lang.String typeName, boolean toPaint, java.awt.Color color)
          Instantiates a new message type.
 
Method Summary
 java.awt.Color getColor()
          Gets the color.
 boolean getToPaint()
          Gets the boolean indicating if the messages must be displayed or not.
 java.lang.String getType()
          Gets the type.
 void setColor(java.awt.Color color)
          Sets the color.
 void setToPaint(boolean bool)
          Sets the boolean indicating if the messages must be displayed or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultMessageType

public static final MessageType defaultMessageType
This type is used each time that the programmer of the algorithm does not specify the type of a message. By default, the messages whose type is defaultMessageType are displayed.

Constructor Detail

MessageType

public MessageType(java.lang.String typeName,
                   boolean toPaint,
                   java.awt.Color color)
Instantiates a new message type.

Parameters:
typeName - the type name
toPaint - indicates if the messages must be displayed or not
color - the color

MessageType

public MessageType(java.lang.String typeName,
                   boolean toPaint)
Instantiates a new message type.

Parameters:
typeName - the type name
toPaint - indicates if the messages must be displayed or not

MessageType

public MessageType(java.lang.String typeName)
Instantiates a new message type.

Parameters:
typeName - the type name
Method Detail

getType

public java.lang.String getType()
Gets the type.

Returns:
the type

setToPaint

public void setToPaint(boolean bool)
Sets the boolean indicating if the messages must be displayed or not.

Parameters:
bool - the boolean

getToPaint

public boolean getToPaint()
Gets the boolean indicating if the messages must be displayed or not.

Returns:
true/false

setColor

public void setColor(java.awt.Color color)
Sets the color.

Parameters:
color - the new color

getColor

public java.awt.Color getColor()
Gets the color.

Returns:
the color