final public class ValidationResultViewFactory (Code)
A factory class that vends views that present the state and contents
of
ValidationResult s. The validation views are composed from
user interface components like text areas, lists, labels, etc.
Most factory methods require a
ValidationResultModel that
notifies the view about changes in an underlying ValidationResult.
author: Karsten Lentzsch version: $Revision: 1.11 $ See Also:ValidationResult See Also:ValidationMessage
Inner Class :final public static class MessageStateChangeHandler implements PropertyChangeListener
Creates and returns a label with icon and text that indicates
the validation state and displays the first message text.
Parameters: model - the model that provides the observable validation result a label with text and icon that shows the validation severityand the first validation message text
Creates and returns a transparent panel that consists of a report label
and a transparent report text area. Both components are bound to
the given ValidationResultModel: the text content presents
the validation result message text and the whole panel is visible
if and only if the model has messages.
Parameters: model - the model that provides the observable validation result a panel with icon and text area bound to a validation result
Creates and returns an icon label that indicates the validation severity.
A handler updates the label's visibility and icon each time the severity
of the given validation result model changes.
Parameters: model - the model that provides the observable validation result a label with an icon that presents the validation severity
Creates and returns a list that presents validation messages.
The list content is bound to the given
ValidationResultModel using a
ValidationResultListAdapter .
Parameters: model - the model that provides the observable validation result a JList that shows validation messages
Creates and returns a list wrapped in a scroll pane that presents
validation messages. The list content is bound to the given
ValidationResultModel using a
ValidationResultListAdapter .
Parameters: model - the model that provides the observable validation result Parameters: backgroundColor - the color used to paint the area's background a JList that shows validation messages
Creates and returns a text area that is intended to show validation
messages. The area is bound to the given
ValidationResultModel : the text content reflects
the validation result message text and the component is visible
if and only if the model has messages.
Parameters: model - the model that provides the observable validation result a text area intended to show validation messages
Creates and returns a text area that is intended to show validation
messages. The area is bound to the given
ValidationResultModel :
the text content reflects the validation result message text,
and the component is visible if and only if the model has messages.
Parameters: model - the model that provides the observable validation result Parameters: backgroundColor - the color used to paint the area's background a text area intended to show validation messages
Creates and returns a text area wrapped by a scroll pane that is
intended to show validation messages. The component is bound to
the given
ValidationResultModel : the text content reflects
the validation result message text and the component is visible
if and only if the model has messages.
Parameters: model - the model that provides the observable validation result a scrollable text component intended to show validation messages
Creates and returns a text area wrapped by a scroll pane that is
intended to show validation messages. The component is bound to
the given
ValidationResultModel : the text content reflects
the validation result message text and the component is visible
if and only if the model has messages.
Parameters: model - the model that provides the observable validation result Parameters: backgroundColor - the color used to paint the area's background a scrollable text component intended to show validation messages