|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.jaspira.plugin.AbstractPlugin
org.openbp.jaspira.gui.plugin.AbstractVisiblePlugin
org.openbp.jaspira.gui.plugin.JaspiraPage
public abstract class JaspiraPage
A page in a application.
A page will be displayed in a JaspiraPageContainer which may contain one or more pages.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.openbp.jaspira.gui.plugin.AbstractVisiblePlugin |
|---|
AbstractVisiblePlugin.StandardVisiblePluginEvents |
| Nested classes/interfaces inherited from class org.openbp.jaspira.plugin.AbstractPlugin |
|---|
AbstractPlugin.StandardPluginEvents |
| Field Summary | |
|---|---|
protected java.lang.ref.WeakReference |
focusedPluginRef
Used to store the plugin that had the focus last (for setFocusedPlugin(org.openbp.jaspira.gui.plugin.VisiblePlugin)/restoreFocus()). |
| Fields inherited from class org.openbp.jaspira.plugin.AbstractPlugin |
|---|
PROPERTY_CONDITION, PROPERTY_DESCRIPTION, PROPERTY_ICON, PROPERTY_NAME, PROPERTY_SEQUENCE, PROPERTY_TITLE, PROPERTY_VENDOR, PROPERTY_VERSION |
| Fields inherited from interface org.openbp.jaspira.gui.plugin.PluginContainer |
|---|
CENTER, EAST, NORTH, REGION_CENTER, REGION_EAST, REGION_NORTH, REGION_SOUTH, REGION_WEST, SOUTH, WEST |
| Fields inherited from interface org.openbp.jaspira.gui.plugin.VisiblePlugin |
|---|
GER, GEU, SIZE_VARIABLE_BOTH, SIZE_VARIABLE_HEIGHT, SIZE_VARIABLE_NONE, SIZE_VARIABLE_WIDTH, TOOLBAR_DYNAMIC, TOOLBAR_EVENTS, TOOLBAR_NONE |
| Fields inherited from interface org.openbp.jaspira.plugin.Plugin |
|---|
ID_DELIMETER, LEVEL_APPLICATION, LEVEL_FRAME, LEVEL_PAGE, LEVEL_PLUGIN |
| Constructor Summary | |
|---|---|
JaspiraPage()
Creates a new Jaspira page. |
|
| Method Summary | |
|---|---|
void |
addPlugin(VisiblePlugin p)
Adds a plugin to the container. |
void |
advanceFocus(boolean forward,
boolean visibleOnly)
Advances the focus of this page. |
VisiblePlugin |
getActivePlugin()
Returns the currently active plugin inside this container. |
PluginContainer |
getParentContainer()
A page has no plugin container, so this returns null. |
PluginDivider |
getPluginDivider()
Returns the divider of the page. |
java.awt.Component |
getPluginFocusComponent()
Returns the focus component of this plugin, i\.e\. the component that is to initially receive the focus. |
java.util.List |
getPlugins()
Returns all plugins hosted by this container and its sub containers. |
java.util.List |
getVisiblePlugins()
Returns all plugins that are currently visible, i\.e\. shown in their tabbed containers. |
java.awt.Window |
getWindow()
Returns the JaspiraPageContainer of this page or null. |
protected void |
initializeComponents()
This template method is called after internal Components (i\.e\. title bar etc\.) |
void |
layoutDefaultContent()
This method will be called to generate the default layout of a Jaspira page. |
protected void |
pluginUninstalled()
This template method is called before the plugin is uninstalled. |
void |
removePlugin(VisiblePlugin p)
Removes a plugin from this container. |
void |
restoreFocus()
Restores the focus of this page. |
void |
setFocusedPlugin(VisiblePlugin plugin)
Stores the given plugin as last focused component of this page. |
void |
setPluginDivider(PluginDivider divider)
Set the divider of the page. |
protected void |
setupKeyBindings()
Sets up the key bindings of the page. |
void |
showPlugin(boolean changePage)
Brings the plugin to the front, but does not request the focus. |
void |
sliceContainer(PluginContainer toInsert,
PluginContainer currentContainer,
java.lang.String constraint)
Slices the component at the given edge, i\.e\. replaces the entry with a new PluginDivider consisting of the old component and the new container. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openbp.jaspira.gui.plugin.PluginContainer |
|---|
getPage |
| Methods inherited from interface org.openbp.jaspira.plugin.Plugin |
|---|
addPlugin, addToPeerGroup, canClose, containsStackedEvent, fireEvent, fireEvent, fireEvent, getAction, getChildPlugins, getClassName, getCondition, getDescendantPlugins, getDescription, getEventActionNames, getIcon, getLevel, getName, getParentPlugin, getPeerGroup, getPeerGroupNames, getPeerGroups, getPluginResourceCollection, getPluginState, getSubTitle, getTitle, getUniqueId, getVendor, getVersion, handleEvent, inheritEvent, initializePlugin, installFirstPlugin, matchesPeerGroup, matchesPeerGroups, receiveEvent, removeFromPeerGroup, removePlugin, requestClose, setParentPlugin, setPluginState, uninstallLastPlugin |
| Field Detail |
|---|
protected java.lang.ref.WeakReference focusedPluginRef
setFocusedPlugin(org.openbp.jaspira.gui.plugin.VisiblePlugin)/restoreFocus()).
This is a temporary variable only, so we use weak references here in order to prevent memory leaks.
| Constructor Detail |
|---|
public JaspiraPage()
| Method Detail |
|---|
public java.lang.String toString()
toString in class AbstractPluginprotected void initializeComponents()
AbstractVisiblePlugin
initializeComponents in class AbstractVisiblePluginprotected void pluginUninstalled()
AbstractPlugin
pluginUninstalled in class AbstractPluginpublic void layoutDefaultContent()
public void setPluginDivider(PluginDivider divider)
divider - Divider to setpublic PluginDivider getPluginDivider()
public java.awt.Window getWindow()
public void addPlugin(VisiblePlugin p)
PluginContainer
addPlugin in interface PluginContainerp - Plugin to addpublic void removePlugin(VisiblePlugin p)
PluginContainer
removePlugin in interface PluginContainerp - Plugin to removepublic java.util.List getPlugins()
PluginContainer
getPlugins in interface PluginContainerVisiblePlugin objects or nullpublic java.util.List getVisiblePlugins()
PluginContainer
getVisiblePlugins in interface PluginContainerVisiblePlugin objects or nullpublic VisiblePlugin getActivePlugin()
PluginContainer
getActivePlugin in interface PluginContainerpublic PluginContainer getParentContainer()
getParentContainer in interface PluginContainerpublic void showPlugin(boolean changePage)
AbstractVisiblePlugin
showPlugin in interface VisiblePluginshowPlugin in class AbstractVisiblePluginchangePage - true Shows the JaspiraPage this holder belongs to if it not the active page.
public void sliceContainer(PluginContainer toInsert,
PluginContainer currentContainer,
java.lang.String constraint)
PluginContainerPluginDivider consisting of the old component and the new container.
sliceContainer in interface PluginContainertoInsert - Containert to insertcurrentContainer - Currrent container that shall be replacedconstraint - The constraint determines where to place the new container:PluginContainer.CENTER/PluginContainer.NORTH/PluginContainer.SOUTH/PluginContainer.EAST/PluginContainer.WESTpublic java.awt.Component getPluginFocusComponent()
getPluginFocusComponent in interface VisiblePlugingetPluginFocusComponent in class AbstractVisiblePluginpublic void setFocusedPlugin(VisiblePlugin plugin)
plugin - The focused pluginpublic void restoreFocus()
public void advanceFocus(boolean forward,
boolean visibleOnly)
forward - true Moves the focus to the next plugin.visibleOnly - true Considers currently visible plugins only.protected void setupKeyBindings()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||