Class PaintMaps


  • public class PaintMaps
    extends java.lang.Object
    The 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.
    • Constructor Summary

      Constructors 
      Constructor Description
      PaintMaps()
      Default constructor with standard default color.
      PaintMaps​(java.awt.Paint defaultPaint)
      Constructor with given default color.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void createColor​(Message message)
      Retrievs information from the message and creates unique colors.
      java.awt.Paint getDefaultPaint()  
      java.awt.Paint getMessagePaint​(Message message, int paintMode)
      Returns the color for a given message and a given paint mode.
      java.awt.Paint getPaint​(java.lang.Comparable key, int paintType)
      Returns a color for the given key and the given paint mode.
      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.
      java.util.Map getPaints​(int paintMode)
      Returns the created paint map for the given paint mode.
      void setDefaultPaint​(java.awt.Paint defaultPaint)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • PaintMaps

        public PaintMaps()
        Default constructor with standard default color.
      • PaintMaps

        public PaintMaps​(java.awt.Paint defaultPaint)
        Constructor with given default color.
        Parameters:
        defaultPaint - The default color.
    • 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.