org.springframework.richclient.core
Class LabeledObjectSupport

java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.core.LabeledObjectSupport
All Implemented Interfaces:
CommandLabelConfigurable, DescribedElement, DescriptionConfigurable, TitleConfigurable, VisualizedElement, ImageConfigurable
Direct Known Subclasses:
AbstractDialogPage, AbstractPageDescriptor, DefaultApplicationDescriptor, DefaultViewDescriptor, LookupViewDescriptor

public class LabeledObjectSupport
extends ApplicationServicesAccessor
implements DescribedElement, VisualizedElement, CommandLabelConfigurable, ImageConfigurable, DescriptionConfigurable, TitleConfigurable

A convenient super class for objects that can be labeled for display in a GUI.

Author:
Keith Donald

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Fields inherited from interface org.springframework.richclient.core.DescribedElement
CAPTION_PROPERTY, DESCRIPTION_PROPERTY, DISPLAY_NAME_PROPERTY
 
Constructor Summary
LabeledObjectSupport()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void addPropertyChangeListener(String propertyName, PropertyChangeListener l)
           
protected  void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
           
protected  void firePropertyChange(String propertyName, int oldValue, int newValue)
           
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
           
 KeyStroke getAccelerator()
           
 String getCaption()
          Returns the caption for this object.
 String getDescription()
          Returns a description of this object.
 String getDisplayName()
          Returns the display name of this object.
 Icon getIcon()
          Returns the icon associated with the application component, or null.
 Image getImage()
          Returns the image associated with the application component, or null.
 CommandButtonLabelInfo getLabel()
           
 int getMnemonic()
           
 int getMnemonicIndex()
           
protected  boolean hasChanged(boolean currentValue, boolean proposedValue)
           
protected  boolean hasChanged(int currentValue, int proposedValue)
           
protected  boolean hasChanged(Object currentValue, Object proposedValue)
           
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void removePropertyChangeListener(String propertyName, PropertyChangeListener l)
           
 void setCaption(String caption)
           
 void setDescription(String description)
           
 void setImage(Image image)
           
 void setLabelInfo(CommandButtonLabelInfo label)
           
 void setTitle(String title)
          Sets the title.
 String toString()
           
 
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, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

LabeledObjectSupport

public LabeledObjectSupport()
Method Detail

setLabelInfo

public void setLabelInfo(CommandButtonLabelInfo label)
Specified by:
setLabelInfo in interface CommandLabelConfigurable

setCaption

public void setCaption(String caption)
Specified by:
setCaption in interface DescriptionConfigurable

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface DescriptionConfigurable

setTitle

public void setTitle(String title)
Description copied from interface: TitleConfigurable
Sets the title.

Specified by:
setTitle in interface TitleConfigurable
Parameters:
title - the title

setImage

public void setImage(Image image)
Specified by:
setImage in interface ImageConfigurable

getDisplayName

public String getDisplayName()
Description copied from interface: DescribedElement
Returns the display name of this object.

Specified by:
getDisplayName in interface DescribedElement
Returns:
The display name, or null.

getCaption

public String getCaption()
Description copied from interface: DescribedElement
Returns the caption for this object.

Specified by:
getCaption in interface DescribedElement
Returns:
The caption, or null.

getDescription

public String getDescription()
Description copied from interface: DescribedElement
Returns a description of this object.

Specified by:
getDescription in interface DescribedElement
Returns:
The description, or null.

getImage

public Image getImage()
Description copied from interface: VisualizedElement
Returns the image associated with the application component, or null.

Specified by:
getImage in interface VisualizedElement

getIcon

public Icon getIcon()
Description copied from interface: VisualizedElement
Returns the icon associated with the application component, or null.

Specified by:
getIcon in interface VisualizedElement

getMnemonic

public int getMnemonic()

getMnemonicIndex

public int getMnemonicIndex()

getAccelerator

public KeyStroke getAccelerator()

getLabel

public CommandButtonLabelInfo getLabel()

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener l)

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  boolean oldValue,
                                  boolean newValue)

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  int oldValue,
                                  int newValue)

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)

hasChanged

protected boolean hasChanged(Object currentValue,
                             Object proposedValue)

hasChanged

protected boolean hasChanged(boolean currentValue,
                             boolean proposedValue)

hasChanged

protected boolean hasChanged(int currentValue,
                             int proposedValue)

toString

public String toString()
Overrides:
toString in class Object


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