All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.ibm.as400.ui.framework.java.PropertySheetManager
PropertySheetManager
performs the following processing on behalf
of the application:
PanelManager
for each property sheet panel
specified in the PDML, and attaches the panels to the property sheet.
DataBean
accessor methods
identified in the PDML.
EventHandler
s
specified in the PDML with the appropriate UI components.
The total size of the property sheet is a function of the size of the largest panel.
To locate a property sheet definition, PropertySheetManager
needs three pieces of information:
PROPERTYSHEET
tag in the PDML.
The framework first searches the specified location for a file with a name matching
the property sheet name, and an extension of .pdml.ser
. If the serialized
property sheet definition is not found, an attempt will be made to load a ResourceBundle
and a PDML file which correspond to the specified resource name. If the resources cannot
be located a DisplayManagerException
will be thrown.
MyPropertySheet
is defined in the file TestPanels.pdml
,
and that a properties file TestPanels.properties
is associated with the property sheet
definition. Both files reside in the directory com/ourCompany/ourPackage
,
which is accessible from a directory defined in the classpath, or from a ZIP or JAR file
defined in the classpath. The following code creates the property sheet and displays it:
import com.ibm.as400.ui.framework.java.*; // Create the property sheet manager. Parameters: // 1. Resource name of the property sheet definition // 2. Name of property sheet // 3. List of DataBeans omitted PropertySheetManager psm = null; try { psm = new PropertySheetManager("com.ourCompany.ourPackage.TestPanels", "MyPropertySheet", null); } catch (DisplayManagerException e) { e.displayUserMessage(null); System.exit(-1); } // Display the property sheet psm.setVisible(true);Once the
DataBean
s that supply data to the property sheet have been
implemented and the attributes have been identified in the PDML,
the following code may be used to construct a fully-functioning property sheet:
import com.ibm.as400.ui.framework.java.*; import java.awt.Frame; // Instantiate the objects which supply data to the property sheet TestDataBean1 db1 = new TestDataBean1(); TestDataBean2 db2 = new TestDataBean2(); // Initialize the objects db1.load(); db2.load(); // Set up to pass the objects to the UI framework DataBean[] dataBeans = { db1, db2 }; // Create the property sheet manager. Parameters: // 1. Resource name of the property sheet definition // 2. Name of property sheet // 3. List of DataBeans // 4. Owner frame window Frame owner; ... PropertySheetManager psm = null; try { psm = new PropertySheetManager("com.ourCompany.ourPackage.TestPanels", "MyPropertySheet", dataBeans, owner); } catch (DisplayManagerException e) { e.displayUserMessage(null); System.exit(-1); } // Display the property sheet psm.setVisible(true);
java com.ibm.as400.ui.framework.java.PropertySheetManager [-serialize] [-locale <language code>_<country code>_<variant>] <resource name> <property sheet name>Options:
.pdml.ser
.
If this option is specified the property sheet will not be displayed on the screen.
PROPERTYSHEET
tag in the PDML document.
Examples:
java com.ibm.as400.ui.framework.java.PropertySheetManager com.ourCompany.ourPackage.TestPanels MyPropertySheet
java com.ibm.as400.ui.framework.java.PropertySheetManager -serialize com.ourCompany.ourPackage.TestPanels MyPropertySheet
java com.ibm.as400.ui.framework.java.PropertySheetManager -locale en_UK com.ourCompany.ourPackage.TestPanels MyPropertySheet
java com.ibm.as400.ui.framework.java.PropertySheetManager -serialize -locale en_UK com.ourCompany.ourPackage.TestPanels MyPropertySheet
PropertySheetManager
object for the specified property sheet,
and then serializes the property sheet definition.
PropertySheetManager
object for the specified property sheet.
PropertySheetManager
object for the specified property sheet.
PropertySheetManager
for the specified property sheet,
using the specified container.
PropertySheetManager
for the specified property sheet,
using the specified container.
PropertySheetManager
object for the specified property sheet.
PropertySheetManager
object for the specified property sheet.
PropertySheetManager
object for the specified property sheet.
PropertySheetManager
object for the specified property sheet.
PropertySheetManager
for the specified property sheet,
using the specified container.
PropertySheetManager
for the specified property sheet,
using the specified container.
PropertySheetManager
object for the specified property sheet.
PropertySheetManager
object for the specified property sheet.
ActionListener
which is notified when
the user cancels out of a window.
ActionListener
which is notified when
commit processing is complete.
DataBean
s
which manage the data.
PaneManager
for the receiver.
JavaComponentDescriptor
for the specified user interface component.
PaneManager
to which the receiver is delegating
management of the specified subpane.
WindowManager
in relation to which
the receiver has been set modal, or null if the receiver is not
modal relative to another window.
PanelManager
for the specified property page.
PanelManager
for the specified property page.
PaneManager
for the receiver.
PropertySheetManager
.
DataBean
s which manage data for the
panel to verify that their data is in a consistent state.
PaneManager
for the receiver.
exit
.
WindowManager
.
show
.
public static final int OK_BUTTON
public static final int CANCEL_BUTTON
public static final int HELP_BUTTON
public PropertySheetManager(String baseName, String propertySheetName, DataBean dataBeans[]) throws DisplayManagerException
PropertySheetManager
object for the specified property sheet.
The property sheet will be modeless.
The default locale will be used to load the property sheet definition.
PROPERTYSHEET
tag in the PDML document
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, String propertySheetName, DataBean dataBeans[], boolean resize) throws DisplayManagerException
PropertySheetManager
object for the specified property sheet.
The property sheet will be modeless.
The default locale will be used to load the property sheet definition.
PROPERTYSHEET
tag in the PDML document
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, Locale locale, String propertySheetName, DataBean dataBeans[]) throws DisplayManagerException
PropertySheetManager
object for the specified property sheet.
The property sheet will be modeless.
PROPERTYSHEET
tag in the PDML document
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, Locale locale, String propertySheetName, DataBean dataBeans[], boolean resize) throws DisplayManagerException
PropertySheetManager
object for the specified property sheet.
The property sheet will be modeless.
PROPERTYSHEET
tag in the PDML document
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, String propertySheetName, DataBean dataBeans[], Frame owner) throws DisplayManagerException
PropertySheetManager
object for the specified property sheet.
The property sheet will be modal, with the specified Frame
as its owner.
The application will block on the call to setVisible
until
the property sheet has closed.
The default locale will be used to load the panel definition.
PROPERTYSHEET
tag in the PDML document
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, String propertySheetName, DataBean dataBeans[], Frame owner, boolean resize) throws DisplayManagerException
PropertySheetManager
object for the specified property sheet.
The property sheet will be modal, with the specified Frame
as its owner.
The application will block on the call to setVisible
until
the property sheet has closed.
The default locale will be used to load the panel definition.
PROPERTYSHEET
tag in the PDML document
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, Locale locale, String propertySheetName, DataBean dataBeans[], Frame owner) throws DisplayManagerException
PropertySheetManager
object for the specified property sheet.
The property sheet will be modal, with the specified Frame
as its owner.
The application will block on the call to setVisible
until
the property sheet has closed.
PROPERTYSHEET
tag in the PDML
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, Locale locale, String propertySheetName, DataBean dataBeans[], Frame owner, boolean resize) throws DisplayManagerException
PropertySheetManager
object for the specified property sheet.
The property sheet will be modal, with the specified Frame
as its owner.
The application will block on the call to setVisible
until
the property sheet has closed.
PROPERTYSHEET
tag in the PDML
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, String propertySheetName, DataBean dataBeans[], Container container) throws DisplayManagerException
PropertySheetManager
for the specified property sheet,
using the specified container.
This constructor allows the application to supply its own container, rather than
relying on this object to create a container of the appropriate type.
The default locale will be used to load the property sheet definition.
PROPERTYSHEET
tag in the PDML
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, String propertySheetName, DataBean dataBeans[], Container container, boolean resize) throws DisplayManagerException
PropertySheetManager
for the specified property sheet,
using the specified container.
This constructor allows the application to supply its own container, rather than
relying on this object to create a container of the appropriate type.
The default locale will be used to load the property sheet definition.
PROPERTYSHEET
tag in the PDML
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, Locale locale, String propertySheetName, DataBean dataBeans[], Container container) throws DisplayManagerException
PropertySheetManager
for the specified property sheet,
using the specified container.
This constructor allows the application to supply its own container, rather than
relying on this object to create a container of the appropriate type.
PROPERTYSHEET
tag in the PDML
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, Locale locale, String propertySheetName, DataBean dataBeans[], Container container, boolean resize) throws DisplayManagerException
PropertySheetManager
for the specified property sheet,
using the specified container.
This constructor allows the application to supply its own container, rather than
relying on this object to create a container of the appropriate type.
PROPERTYSHEET
tag in the PDML
DataBean
s which supply data to the property sheet (may be null)
public PropertySheetManager(String baseName, Locale locale, String propertySheetName) throws DisplayManagerException
PropertySheetManager
object for the specified property sheet,
and then serializes the property sheet definition.
This constructor cannot be used to display the property sheet.
If a null locale is specified, the default locale will be used to load the property sheet definition. If resources for the default locale cannot be found, an attempt will be made to use the base resources for the property sheet.
PROPERTYSHEET
tag in the PDML
public static void main(String args[])
PropertySheetManager
. See the class description.
public void serialize() throws IOException
<property sheet name>_<locale string>.pdml.serwhere
<property sheet name>
is the name of the property sheet as specified on the PROPERTYSHEET
tag in the PDML, and <locale string>
consists of the ISO Language Code,
ISO Country Code, and optional variant codes, each delimited by an underscore ("_") character.
public JTabbedPane getTabbedPane()
public PanelManager getPage(int index)
PanelManager
for the specified property page.
PanelManager
instance for the page
public PanelManager getPage(String name)
PanelManager
for the specified property page.
PanelManager
instance for the page, or null
if the specified page is not found
public void showPage(int index)
public void setExitOnClose(boolean exit)
exit
.
The default value is false
.
This method should be called before the property sheet is made visible.
public boolean getExitOnClose()
public void setTitle(String title)
This method has no effect if the application supplied the container to be managed.
public void setHelpPath(String path)
public void setVisible(boolean show)
show
.
If an owner frame was specified on the constructor indicating that the property sheet
is modal, the application will block on the call to setVisible
until the property sheet has closed.
public boolean isVisible()
public Dimension getPreferredSize()
public String getTitle()
Returns null if the application supplied the container to be managed.
public void loadData()
PropertySheetManager
doesn't participate in aggregates.
public void activatePanel()
PropertySheetManager
isn't managed as a subpanel.
public void showPane(String paneName)
PropertySheetManager
isn't managed as a subpanel.
public 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.
Component
, or null
if the component cannot be found
public 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.
JavaComponentDescriptor
, or null
if the descriptor cannot be found
public PaneManager getDelegateManager(String paneName)
PaneManager
to which the receiver is delegating
management of the specified subpane.
PaneManager
, or null
if the object cannot be found
public void setAggregateManager(PaneManager mgr)
PaneManager
for the receiver.
This method has no implementation, since PropertySheetManager
doesn't participate in aggregates.
public PaneManager getAggregateManager()
PaneManager
for the receiver.
PaneManager
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.
public PaneManager getRootManager()
PaneManager
for the receiver.
PaneManager
for the main panel that is
managing the aggregate user interface, or null if this PaneManager
is not part of an aggregate.
public void applyChanges()
DataBean
s
which manage the data.
This method has no implementation, since PropertySheetManager
doesn't participate in aggregates.
public void prepareToCommit(Vector preparedDataBeans)
DataBean
s which manage data for the
panel to verify that their data is in a consistent state.
This method has no implementation, since PropertySheetManager
doesn't participate in aggregates.
public void commit(Vector committedDataBeans)
PropertySheetManager
doesn't participate in aggregates.
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.
public 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.
DataFormatter
, or null
if the component cannot be found
public Window getWindow()
public void setModalRelativeTo(WindowManager mgr)
WindowManager
.
If the panel is not currently showing, the panel for this
PropertySheetManager
is centered on the screen.
This method has no effect if it is called after this property sheet is made visible.
WindowManager
managing the panel
in relation to which this object's panel location is determined
public WindowManager getOwnerManager()
WindowManager
in relation to which
the receiver has been set modal, or null if the receiver is not
modal relative to another window.
WindowManager
managing the window
in relation to which this object's window location is determined
public void addCommitListener(ActionListener listener)
ActionListener
which is notified when
commit processing is complete.
This facility is provided for modeless windows, so that the
application may learn when the window has closed.
The listener's actionPerformed
method will be called following
successful completion of commit processing on the property sheet.
The ActionEvent
passed to the listener object will
have its action command string set to "COMMIT".
This method is not recommended for modal windows, since the
application will be blocked on the setVisible
call until the window is closed.
ActionListener
to be notified
public void addCancelListener(ActionListener listener)
ActionListener
which is notified when
the user cancels out of a window.
This facility is provided for modeless windows, so that the
application may learn when the window has closed.
The listener's actionPerformed
method will be called when
the user cancels out of the property sheet without committing any changes.
The ActionEvent
passed to the listener object will
have its action command string set to "CANCEL".
This method is not recommended for modal windows, since the
application will be blocked on the setVisible
call until the window is closed.
ActionListener
to be notified
public void addPage(PanelManager pm, int index)
PanelManager
for the new panel
public void removePage(String name)
public void removePage(int index)
public void addButtons(int flags)
public void removeButtons(int flags)
public void enableButtons(int flags)
public void disableButtons(int flags)
All Packages Class Hierarchy This Package Previous Next Index