org.jrabbit.standard.profiler.entities.standard
Class ProfilerMessages

java.lang.Object
  extended by org.jrabbit.standard.profiler.entities.base.BaseProfilerEntity
      extended by org.jrabbit.standard.profiler.entities.base.FontBasedProfilerEntity
          extended by org.jrabbit.standard.profiler.entities.base.TextProfilerEntity
              extended by org.jrabbit.standard.profiler.entities.standard.ProfilerMessages
All Implemented Interfaces:
Renderable, Referenced, Dimensioned, Visible, ProfilerEntity

public class ProfilerMessages
extends TextProfilerEntity

ProfilerMessages, similarly to ProfilerMessage, displays the output of a series of Messages. It is automatically updated whenever their contents change. NOTE: This class renders its reference above its Messages, this is to declare the "category" of Messages it displays.

Author:
Chris Molini

Nested Class Summary
protected  class ProfilerMessages.MessageListener
          A MessageListener automatically updates the text of the ProfilerMessages it belongs to whenever the Message it is listening to changes.
 
Field Summary
protected  ProfilerMessages.MessageListener[] listeners
          The list of MessageListeners.
 
Fields inherited from class org.jrabbit.standard.profiler.entities.base.TextProfilerEntity
text, widths
 
Fields inherited from class org.jrabbit.standard.profiler.entities.base.FontBasedProfilerEntity
fontPointer
 
Fields inherited from class org.jrabbit.standard.profiler.entities.base.BaseProfilerEntity
height, reference, visible, width
 
Constructor Summary
ProfilerMessages(java.lang.String reference, Message... messages)
          Creates a ProfilerMessages that displays the information represented by the indicated Messages.
 
Method Summary
 Message message(int place)
          Accesses the indicated Message object.
 void setMessage(int place, Message message)
          Redefines the Message at the indicated place in the list.
 void setMessages(Message... messages)
          Resets the list of Messages.
 
Methods inherited from class org.jrabbit.standard.profiler.entities.base.TextProfilerEntity
getText, render, setText, setText, updateDimensions
 
Methods inherited from class org.jrabbit.standard.profiler.entities.base.FontBasedProfilerEntity
fontPointer
 
Methods inherited from class org.jrabbit.standard.profiler.entities.base.BaseProfilerEntity
height, reference, setVisible, visible, width
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected ProfilerMessages.MessageListener[] listeners
The list of MessageListeners.

Constructor Detail

ProfilerMessages

public ProfilerMessages(java.lang.String reference,
                        Message... messages)
Creates a ProfilerMessages that displays the information represented by the indicated Messages. It will be automatically updated whenever their contents change.

Parameters:
reference - The identifier of this ProfilerEntity. This is also the category name rendered above the list of Messages.
messages - The Messages to render.
Method Detail

message

public Message message(int place)
Accesses the indicated Message object. NOTE: The place specified should not be the line number of text, but the index in the list of Messages.

Parameters:
place - The index of the Message to access.
Returns:
The Message at the specified index that is being listened to.

setMessage

public void setMessage(int place,
                       Message message)
Redefines the Message at the indicated place in the list.

Parameters:
The - index of the Message to redefine.
message - The new Message to render.

setMessages

public void setMessages(Message... messages)
Resets the list of Messages.

Parameters:
messages - The new Messages to render.