public abstract class AbstractApplicationPage extends AbstractControlFactory implements ApplicationPage
ApplicationPage
.Modifier | Constructor and Description |
---|---|
protected |
AbstractApplicationPage() |
Modifier and Type | Method and Description |
---|---|
void |
addPageComponentListener(PageComponentListener listener) |
ToolView |
addToolView(ToolViewDescriptor viewDescriptor) |
boolean |
close()
Closes this
ApplicationPage . |
void |
close(PageComponent pageComponent)
Closes the given
PageComponent . |
boolean |
closeAllDocViews() |
protected ToolView |
createToolView(ToolViewDescriptor descriptor)
Creates a PageComponent for the given PageComponentDescriptor.
|
protected abstract PageComponentPane |
createToolViewPane(ToolView toolView) |
protected abstract void |
doAddToolView(ToolView toolView)
This method must add the given tool view in the UI.
|
protected abstract void |
doHideToolView(ToolView toolView)
This method must hide the given tool view in the UI.
|
protected abstract void |
doRemoveToolView(ToolView toolView)
This method must remove the given tool view from the UI.
|
protected abstract void |
doShowToolView(ToolView toolView)
This method must show the given tool view in the UI.
|
protected void |
fireClosed(PageComponent component) |
protected void |
fireFocusGained(PageComponent component) |
protected void |
fireFocusLost(PageComponent component) |
protected void |
fireHidden(PageComponent component) |
protected void |
fireOpened(PageComponent component) |
protected void |
fireShown(PageComponent component) |
PageComponent |
getActiveComponent()
Returns the active
PageComponent , or null if none. |
PageComponent |
getPageComponent(String id) |
ToolView |
getToolView(String id) |
abstract ToolViewDescriptor |
getToolViewDescriptor(String id) |
ToolView[] |
getToolViews() |
protected abstract boolean |
giveFocusTo(PageComponent pageComponent)
This method must transfer the focus to the given
PageComponent . |
void |
hideToolView(ToolView toolView) |
DocView |
openDocView(Object editorInput) |
protected void |
pageComponentChanged(PropertyChangeEvent evt)
Called when the
PageComponent changes any of its properties (display
name, caption, icon, ...). |
void |
removePageComponentListener(PageComponentListener listener) |
protected abstract void |
setActiveComponent()
Set the active page component by determing it.
|
void |
setActiveComponent(PageComponent pageComponent)
Activates the given
PageComponent . |
ToolView |
showToolView(String id) |
ToolView |
showToolView(ToolViewDescriptor viewDescriptor) |
createControl, createControlIfNecessary, getControl, isControlCreated, isSingleton, setSingleton
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCommandManager, getSelectionManager, getWindow
getControl
public void addPageComponentListener(PageComponentListener listener)
addPageComponentListener
in interface PageComponentService
public void removePageComponentListener(PageComponentListener listener)
removePageComponentListener
in interface PageComponentService
public PageComponent getActiveComponent()
PageComponent
, or null
if none.getActiveComponent
in interface PageComponentService
PageComponent
public void 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).
Does nothing if this ApplicationPage
doesn't contain the given
PageComponent
.close
in interface ApplicationPage
pageComponent
- the PageComponent
public boolean close()
close
in interface ApplicationPage
true
if the operation was successfull, false
otherwise.public PageComponent getPageComponent(String id)
getPageComponent
in interface ApplicationPage
public ToolView[] getToolViews()
getToolViews
in interface ApplicationPage
public ToolView getToolView(String id)
getToolView
in interface ApplicationPage
public abstract ToolViewDescriptor getToolViewDescriptor(String id)
public ToolView addToolView(ToolViewDescriptor viewDescriptor)
addToolView
in interface ApplicationPage
public ToolView showToolView(String id)
showToolView
in interface ApplicationPage
public ToolView showToolView(ToolViewDescriptor viewDescriptor)
showToolView
in interface ApplicationPage
public void hideToolView(ToolView toolView)
hideToolView
in interface ApplicationPage
public DocView openDocView(Object editorInput)
openDocView
in interface ApplicationPage
public boolean closeAllDocViews()
closeAllDocViews
in interface ApplicationPage
protected ToolView createToolView(ToolViewDescriptor descriptor)
descriptor
- the descriptorprotected void pageComponentChanged(PropertyChangeEvent evt)
PageComponent
changes any of its properties (display
name, caption, icon, ...).
This method should be overridden when these changes must be reflected in the UI.evt
- protected void fireOpened(PageComponent component)
protected void fireClosed(PageComponent component)
protected void fireShown(PageComponent component)
protected void fireHidden(PageComponent component)
protected void fireFocusGained(PageComponent component)
protected void fireFocusLost(PageComponent component)
protected abstract void setActiveComponent()
JDesktopPane
, the active component
is determined by its active JInternalFrame
.public 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
.pageComponent
- the PageComponent
protected abstract void doAddToolView(ToolView toolView)
toolView
- the tool viewprotected abstract void doRemoveToolView(ToolView toolView)
toolView
- the tool viewprotected abstract void doShowToolView(ToolView toolView)
toolView
- the tool viewprotected abstract void doHideToolView(ToolView toolView)
toolView
- the tool viewprotected 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 abstract PageComponentPane createToolViewPane(ToolView toolView)
Copyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.