org.springframework.richclient.dialog
Class AlertMessageAreaPane

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.factory.AbstractControlFactory
          extended by org.springframework.richclient.dialog.AlertMessageAreaPane
All Implemented Interfaces:
PropertyChangeListener, EventListener, PropertyChangePublisher, Messagable, MessagePane, ControlFactory

public class AlertMessageAreaPane
extends AbstractControlFactory
implements MessagePane, PropertyChangeListener

MessagePane implementation used by MessageDialog.

Author:
Peter De Bruycker

Field Summary
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Fields inherited from interface org.springframework.richclient.dialog.Messagable
MESSAGE_PROPERTY
 
Constructor Summary
AlertMessageAreaPane()
          Creates a new uninitialized AlertMessageAreaPane.
AlertMessageAreaPane(Messagable delegate)
          Creates a new AlertMessageAreaPane that uses the given delegate as a message container.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Register a listener to all properties of this publisher.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Register a listener to a specific property.
protected  JComponent createControl()
          Subclasses must override this method to create a new instance of the control that this factory produces.
 Message getMessage()
           
 int getPreferredHeight()
           
 boolean isMessageShowing()
          Is this pane currently showing a message?
 void propertyChange(PropertyChangeEvent evt)
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove the listener from all properties of this publisher.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Remove the listener from a specific property.
 void setErrorIcon(Icon icon)
          Sets the icon to be shown when displaying messages with error-level severity.
 void setInfoIcon(Icon icon)
          The icon to be shown when dispalying messages with info-level severity.
 void setMessage(Message message)
          Set the message.
 void setWarningIcon(Icon icon)
          Sets the icon to be shown when displaying messages with warning-level severity.
 
Methods inherited from class org.springframework.richclient.factory.AbstractControlFactory
createControlIfNecessary, getControl, isControlCreated, isSingleton, setSingleton
 
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.richclient.factory.ControlFactory
getControl
 

Constructor Detail

AlertMessageAreaPane

public AlertMessageAreaPane()
Creates a new uninitialized AlertMessageAreaPane.


AlertMessageAreaPane

public AlertMessageAreaPane(Messagable delegate)
Creates a new AlertMessageAreaPane that uses the given delegate as a message container.

Parameters:
delegate - The messagable delegate.
Method Detail

getPreferredHeight

public int getPreferredHeight()

createControl

protected JComponent createControl()
Description copied from class: AbstractControlFactory
Subclasses must override this method to create a new instance of the control that this factory produces.

Specified by:
createControl in class AbstractControlFactory
Returns:
The newly created control, never null.

getMessage

public Message getMessage()
Specified by:
getMessage in interface MessagePane

setMessage

public void setMessage(Message message)
Description copied from interface: Messagable
Set the message.

Specified by:
setMessage in interface Messagable

isMessageShowing

public boolean isMessageShowing()
Description copied from interface: MessagePane
Is this pane currently showing a message?

Specified by:
isMessageShowing in interface MessagePane
Returns:
true or false

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Description copied from interface: PropertyChangePublisher
Register a listener to all properties of this publisher.

Specified by:
addPropertyChangeListener in interface PropertyChangePublisher
Parameters:
listener - the PropertyChangeListener to register.

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Description copied from interface: PropertyChangePublisher
Register a listener to a specific property.

Specified by:
addPropertyChangeListener in interface PropertyChangePublisher
Parameters:
propertyName - the property to monitor.
listener - the PropertyChangeListener to register.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Description copied from interface: PropertyChangePublisher
Remove the listener from all properties of this publisher.

Specified by:
removePropertyChangeListener in interface PropertyChangePublisher
Parameters:
listener - the PropertyChangeListener to remove.

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Description copied from interface: PropertyChangePublisher
Remove the listener from a specific property.

Specified by:
removePropertyChangeListener in interface PropertyChangePublisher
Parameters:
propertyName - the property that was being monitored.
listener - the PropertyChangeListener to remove.

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

setErrorIcon

public void setErrorIcon(Icon icon)
Sets the icon to be shown when displaying messages with error-level severity.

Parameters:
icon - The error icon.

setWarningIcon

public void setWarningIcon(Icon icon)
Sets the icon to be shown when displaying messages with warning-level severity.

Parameters:
icon - The warning icon.

setInfoIcon

public void setInfoIcon(Icon icon)
The icon to be shown when dispalying messages with info-level severity.

Parameters:
icon - The info icon.


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.