|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.application.support.AbstractApplicationWindow
public abstract class AbstractApplicationWindow
Abstract helper implementation for ApplicationWindow
.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
AbstractApplicationWindow()
|
|
AbstractApplicationWindow(int number)
|
Method Summary | |
---|---|
void |
addPageListener(PageListener listener)
|
protected void |
applyStandardLayout(JFrame windowControl,
ApplicationWindowConfigurer configurer)
|
boolean |
close()
Close this window. |
protected JMenuBar |
createMenuBarControl()
|
protected JFrame |
createNewWindowControl()
|
protected ApplicationPage |
createPage(ApplicationWindow window,
String pageDescriptorId)
|
protected ApplicationPage |
createPage(PageDescriptor descriptor)
Factory method for creating the page area managed by this window. |
protected JComponent |
createStatusBarControl()
|
protected JComponent |
createToolBarControl()
|
protected abstract JComponent |
createWindowContentPane()
Implementors create the component that contains the contents of this window. |
protected ApplicationLifecycleAdvisor |
getAdvisor()
|
CommandManager |
getCommandManager()
|
JFrame |
getControl()
|
CommandGroup |
getMenuBar()
|
int |
getNumber()
|
ApplicationPage |
getPage()
|
protected PageDescriptor |
getPageDescriptor(String pageDescriptorId)
|
protected ApplicationServices |
getServices()
|
Iterator |
getSharedCommands()
|
StatusBar |
getStatusBar()
|
CommandGroup |
getToolBar()
|
protected ApplicationWindowConfigurer |
getWindowConfigurer()
|
protected void |
init()
|
protected ApplicationWindowConfigurer |
initWindowConfigurer()
|
protected void |
initWindowControl(JFrame windowControl)
|
boolean |
isControlCreated()
|
protected void |
prepareWindowForView(JFrame windowControl,
ApplicationWindowConfigurer configurer)
|
void |
removePageListener(PageListener listener)
|
protected abstract void |
setActivePage(ApplicationPage page)
Set the given ApplicationPage active (visible + selected if
applicable) |
void |
setWindowManager(WindowManager windowManager)
|
void |
showPage(ApplicationPage page)
Show the given page in this window. |
void |
showPage(PageDescriptor pageDescriptor)
|
void |
showPage(String pageId)
Show the given page in this window. |
void |
windowGainedFocus(WindowEvent e)
When gaining focus, set this window as the active one on it's manager. |
void |
windowLostFocus(WindowEvent e)
When losing focus no action is done. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.apache.commons.logging.Log logger
Constructor Detail |
---|
public AbstractApplicationWindow()
public AbstractApplicationWindow(int number)
Method Detail |
---|
protected void init()
public int getNumber()
getNumber
in interface ApplicationWindow
public ApplicationPage getPage()
getPage
in interface ApplicationWindow
protected ApplicationLifecycleAdvisor getAdvisor()
protected ApplicationServices getServices()
protected ApplicationWindowConfigurer getWindowConfigurer()
protected ApplicationWindowConfigurer initWindowConfigurer()
public CommandManager getCommandManager()
getCommandManager
in interface ApplicationWindow
public Iterator getSharedCommands()
getSharedCommands
in interface ApplicationWindow
public CommandGroup getMenuBar()
getMenuBar
in interface ApplicationWindow
public CommandGroup getToolBar()
getToolBar
in interface ApplicationWindow
public StatusBar getStatusBar()
getStatusBar
in interface ApplicationWindow
public void setWindowManager(WindowManager windowManager)
setWindowManager
in interface ApplicationWindow
public void showPage(String pageId)
showPage
in interface ApplicationWindow
pageId
- the page to show, identified by id
IllegalArgumentException
- if pageId == nullpublic void showPage(PageDescriptor pageDescriptor)
showPage
in interface ApplicationWindow
public void showPage(ApplicationPage page)
showPage
in interface ApplicationWindow
page
- the page to show
IllegalArgumentException
- if page == nullprotected final ApplicationPage createPage(ApplicationWindow window, String pageDescriptorId)
protected ApplicationPage createPage(PageDescriptor descriptor)
descriptor
- The page descriptor
protected PageDescriptor getPageDescriptor(String pageDescriptorId)
protected void initWindowControl(JFrame windowControl)
protected void applyStandardLayout(JFrame windowControl, ApplicationWindowConfigurer configurer)
protected abstract void setActivePage(ApplicationPage page)
ApplicationPage
active (visible + selected if
applicable)
page
- the ApplicationPage
protected void prepareWindowForView(JFrame windowControl, ApplicationWindowConfigurer configurer)
protected JFrame createNewWindowControl()
public JFrame getControl()
getControl
in interface ApplicationWindow
public boolean isControlCreated()
protected JMenuBar createMenuBarControl()
protected JComponent createToolBarControl()
protected JComponent createStatusBarControl()
public void addPageListener(PageListener listener)
addPageListener
in interface ApplicationWindow
public void removePageListener(PageListener listener)
removePageListener
in interface ApplicationWindow
public boolean close()
ApplicationLifecycleAdvisor.onPreWindowClose(ApplicationWindow)
method. Then tries to close it's currentPage. If both are successfull,
the window will be disposed and removed from the WindowManager
.
close
in interface ApplicationWindow
true
if both, the advisor and the
currentPage allow the closing action.public void windowGainedFocus(WindowEvent e)
windowGainedFocus
in interface WindowFocusListener
public void windowLostFocus(WindowEvent e)
windowLostFocus
in interface WindowFocusListener
protected abstract JComponent createWindowContentPane()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |