org.springframework.richclient.samples.petclinic.ui
Class OwnerManagerView

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
              extended by org.springframework.richclient.samples.petclinic.ui.OwnerManagerView
All Implemented Interfaces:
EventListener, PropertyChangePublisher, ApplicationListener, PageComponent, View, DescribedElement, VisualizedElement, ControlFactory

public class OwnerManagerView
extends AbstractView
implements ApplicationListener

Shows the owners and their pets in a tree structure. Several dialogs are used to show detail information or messages. Notice that we're explicitly setting CloseActions to either dispose or hide the dialog as an example. Check out the default behavior of the dialog type that you use to determine if you need to specify this as well.

Author:
Keith Donald, Jan Hoskens

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
OwnerManagerView()
           
 
Method Summary
 void componentClosed()
           
 void componentFocusGained()
           
 void componentFocusLost()
           
 void componentOpened()
           
protected  JComponent createControl()
          Subclasses must override this method to create a new instance of the control that this factory produces.
 TreeCellRenderer getTreeCellRenderer()
           
 void onApplicationEvent(ApplicationEvent e)
           
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 setClinic(org.springframework.samples.petclinic.Clinic clinic)
           
 void setLastNameToDisplay(String ownerLastName)
           
 
Methods inherited from class org.springframework.richclient.application.support.AbstractView
addPropertyChangeListener, addPropertyChangeListener, canClose, close, dispose, getCaption, getContext, getDescription, getDescriptor, getDisplayName, getIcon, getId, getImage, getStatusBar, getWindowCommandManager, getWindowControl, removePropertyChangeListener, removePropertyChangeListener, setContext, setDescriptor
 
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

OwnerManagerView

public OwnerManagerView()
Method Detail

setClinic

public void setClinic(org.springframework.samples.petclinic.Clinic clinic)

setLastNameToDisplay

public void setLastNameToDisplay(String ownerLastName)

registerLocalCommandExecutors

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

Overrides:
registerLocalCommandExecutors in class AbstractView
Parameters:
context - the view context

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 AbstractView
Returns:
The newly created control, never null.

getTreeCellRenderer

public TreeCellRenderer getTreeCellRenderer()

onApplicationEvent

public void onApplicationEvent(ApplicationEvent e)
Specified by:
onApplicationEvent in interface ApplicationListener

componentClosed

public void componentClosed()
Specified by:
componentClosed in interface PageComponent
Overrides:
componentClosed in class AbstractView

componentFocusGained

public void componentFocusGained()
Specified by:
componentFocusGained in interface PageComponent
Overrides:
componentFocusGained in class AbstractView

componentFocusLost

public void componentFocusLost()
Specified by:
componentFocusLost in interface PageComponent
Overrides:
componentFocusLost in class AbstractView

componentOpened

public void componentOpened()
Specified by:
componentOpened in interface PageComponent
Overrides:
componentOpened in class AbstractView


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