com.vaadin.terminal.
Class CompositeErrorMessage
java.lang.Object
com.vaadin.terminal.CompositeErrorMessage
All Implemented Interfaces:
- extends Object
- implements ErrorMessage, Serializable
public class CompositeErrorMessage
Class for combining multiple error messages together.
Since:
3.0
Version:
6.8.18
Author:
Vaadin Ltd
See Also:
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.vaadin.terminal.Paintable |
---|
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
Field Summary |
---|
Fields inherited from interface com.vaadin.terminal.ErrorMessage |
---|
CRITICAL, ERROR, INFORMATION, SYSTEMERROR, WARNING |
Constructor Summary | |
---|---|
CompositeErrorMessage(Collection<? extends ErrorMessage> 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. |
String |
getDebugId()
Get's currently set debug identifier |
int |
getErrorLevel()
The error level is the largest error level in |
Iterator<ErrorMessage> |
iterator()
Gets 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. |
void |
setDebugId(String id)
Adds an unique id for component that get's transferred to terminal for testing purposes. |
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)
- Parameters:
errorMessages
- the Array of error messages that are listed togeter. Nulls are ignored, but at least one message is required.
Constructor for CompositeErrorMessage.
CompositeErrorMessage
public CompositeErrorMessage(Collection<? extends ErrorMessage> errorMessages)
- Parameters:
errorMessages
- the Collection of error messages that are listed together. At least one message is required.
Constructor for CompositeErrorMessage.
Method Detail |
---|
getErrorLevel
public final int getErrorLevel()
- Specified by:
getErrorLevel
in interfaceErrorMessage
- Returns:
- the level of error as an integer.
- See Also:
ErrorMessage.getErrorLevel()
The error level is the largest error level in
iterator
public Iterator<ErrorMessage> iterator()
- Returns:
- the error iterator.
Gets Error Iterator.
paint
public void paint(PaintTarget target)
throws PaintException
- Parameters:
target
- the target UIDL stream where the component should paint itself to.- Throws:
PaintException
- if the paint operation failed.- See Also:
Paintable.paint(com.vaadin.terminal.PaintTarget)
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 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.
addListener
public void addListener(Paintable.RepaintRequestListener listener)
- Specified by:
addListener
in interfaceErrorMessage
- Specified by:
addListener
in interfacePaintable
- Parameters:
listener
- the listener to be added.- See Also:
Paintable.addListener(Paintable.RepaintRequestListener)
Description copied from interface: ErrorMessage
Error messages are inmodifiable and thus listeners are not needed. This method should be implemented as empty.
removeListener
public void removeListener(Paintable.RepaintRequestListener listener)
- Specified by:
removeListener
in interfaceErrorMessage
- Specified by:
removeListener
in interfacePaintable
- Parameters:
listener
- the listener to be removed.- See Also:
Paintable.removeListener(Paintable.RepaintRequestListener)
Description copied from interface: ErrorMessage
Error messages are inmodifiable and thus listeners are not needed. This method should be implemented as empty.
requestRepaint
public void requestRepaint()
- Specified by:
requestRepaint
in interfaceErrorMessage
- Specified by:
requestRepaint
in interfacePaintable
- See Also:
Paintable.requestRepaint()
Description copied from interface: ErrorMessage
Error messages are inmodifiable and thus listeners are not needed. This method should be implemented as empty.
requestRepaintRequests
public void requestRepaintRequests()
- Specified by:
requestRepaintRequests
in interfacePaintable
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).
toString
public String toString()
- Returns:
- String, comma separated list of error messages.
Returns a comma separated list of the error messages.
getDebugId
public String getDebugId()
- Specified by:
getDebugId
in interfacePaintable
- Returns:
- current debug id, null if not set
Description copied from interface: Paintable
Get's currently set debug identifier
setDebugId
public void setDebugId(String id)
- Specified by:
setDebugId
in interfacePaintable
- Parameters:
id
- A short (< 20 chars) alphanumeric id
Description copied from interface: Paintable
Adds an unique id for component that get's transferred to terminal for testing purposes. Keeping identifiers unique throughout the Application instance is on programmers responsibility.
Note, that with the current terminal implementation the identifier cannot be changed while the component is visible. This means that the identifier should be set before the component is painted for the first time and kept the same while visible in the client.