org.millstone.base.terminal
Class CompositeErrorMessage

java.lang.Object
  |
  +--org.millstone.base.terminal.CompositeErrorMessage
All Implemented Interfaces:
ErrorMessage, java.util.EventListener, Paintable

public class CompositeErrorMessage
extends java.lang.Object
implements ErrorMessage

Class for combining multiple error messages together.

Since:
3.0
Version:
3.0.3
Author:
IT Mill Ltd

Nested Class Summary
 
Nested classes inherited from class org.millstone.base.terminal.Paintable
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener
 
Field Summary
 
Fields inherited from interface org.millstone.base.terminal.ErrorMessage
CRITICAL, ERROR, INFORMATION, SYSTEMERROR, WARNING
 
Constructor Summary
CompositeErrorMessage(java.util.Collection errorMessages)
          Constructor for CompositeErrorMessage.
CompositeErrorMessage(ErrorMessage[] errorMessages)
          Constructor for CompositeErrorMessage.
 
Method Summary
 void addListener(Paintable.RepaintRequestListener listener)
          Error messages are inmodifiable and thus listeners are not needed.
 int getErrorLevel()
          The error level is the largest error level in
 java.util.Iterator iterator()
          Get Error Iterator.
 void paint(PaintTarget target)
          Paints the paintable into a UIDL stream.
 void removeListener(Paintable.RepaintRequestListener listener)
          Error messages are inmodifiable and thus listeners are not needed.
 void requestRepaint()
          Error messages are inmodifiable and thus listeners are not needed.
 void requestRepaintRequests()
          Request sending of repaint events on any further visible changes.
 java.lang.String toString()
          Returns a comma separated list of the error messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeErrorMessage

public CompositeErrorMessage(ErrorMessage[] errorMessages)
Constructor for CompositeErrorMessage.

Parameters:
errorMessages - Array of error messages that are listed togeter. Nulls are ignored, but at least one message is required.
Throws:
java.lang.NullPointerException - if errorMessages is null. * @throws IllegalArgumentException if the array was empty.

CompositeErrorMessage

public CompositeErrorMessage(java.util.Collection errorMessages)
Constructor for CompositeErrorMessage.

Parameters:
errorMessages - Collection of error messages that are listed togeter. At least one message is required.
Throws:
java.lang.NullPointerException - if the collection is null.
java.lang.IllegalArgumentException - if the collection was empty.
Method Detail

getErrorLevel

public final int getErrorLevel()
The error level is the largest error level in

Specified by:
getErrorLevel in interface ErrorMessage
Returns:
the level of error as an integer.
See Also:
ErrorMessage.getErrorLevel()

iterator

public java.util.Iterator iterator()
Get Error Iterator.


paint

public void paint(PaintTarget target)
           throws PaintException
Description copied from interface: Paintable

Paints the paintable into a UIDL stream. This method creates the UIDL sequence describing it and outputs it to the given UIDL stream.

It's is called when the contents of the component should be painted in response to the component first being shown or having been altered so that its visual representation is changed.

Specified by:
paint in interface Paintable
Parameters:
target - target UIDL stream where the component should paint itself to
Throws:
PaintException - if the paint operation failed

addListener

public void addListener(Paintable.RepaintRequestListener listener)
Description copied from interface: ErrorMessage
Error messages are inmodifiable and thus listeners are not needed. This method should be implemented as empty.

Specified by:
addListener in interface ErrorMessage
See Also:
Paintable.addListener(Paintable.RepaintRequestListener)

removeListener

public void removeListener(Paintable.RepaintRequestListener listener)
Description copied from interface: ErrorMessage
Error messages are inmodifiable and thus listeners are not needed. This method should be implemented as empty.

Specified by:
removeListener in interface ErrorMessage
See Also:
Paintable.removeListener(Paintable.RepaintRequestListener)

requestRepaint

public void requestRepaint()
Description copied from interface: ErrorMessage
Error messages are inmodifiable and thus listeners are not needed. This method should be implemented as empty.

Specified by:
requestRepaint in interface ErrorMessage
See Also:
Paintable.requestRepaint()

requestRepaintRequests

public void requestRepaintRequests()
Description copied from interface: Paintable
Request sending of repaint events on any further visible changes. Normally the paintable only send up to one repaint request for listeners after paint as the paintable as the paintable assumes that the listeners already know about the repaint need. This method resets the assumtion. Paint implicitly does the assumtion reset functionality implemented by this method. This method is normally used only by the terminals to note paintables about implicit repaints (painting the component without actually invoking paint method).

Specified by:
requestRepaintRequests in interface Paintable

toString

public java.lang.String toString()
Returns a comma separated list of the error messages.

Overrides:
toString in class java.lang.Object
Returns:
String, comma separated list of error messages.


Copyright © 2000,2001,2002 IT Mill Ltd. All Rights Reserved.