|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.as400.ui.framework.java.DeckPaneManager
public class DeckPaneManager extends Object implements PaneManager
Creates a subpanel containing a series of windows which are displayed one at a time. The subpanel acts as a stack or "deck" of windows. Each window consists of a panel defined using the Panel Definition Markup Language (PDML).
DeckPaneManager
does not implement the WindowManager interface, and thus
cannot be used to create a standalone window or dialog. It is designed
to be incorporated in the definition of an existing panel, property sheet
or wizard. Applications normally do not construct DeckPaneManagers
directly. Instead, a reference to the DeckPaneManager
for a particular subpanel is obtained by calling getDelegateManager
on the PaneManager for the containing panel.
DeckPaneManager performs the following processing on behalf
of the application:
PanelManager for each of the panels
specified in the PDML, and attaches them to the deck pane.
DataBean accessor methods
identified in the PDML.
EventHandlers
specified in the PDML with the appropriate UI components.
The total size of the deck pane is a function of the size of the largest panel.
PaneManager.getDelegateManager(java.lang.String),
PanelManager| Constructor and Description |
|---|
DeckPaneManager(String baseName,
Locale locale,
String deckPaneName)
Constructs a DeckPaneManager object for the specified deck pane,
and then serializes the deck pane definition. |
DeckPaneManager(String baseName,
Locale locale,
String deckPaneName,
DataBean[] dataBeans,
Container container)
Constructs a DeckPaneManager for the specified deck pane,
using the specified container. |
DeckPaneManager(String baseName,
String deckPaneName,
DataBean[] dataBeans,
Container container)
Constructs a DeckPaneManager for the specified deck pane,
using the specified container. |
| Modifier and Type | Method and Description |
|---|---|
void |
activatePanel()
Runs the activation handlers for the currently selected pane. |
void |
addPane(PanelManager pm,
int index)
Adds a page to the Deck Pane. |
void |
applyChanges()
Transmits changes to user data to the DataBeans
which manage the data. |
void |
commit(Vector committedDataBeans)
Commits the changes to data displayed on the pane. |
PaneManager |
getAggregateManager()
Returns the owning PaneManager for the receiver. |
Component |
getComponent(String componentName)
Returns the requested user interface component. |
com.ibm.as400.ui.framework.java.JavaComponentDescriptor |
getComponentDescriptor(String componentName)
Returns the JavaComponentDescriptor for the specified user interface component. |
PaneManager |
getDelegateManager(String paneName)
Returns the PaneManager to which the receiver is delegating
management of the specified subpane. |
DataFormatter |
getFormatter(String componentName)
Returns the data formatter associated with the specified user interface component. |
String[] |
getPaneNames()
Returns a list of the panes in the deck. |
Dimension |
getPreferredSize()
Gets the preferred size of this deck pane. |
PaneManager |
getRootManager()
Returns the root PaneManager for the receiver. |
String |
getTitle()
Returns the deck pane's title. |
void |
loadData()
Called during initialization to load data into the pane. |
static void |
main(String[] args)
Provides a command line interface to DeckPaneManager. |
void |
prepareToCommit(Vector preparedDataBeans)
Request the DataBeans which manage data for the
panel to verify that their data is in a consistent state. |
void |
removePane(int index)
Removes a page from the Deck Pane. |
void |
removePane(String name)
Removes a page from the this Deck Pane. |
void |
serialize()
Serializes the deck pane definition. |
void |
setAggregateManager(PaneManager mgr)
Sets the owning PaneManager for the receiver. |
void |
setFormatter(String componentName,
DataFormatter formatter,
boolean required)
Sets the data formatter associated with the specified user interface component. |
void |
setHelpPath(String path)
Base location for help files. |
void |
showPane(String paneName)
Displays the specified pane at the top of the deck. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeckPaneManager(String baseName,
String deckPaneName,
DataBean[] dataBeans,
Container container)
throws DisplayManagerException
DeckPaneManager for the specified deck pane,
using the specified container.
The default locale will be used to load the deck pane definition.
baseName - the resource name of the PDML document/resource bundle combination which defines the deck pane specificationpaneName - the name of the deck pane, as specified on the DECKPANE tag in the PDMLdataBeans - a list of DataBeans which supply data to the deck pane (may be null)container - the caller's containerDisplayManagerException - if an error was encountered accessing the deck pane definitionDisplayManagerException
public DeckPaneManager(String baseName,
Locale locale,
String deckPaneName,
DataBean[] dataBeans,
Container container)
throws DisplayManagerException
DeckPaneManager for the specified deck pane,
using the specified container.
baseName - the resource name of the PDML document/resource bundle combination which defines the deck pane specificationlocale - the desired locale to be used to load the deck pane definitiondeckpaneName - the name of the deck pane, as specified on the DECKPANE tag in the PDMLdataBeans - a list of DataBeans which supply data to the deck pane (may be null)container - the caller's containerDisplayManagerException - if an error was encountered accessing the deck pane definitionDisplayManagerException
public DeckPaneManager(String baseName,
Locale locale,
String deckPaneName)
throws DisplayManagerException
DeckPaneManager object for the specified deck pane,
and then serializes the deck pane definition.
This constructor cannot be used to display the deck pane.
If a null locale is specified, the default locale will be used to load the deck pane definition. If resources for the default locale cannot be found, an attempt will be made to use the base resources for the deck pane.
baseName - the resource name of the PDML document/resource bundle combination which define the deck pane specificationlocale - the desired locale to be used to load the deck pane definition (may be null)deckPaneName - the name of the deck pane, as specified on the DECKPANE tag in the PDMLDisplayManagerException - if an error was encountered accessing or serializing the deck pane definitionserialize()| Method Detail |
|---|
public static void main(String[] args)
DeckPaneManager. See the class description.
public void serialize()
throws IOException
<deck pane name>_<locale string>.pdml.serwhere
<deck pane name>
is the name of the deck pane as specified on the DECKPANE
tag in the PDML, and <locale string> consists of the ISO Language Code,
ISO country or region code, and optional variant codes, each delimited by an underscore ("_") character.
IOException - if serialized file cannot be writtenpublic Dimension getPreferredSize()
public String getTitle()
getTitle in interface PaneManagerPaneManagerpublic void loadData()
loadData in interface PaneManagerPaneManagerpublic void activatePanel()
activatePanel in interface PaneManagerPaneManagerpublic String[] getPaneNames()
public void showPane(String paneName)
showPane in interface PaneManagerpaneName - the name of the pane to be displayedPaneManagerpublic Component getComponent(String componentName)
<panel_name>.<component_name>
where panel_name is the name of the panel containing
the desired component, and component_name is the
name of the component, as defined in the PDML for the panel definition.
getComponent in interface PaneManagercomponentName - the fully-qualified name of the user interface componentComponent, or null if the component cannot be foundPaneManagerpublic com.ibm.as400.ui.framework.java.JavaComponentDescriptor getComponentDescriptor(String componentName)
JavaComponentDescriptor for the specified user interface component.
The name of the component must be of the form
<panel_name>.<component_name>
where panel_name is the name of the panel containing
the desired component, and component_name is the
name of the component, as defined in the PDML for the panel definition.
getComponentDescriptor in interface PaneManagercomponentName - the fully-qualified name of the user interface componentJavaComponentDescriptor, or null if the descriptor cannot be foundPaneManagerpublic PaneManager getDelegateManager(String paneName)
PaneManager to which the receiver is delegating
management of the specified subpane.
getDelegateManager in interface PaneManagerpaneName - the name of the pane as specified in the PDML definitionPaneManager, or null if the object cannot be foundPaneManagerpublic void setAggregateManager(PaneManager mgr)
PaneManager for the receiver.
The specified object identifies the PaneManager
to which certain requests should be delegated when this DeckPaneManager
is participating in an aggregate user interface.
setAggregateManager in interface PaneManagermgr - the PaneManager with which the receiver is to be associatedPaneManagerpublic PaneManager getAggregateManager()
PaneManager for the receiver.
getAggregateManager in interface PaneManagerPaneManager with which the receiver is associated
when this object is participating in an aggregate user interface, or null
if this PaneManager is not part of an aggregate.PaneManagerpublic PaneManager getRootManager()
PaneManager for the receiver.
getRootManager in interface PaneManagerPaneManager for the main panel that is
managing the aggregate user interface, or null if this PaneManager
is not part of an aggregate.PaneManager
public void applyChanges()
throws IllegalUserDataException
DataBeans
which manage the data.
Calls the settor methods for all UI components that have
accessor methods associated with them.
This method is called when the pane is about to be closed.
applyChanges in interface PaneManagerIllegalUserDataExceptionPaneManagerpublic void prepareToCommit(Vector preparedDataBeans)
DataBeans which manage data for the
panel to verify that their data is in a consistent state.
Calls the verifyChanges method for all DataBeans
associated with the pane.
This method is called when the pane is about to be closed.
prepareToCommit in interface PaneManagerpreparedDataBeans - a list of DataBeans which have already
been prepared on the current commit operationPaneManagerpublic void commit(Vector committedDataBeans)
commit method on all DataBeans
which manage data for the pane.
This method is called when the user indicates a desire to permanently save changes to the data, by clicking an OK button for example.
commit in interface PaneManagercommittedDataBeans - a list of DataBeans which have already
been saved on the current commit operationPaneManager
public void setFormatter(String componentName,
DataFormatter formatter,
boolean required)
<panel_name>.<component_name>
where panel_name is the name of the panel containing
the desired component, and component_name is the
name of the component, as defined in the PDML for the panel definition.
setFormatter in interface PaneManagercomponentName - the fully-qualified name of the user interface componentformatter - a reference to the data formatter to be associated with the componentrequired - whether a value is required to be enteredDataFormatterpublic DataFormatter getFormatter(String componentName)
<panel_name>.<component_name>
where panel_name is the name of the panel containing
the desired component, and component_name is the
name of the component, as defined in the PDML for the panel definition.
getFormatter in interface PaneManagercomponentName - the fully-qualified name of the user interface componentDataFormatter, or null if the component cannot be foundDataFormatterpublic void setHelpPath(String path)
PaneManagersetHelpPath("http://www.ibm.com/help/") will
cause the PanelManager to load http://www.ibm.com/help/MyPanel.html as
the help file.
setHelpPath in interface PaneManager
public void addPane(PanelManager pm,
int index)
pm - the PanelManager for the new panelindex - the position at which the new page will be insertedArrayIndexOutOfBoundsException - if the value of the specified index
exceeds the current page countpublic void removePane(String name)
name - the name of the page as specified in the PDMLpublic void removePane(int index)
index - the index of the page to be removedArrayIndexOutOfBoundsException - if the value of the specified index
exceeds the current page count minus 1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||