ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakx_5.4.0.1/rzakxexpropmngr.htm

163 lines
4.7 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2005" />
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Example: Java Properties Manager" />
<meta name="abstract" content="This is what a Java Properties Manager code might look like" />
<meta name="description" content="This is what a Java Properties Manager code might look like" />
<meta name="DC.Relation" scheme="URI" content="rzakxjavaproperty.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakxjavaproperty.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakxexpropmngr" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Example: Java Properties Manager</title>
</head>
<body id="rzakxexpropmngr"><a name="rzakxexpropmngr"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: Java Properties Manager</h1>
<div><p>This is what a Java Properties Manager code might look like</p>
<pre>package com.ibm.as400.opnav.Sample;
import com.ibm.as400.opnav.*;
import java.awt.Frame;
import com.ibm.as400.ui.framework.java.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class SamplePropertiesManager implements
PropertiesManager
{
// The list of selected objects.
ObjectName[] m_objectNames;
// Save the array of selected object names
//
public void initialize(ObjectName[] objectNames)
{
m_objectNames = objectNames;
}
// Return an array of Panel Managers
//
public PanelManager[] getPages()
{
// Instantiate the data beans
MyDataBean dataBean = new MyDataBean();
dataBean.load();
AnotherDataBean dataBean2 = new AnotherDataBean();
dataBean2.load();
DataBean[] dataBeans = { dataBean };
DataBean[] dataBeans2 = { dataBean2 };
// Create the panel
PanelManager pm = null;
PanelManager pm2 = null; try
{
pm = new PanelManager("com.ibm.as400.opnav.Sample.Sample",
"PAGE1",
dataBeans);
pm2 = new PanelManager("com.ibm.as400.opnav.Sample.Sample",
"PAGE2",
dataBeans2);
}
catch (com.ibm.as400.ui.framework.java.DisplayManagerException
e)
{
Monitor.logError("SamplePropertiesManager: Exception when
creating pages "+e);
}
pm.setTitle("First Java Page");
pm2.setTitle("Second Java Page");
PanelManager[] PMArray = {pm, pm2};
return PMArray;
}
// Return a list of ActionListener objects to be notified when
commit is processed
public ActionListener[] getCommitListeners()
{
ActionListener[] al = new ActionListener[1];
al[0] = new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
Monitor.logError("SamplePropertiesManager: Processing Commit
Listener");
}
};
return al;
}
// Return a list of ActionListener objects to be notified when
cancel is selected
public ActionListener[] getCancelListeners()
{
ActionListener[] al = new ActionListener[1];
al[0] = new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
Monitor.logError("SamplePropertiesManager: Processing Cancel
Listener");
}
};
return al;
}
}</pre>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakxjavaproperty.htm" title="Add property pages to property sheets of Java plug-ins. This allows you to build object names, display properties, share objects with third parties, and mix C++ and Java code in the same plug-in.">Property sheet handling in Java</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzakxjavaproperty.htm" title="Add property pages to property sheets of Java plug-ins. This allows you to build object names, display properties, share objects with third parties, and mix C++ and Java code in the same plug-in.">Property sheet handling in Java</a></div>
</div>
</div>
</body>
</html>