|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.factory.AbstractControlFactory
org.springframework.richclient.application.support.AbstractApplicationPage
public abstract class AbstractApplicationPage
Abstract "convenience" implementation of ApplicationPage.
| Field Summary |
|---|
| Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
|---|
logger |
| Constructor Summary | |
|---|---|
AbstractApplicationPage()
|
|
AbstractApplicationPage(ApplicationWindow window,
PageDescriptor pageDescriptor)
|
|
| Method Summary | ||
|---|---|---|
protected void |
addPageComponent(PageComponent pageComponent)
Adds the pageComponent to the components list while registering listeners and firing appropriate events. |
|
void |
addPageComponentListener(PageComponentListener listener)
|
|
boolean |
close()
Closes this ApplicationPage. |
|
boolean |
close(PageComponent pageComponent)
Closes the given PageComponent. |
|
boolean |
closeAllEditors()
|
|
protected PageComponent |
createPageComponent(PageComponentDescriptor descriptor)
Creates a PageComponent for the given PageComponentDescriptor. |
|
protected PageComponentPane |
createPageComponentPane(PageComponent pageComponent)
|
|
protected abstract void |
doAddPageComponent(PageComponent pageComponent)
This method must add the given PageComponent in the ui. |
|
protected abstract void |
doRemovePageComponent(PageComponent pageComponent)
This method must remove the given PageComponent from the ui. |
|
protected PageComponent |
findPageComponent(String viewDescriptorId)
|
|
protected void |
fireClosed(PageComponent component)
|
|
protected void |
fireFocusGained(PageComponent component)
|
|
protected void |
fireFocusLost(PageComponent component)
|
|
protected void |
fireOpened(PageComponent component)
|
|
PageComponent |
getActiveComponent()
Returns the active PageComponent, or null if none. |
|
ApplicationEventMulticaster |
getApplicationEventMulticaster()
|
|
String |
getId()
|
|
PageComponentPaneFactory |
getPageComponentPaneFactory()
|
|
List<PageComponent> |
getPageComponents()
Returns the list of PageComponents on this ApplicationPage. |
|
protected PageDescriptor |
getPageDescriptor()
|
|
|
getView(String id)
Returns the View with the given id. |
|
protected ViewDescriptor |
getViewDescriptor(String viewDescriptorId)
|
|
ViewDescriptorRegistry |
getViewDescriptorRegistry()
|
|
ApplicationWindow |
getWindow()
|
|
protected abstract boolean |
giveFocusTo(PageComponent pageComponent)
This method must transfer the focus to the given PageComponent. |
|
void |
openEditor(Object editorInput)
|
|
void |
removePageComponentListener(PageComponentListener listener)
|
|
protected void |
setActiveComponent()
Sets the first PageComponent as the active one. |
|
void |
setActiveComponent(PageComponent pageComponent)
Activates the given PageComponent. |
|
void |
setApplicationWindow(ApplicationWindow window)
|
|
void |
setDescriptor(PageDescriptor descriptor)
|
|
void |
setPageComponentPaneFactory(PageComponentPaneFactory pageComponentPaneFactory)
|
|
void |
setViewDescriptorRegistry(ViewDescriptorRegistry viewDescriptorRegistry)
|
|
View |
showView(String id)
Shows the View with the given id. |
|
View |
showView(String id,
Object input)
Shows the View with the given id, and passes the input to the View, by calling
View.setInput(Object). |
|
protected void |
updatePageComponentProperties(PageComponent pageComponent)
Called when the PageComponent changes any of its properties (display name, caption, icon, ...). |
|
| Methods inherited from class org.springframework.richclient.factory.AbstractControlFactory |
|---|
createControl, 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 |
|---|
public AbstractApplicationPage()
public AbstractApplicationPage(ApplicationWindow window,
PageDescriptor pageDescriptor)
| Method Detail |
|---|
protected void updatePageComponentProperties(PageComponent pageComponent)
PageComponent changes any of its properties (display name, caption, icon, ...).
This method should be overridden when these changes must be reflected in the ui.
pageComponent - the PageComponent that has changedprotected PageComponent findPageComponent(String viewDescriptorId)
public <T extends View> T getView(String id)
ApplicationPageView with the given id. Returns null if no View with the given id is
shown.
This method is "generified" to avoid extra casts when calling this method:
ApplicationPage page = ...; // get a reference to the ApplicationPage
InitialView initialView = page.getView("initialView");
getView in interface ApplicationPageid - the id, cannot be null
View, or nullpublic void addPageComponentListener(PageComponentListener listener)
addPageComponentListener in interface ApplicationPagepublic void removePageComponentListener(PageComponentListener listener)
removePageComponentListener in interface ApplicationPageprotected void fireOpened(PageComponent component)
protected void fireFocusGained(PageComponent component)
protected void setActiveComponent()
PageComponent as the active one.
protected ViewDescriptor getViewDescriptor(String viewDescriptorId)
public PageComponent getActiveComponent()
PageComponent, or null if none.
getActiveComponent in interface ApplicationPagePageComponentpublic void setActiveComponent(PageComponent pageComponent)
PageComponent. Does nothing if it is already the active one.
Does nothing if this ApplicationPage doesn't contain the given PageComponent.
setActiveComponent in interface ApplicationPagepageComponent - the PageComponentprotected void fireFocusLost(PageComponent component)
protected abstract void doAddPageComponent(PageComponent pageComponent)
PageComponent in the ui.
Implementors may choose to add the PageComponent's control directly, or add the
PageComponentPane's control.
pageComponent - the PageComponent to addprotected abstract void doRemovePageComponent(PageComponent pageComponent)
PageComponent from the ui.
pageComponent - the PageComponent to removeprotected abstract boolean giveFocusTo(PageComponent pageComponent)
PageComponent. This could involve making an
internal frame visible, selecting a tab in a tabbed pane, ...
pageComponent - the PageComponent
true if the operation was successful, false otherwiseprotected PageComponentPane createPageComponentPane(PageComponent pageComponent)
protected void fireClosed(PageComponent component)
public String getId()
getId in interface ApplicationPagepublic ApplicationWindow getWindow()
getWindow in interface ApplicationPagepublic boolean close(PageComponent pageComponent)
PageComponent. This method disposes the PageComponent, triggers all
necessary events ("focus lost" and "closed"), and will activate another PageComponent (if there is
one).
Returns false if this ApplicationPage doesn't contain the given
PageComponent.
close in interface ApplicationPagepageComponent - the PageComponent
true if pageComponent was successfully closed.public boolean close()
ApplicationPage. This method calls close(PageComponent) for each open
PageComponent.
close in interface ApplicationPagetrue if the operation was successful, false otherwise.public View showView(String id)
ApplicationPageView with the given id.
If the View is already opened, the view will be reused.
NOTE: this is NOT the same as calling this.showView(id, null).
showView in interface ApplicationPageid - the view id, cannot be empty
View that is shown
public View showView(String id,
Object input)
ApplicationPageView with the given id, and passes the input to the View, by calling
View.setInput(Object).
If the View is already opened, the view will be reused.
showView in interface ApplicationPageid - the view id, cannot be emptyinput - the input, can be null
View that is shownpublic void openEditor(Object editorInput)
openEditor in interface ApplicationPagepublic boolean closeAllEditors()
closeAllEditors in interface ApplicationPageprotected void addPageComponent(PageComponent pageComponent)
pageComponent - the pageComponent to add.protected PageComponent createPageComponent(PageComponentDescriptor descriptor)
descriptor - the descriptor
public List<PageComponent> getPageComponents()
ApplicationPagePageComponents on this ApplicationPage.
getPageComponents in interface ApplicationPagepublic final void setApplicationWindow(ApplicationWindow window)
public final void setDescriptor(PageDescriptor descriptor)
protected PageDescriptor getPageDescriptor()
public ApplicationEventMulticaster getApplicationEventMulticaster()
public void setViewDescriptorRegistry(ViewDescriptorRegistry viewDescriptorRegistry)
public ViewDescriptorRegistry getViewDescriptorRegistry()
public void setPageComponentPaneFactory(PageComponentPaneFactory pageComponentPaneFactory)
public PageComponentPaneFactory getPageComponentPaneFactory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||