org.springframework.richclient.application.support
Class AbstractView

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.application.support.AbstractView
All Implemented Interfaces:
PropertyChangePublisher, PageComponent, View, DescribedElement, VisualizedElement, ControlFactory
Direct Known Subclasses:
AbstractNavigatorView, ContactView, InitialView, InitialView, ScriptedView, ViewWithInput, WidgetView

public abstract class AbstractView
extends AbstractControlFactory
implements View


Field Summary
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Fields inherited from interface org.springframework.richclient.core.DescribedElement
CAPTION_PROPERTY, DESCRIPTION_PROPERTY, DISPLAY_NAME_PROPERTY
 
Constructor Summary
AbstractView()
           
 
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.
 boolean canClose()
           
 void close()
           
 void componentClosed()
           
 void componentFocusGained()
           
 void componentFocusLost()
           
 void componentOpened()
           
protected abstract  JComponent createControl()
          Subclasses must override this method to create a new instance of the control that this factory produces.
 void dispose()
           
 String getCaption()
          Returns the caption for this object.
 PageComponentContext getContext()
           
 String getDescription()
          Returns a description of this object.
 PageComponentDescriptor getDescriptor()
           
 String getDisplayName()
          Returns the display name of this object.
 Icon getIcon()
          Returns the icon associated with the application component, or null.
 String getId()
           
 Image getImage()
          Returns the image associated with the application component, or null.
protected  StatusBar getStatusBar()
           
protected  CommandManager getWindowCommandManager()
           
protected  Window getWindowControl()
           
protected  void registerLocalCommandExecutors(PageComponentContext context)
          Template method called once when this view is initialized; allows subclasses to register local executors for shared commands with the view context.
 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 setContext(PageComponentContext context)
           
 void setDescriptor(PageComponentDescriptor descriptor)
           
 void setInput(Object input)
          Sets the input for this View.
 
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

AbstractView

public AbstractView()
Method Detail

setDescriptor

public void setDescriptor(PageComponentDescriptor descriptor)
Specified by:
setDescriptor in interface PageComponent

setContext

public final void setContext(PageComponentContext context)
Specified by:
setContext in interface PageComponent

getId

public String getId()
Specified by:
getId in interface PageComponent

getDescriptor

public PageComponentDescriptor getDescriptor()

getContext

public PageComponentContext getContext()
Specified by:
getContext in interface PageComponent

componentOpened

public void componentOpened()
Specified by:
componentOpened in interface PageComponent

componentClosed

public void componentClosed()
Specified by:
componentClosed in interface PageComponent

componentFocusGained

public void componentFocusGained()
Specified by:
componentFocusGained in interface PageComponent

componentFocusLost

public void componentFocusLost()
Specified by:
componentFocusLost in interface PageComponent

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.

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.

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

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

getWindowControl

protected final Window getWindowControl()

getWindowCommandManager

protected final CommandManager getWindowCommandManager()

getStatusBar

protected final StatusBar getStatusBar()

createControl

protected abstract 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.

registerLocalCommandExecutors

protected void registerLocalCommandExecutors(PageComponentContext context)
Template method called once when this view is initialized; allows subclasses to register local executors for shared commands with the view context.

Parameters:
context - the view context

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.

dispose

public void dispose()
Specified by:
dispose in interface PageComponent

canClose

public boolean canClose()
Specified by:
canClose in interface PageComponent

close

public void close()
Specified by:
close in interface PageComponent

setInput

public void setInput(Object input)
Sets the input for this View. This method may be implemented so this View can update it's own state (ui) when this method is called.

Normally this method is called from ApplicationPage.showView(String, Object), but may also be called directly. This implementation does nothing.

Specified by:
setInput in interface View
Parameters:
input - the input, can be null


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