Package jadex.tools.comanalyzer
Class PaintMaps
- java.lang.Object
-
- jadex.tools.comanalyzer.PaintMaps
-
public class PaintMaps extends java.lang.ObjectThe maps for the different paint modes. This class retrievs informations from given messages and agents based on different parameters and creates unique (up to a certain length) paint maps for each parameter.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.MapagentPaintsThe paint map for agentsstatic intCOLOR_COMPONENTThe paint mode for differ agentsprotected java.util.MapconversationPaintsThe paint map for conversation idsstatic java.awt.PaintDEFAULT_COLORThe standard default colorstatic intPAINTMODE_CONVERSATIONThe paint mode for differ conversation idsstatic intPAINTMODE_DEFAULTThe default paint mode provides only the default colorstatic intPAINTMODE_PERFORMATIVThe paint mode for differ performativesstatic intPAINTMODE_PROTOCOLThe paint mode for differ protocolsprotected java.util.MapperformativPaintsThe paint map for performativesprotected java.util.MapprotocolPaintsThe paint map for protocols
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateColor(Message message)Retrievs information from the message and creates unique colors.java.awt.PaintgetDefaultPaint()java.awt.PaintgetMessagePaint(Message message, int paintMode)Returns the color for a given message and a given paint mode.java.awt.PaintgetPaint(java.lang.Comparable key, int paintType)Returns a color for the given key and the given paint mode.java.awt.PaintgetPaint(java.lang.Comparable key, int paintType, java.awt.Paint defaultPaint)Returns a color for the given key and the given paint mode.java.util.MapgetPaints(int paintMode)Returns the created paint map for the given paint mode.voidsetDefaultPaint(java.awt.Paint defaultPaint)
-
-
-
Field Detail
-
PAINTMODE_DEFAULT
public static final int PAINTMODE_DEFAULT
The default paint mode provides only the default color- See Also:
- Constant Field Values
-
PAINTMODE_CONVERSATION
public static final int PAINTMODE_CONVERSATION
The paint mode for differ conversation ids- See Also:
- Constant Field Values
-
PAINTMODE_PERFORMATIV
public static final int PAINTMODE_PERFORMATIV
The paint mode for differ performatives- See Also:
- Constant Field Values
-
PAINTMODE_PROTOCOL
public static final int PAINTMODE_PROTOCOL
The paint mode for differ protocols- See Also:
- Constant Field Values
-
COLOR_COMPONENT
public static final int COLOR_COMPONENT
The paint mode for differ agents- See Also:
- Constant Field Values
-
DEFAULT_COLOR
public static final java.awt.Paint DEFAULT_COLOR
The standard default color
-
conversationPaints
protected java.util.Map conversationPaints
The paint map for conversation ids
-
performativPaints
protected java.util.Map performativPaints
The paint map for performatives
-
protocolPaints
protected java.util.Map protocolPaints
The paint map for protocols
-
agentPaints
protected java.util.Map agentPaints
The paint map for agents
-
-
Method Detail
-
createColor
public void createColor(Message message)
Retrievs information from the message and creates unique colors.- Parameters:
message- The message the information is retrieved from.
-
getMessagePaint
public java.awt.Paint getMessagePaint(Message message, int paintMode)
Returns the color for a given message and a given paint mode.- Parameters:
message- The message.paintMode- The paint mode.- Returns:
- The color for the message and the paint mode.
-
getPaints
public java.util.Map getPaints(int paintMode)
Returns the created paint map for the given paint mode.- Parameters:
paintMode- The paint mode.- Returns:
- The paint map for the paint mode.
-
getPaint
public java.awt.Paint getPaint(java.lang.Comparable key, int paintType)Returns a color for the given key and the given paint mode.- Parameters:
key- The key.paintType- The paint mode.- Returns:
- The color for the key and paint mode.
-
getPaint
public java.awt.Paint getPaint(java.lang.Comparable key, int paintType, java.awt.Paint defaultPaint)Returns a color for the given key and the given paint mode. If no such key is contained in the paint map the given default color is used.- Parameters:
key- The key.paintType- The paint mode.defaultPaint- The default color.- Returns:
- The color for the key and paint mode.
-
getDefaultPaint
public java.awt.Paint getDefaultPaint()
- Returns:
- The default color.
-
setDefaultPaint
public void setDefaultPaint(java.awt.Paint defaultPaint)
- Parameters:
defaultPaint- The default color to set.
-
-