ejtools-cvs Mailing List for EJTools (Page 5)
Brought to you by:
letiemble
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(471) |
May
(303) |
Jun
(176) |
Jul
(67) |
Aug
(64) |
Sep
(84) |
Oct
(148) |
Nov
(57) |
Dec
(272) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(356) |
Feb
(304) |
Mar
(214) |
Apr
(22) |
May
(7) |
Jun
(25) |
Jul
|
Aug
(5) |
Sep
(106) |
Oct
|
Nov
(95) |
Dec
(193) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
(2) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: <let...@us...> - 2003-12-14 09:49:31
|
Update of /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/ui In directory sc8-pr-cvs1:/tmp/cvs-serv21061/management.browser/src/main/org/ejtools/management/browser/ui Modified Files: ManagedObjectViewer.java Log Message: Add more javadocs. Adjust workspace persistence. Index: ManagedObjectViewer.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/ui/ManagedObjectViewer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ManagedObjectViewer.java 27 Nov 2003 01:39:48 -0000 1.5 --- ManagedObjectViewer.java 13 Dec 2003 22:31:57 -0000 1.6 *************** *** 1,75 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.ui; ! ! import java.awt.GridBagLayout; ! import java.beans.Customizer; ! import java.util.ResourceBundle; ! ! import javax.management.MBeanAttributeInfo; ! import javax.swing.BorderFactory; ! import javax.swing.JPanel; ! import javax.swing.JScrollPane; ! ! import org.ejtools.management.browser.model.ManagedObject; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @version $Revision$ ! */ ! public abstract class ManagedObjectViewer extends JScrollPane implements Customizer ! { ! /** Description of the Field */ ! protected ManagedObject object = null; ! /** Description of the Field */ ! protected JPanel panel = null; ! /** Description of the Field */ ! protected static String MO_ATTRIBUTE_EVENTPROVIDER = "eventprovider"; ! /** Description of the Field */ ! protected static String MO_ATTRIBUTE_EVENTTYPES = "eventtypes"; ! /** Description of the Field */ ! protected static String MO_ATTRIBUTE_STATEMANAGEABLE = "statemanageable"; ! /** Description of the Field */ ! protected static String MO_ATTRIBUTE_STATISTICSPROVIDER = "statisticsprovider"; ! /** Description of the Field */ ! protected static String MO_ATTRIBUTE_STATS = "stats"; ! /** Description of the Field */ ! protected static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /**Constructor for the ManagedObjectViewer object */ ! public ManagedObjectViewer() ! { ! super(new JPanel()); ! this.setBorder(BorderFactory.createEmptyBorder()); ! this.panel = (JPanel) getViewport().getView(); ! this.panel.setLayout(new GridBagLayout()); ! } ! ! ! /** ! *Constructor for the ManagedObjectViewer object ! * ! * @param bean Description of the Parameter ! */ ! public ManagedObjectViewer(Object bean) ! { ! this(); ! this.setObject(bean); ! } ! ! ! /** ! * Description of the Method ! * ! * @param infos Description of the Parameter ! * @return Description of the Return Value ! */ ! public abstract MBeanAttributeInfo[] filter(MBeanAttributeInfo[] infos); ! } --- 1,75 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.ui; ! ! import java.awt.GridBagLayout; ! import java.beans.Customizer; ! import java.util.ResourceBundle; ! ! import javax.management.MBeanAttributeInfo; ! import javax.swing.BorderFactory; ! import javax.swing.JPanel; ! import javax.swing.JScrollPane; ! ! import org.ejtools.management.browser.model.ManagedObject; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @version $Revision$ ! */ ! public abstract class ManagedObjectViewer extends JScrollPane implements Customizer ! { ! /** Description of the Field */ ! protected ManagedObject object = null; ! /** Description of the Field */ ! protected JPanel panel = null; ! /** Description of the Field */ ! protected static String MO_ATTRIBUTE_EVENTPROVIDER = "eventprovider"; ! /** Description of the Field */ ! protected static String MO_ATTRIBUTE_EVENTTYPES = "eventtypes"; ! /** Description of the Field */ ! protected static String MO_ATTRIBUTE_STATEMANAGEABLE = "statemanageable"; ! /** Description of the Field */ ! protected static String MO_ATTRIBUTE_STATISTICSPROVIDER = "statisticsprovider"; ! /** Description of the Field */ ! protected static String MO_ATTRIBUTE_STATS = "stats"; ! /** Description of the Field */ ! protected static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.management.browser.Resources"); ! ! ! /**Constructor for the ManagedObjectViewer object */ ! public ManagedObjectViewer() ! { ! super(new JPanel()); ! this.setBorder(BorderFactory.createEmptyBorder()); ! this.panel = (JPanel) getViewport().getView(); ! this.panel.setLayout(new GridBagLayout()); ! } ! ! ! /** ! *Constructor for the ManagedObjectViewer object ! * ! * @param bean Description of the Parameter ! */ ! public ManagedObjectViewer(Object bean) ! { ! this(); ! this.setObject(bean); ! } ! ! ! /** ! * Description of the Method ! * ! * @param infos Description of the Parameter ! * @return Description of the Return Value ! */ ! public abstract MBeanAttributeInfo[] filter(MBeanAttributeInfo[] infos); ! } |
From: <let...@us...> - 2003-12-14 09:49:31
|
Update of /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/state/rules In directory sc8-pr-cvs1:/tmp/cvs-serv21061/management.browser/src/main/org/ejtools/management/browser/state/rules Modified Files: GraphInternalFrameRule.java ManagedObjectRule.java ManagementGraphRule.java ServerInternalFrameRule.java ServerRule.java Log Message: Add more javadocs. Adjust workspace persistence. Index: GraphInternalFrameRule.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/state/rules/GraphInternalFrameRule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GraphInternalFrameRule.java 27 Nov 2003 01:39:48 -0000 1.1 --- GraphInternalFrameRule.java 13 Dec 2003 22:31:57 -0000 1.2 *************** *** 1,48 **** ! /* ! * Created on 20 juin 2003 ! * ! * To change this generated comment go to ! * Window>Preferences>Java>Code Generation>Code Template ! */ ! package org.ejtools.management.browser.state.rules; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Map; ! ! import org.ejtools.graph.frame.GraphInternalFrame; ! import org.ejtools.util.state.DefaultRule; ! import org.xml.sax.Attributes; ! ! /** ! * @author letiemble ! * @created 20 juin 2003 ! * @version $Revision$ ! */ ! public class GraphInternalFrameRule extends DefaultRule ! { ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! */ ! public void loadEnter(Map context) ! { ! BeanContextServices container = (BeanContextServices) context.get("CONTAINER"); ! ! GraphInternalFrame frame = new GraphInternalFrame(); ! Attributes attrs = (Attributes) context.get("ATTRIBUTES"); ! ! String name = attrs.getValue("name"); ! frame.setName(name); ! ! String delay = attrs.getValue("delay"); ! frame.setName(name); ! frame.setDelay(Long.parseLong(delay)); ! ! String scale = attrs.getValue("scale"); ! frame.setName(name); ! frame.setScale(Double.parseDouble(scale)); ! ! container.add(frame); ! } ! } --- 1,48 ---- ! /* ! * Created on 20 juin 2003 ! * ! * To change this generated comment go to ! * Window>Preferences>Java>Code Generation>Code Template ! */ ! package org.ejtools.management.browser.state.rules; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Map; ! ! import org.ejtools.graph.frame.GraphInternalFrame; ! import org.ejtools.util.state.DefaultRule; ! import org.xml.sax.Attributes; ! ! /** ! * @author letiemble ! * @created 20 juin 2003 ! * @version $Revision$ ! */ ! public class GraphInternalFrameRule extends DefaultRule ! { ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! */ ! public void loadEnter(Map context) ! { ! BeanContextServices container = (BeanContextServices) context.get("CONTAINER"); ! ! GraphInternalFrame frame = new GraphInternalFrame(); ! Attributes attrs = (Attributes) context.get("ATTRIBUTES"); ! ! String name = attrs.getValue("name"); ! frame.setName(name); ! ! String delay = attrs.getValue("delay"); ! frame.setName(name); ! frame.setDelay(Long.parseLong(delay)); ! ! String scale = attrs.getValue("scale"); ! frame.setName(name); ! frame.setScale(Double.parseDouble(scale)); ! ! container.add(frame); ! } ! } Index: ManagedObjectRule.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/state/rules/ManagedObjectRule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ManagedObjectRule.java 27 Nov 2003 01:39:48 -0000 1.1 --- ManagedObjectRule.java 13 Dec 2003 22:31:57 -0000 1.2 *************** *** 1,53 **** ! /* ! * Created on 20 juin 2003 ! * ! * To change this generated comment go to ! * Window>Preferences>Java>Code Generation>Code Template ! */ ! package org.ejtools.management.browser.state.rules; ! ! import java.util.Map; ! ! import org.ejtools.management.browser.frame.ServerInternalFrame; ! import org.ejtools.management.browser.model.ManagedObject; ! import org.ejtools.util.state.DefaultRule; ! import org.xml.sax.Attributes; ! ! /** ! * @author letiemble ! * @created 20 juin 2003 ! * @version $Revision$ ! */ ! public class ManagedObjectRule extends DefaultRule ! { ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! */ ! public void loadEnter(Map context) ! { ! ServerInternalFrame frame = (ServerInternalFrame) context.get("FRAME"); ! Attributes attrs = (Attributes) context.get("ATTRIBUTES"); ! ! String objectName = attrs.getValue("objectName"); ! ManagedObject resource = frame.queryMBean(objectName); ! if (resource != null) ! { ! context.put("MANAGED-OBJECT", resource); ! ! String listen = attrs.getValue("listen"); ! if ("true".equals(listen)) ! { ! try ! { ! resource.registerForNotifications(); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! } ! } ! } --- 1,53 ---- ! /* ! * Created on 20 juin 2003 ! * ! * To change this generated comment go to ! * Window>Preferences>Java>Code Generation>Code Template ! */ ! package org.ejtools.management.browser.state.rules; ! ! import java.util.Map; ! ! import org.ejtools.management.browser.frame.ServerInternalFrame; ! import org.ejtools.management.browser.model.ManagedObject; ! import org.ejtools.util.state.DefaultRule; ! import org.xml.sax.Attributes; ! ! /** ! * @author letiemble ! * @created 20 juin 2003 ! * @version $Revision$ ! */ ! public class ManagedObjectRule extends DefaultRule ! { ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! */ ! public void loadEnter(Map context) ! { ! ServerInternalFrame frame = (ServerInternalFrame) context.get("FRAME"); ! Attributes attrs = (Attributes) context.get("ATTRIBUTES"); ! ! String objectName = attrs.getValue("objectName"); ! ManagedObject resource = frame.queryMBean(objectName); ! if (resource != null) ! { ! context.put("MANAGED-OBJECT", resource); ! ! String listen = attrs.getValue("listen"); ! if ("true".equals(listen)) ! { ! try ! { ! resource.registerForNotifications(); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! } ! } ! } Index: ManagementGraphRule.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/state/rules/ManagementGraphRule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ManagementGraphRule.java 27 Nov 2003 01:39:48 -0000 1.1 --- ManagementGraphRule.java 13 Dec 2003 22:31:57 -0000 1.2 *************** *** 1,42 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.state.rules; ! ! import java.util.Map; ! ! import org.ejtools.graph.service.GraphConsumer; ! import org.ejtools.graph.service.GraphConsumerSelector; ! import org.ejtools.management.browser.model.ManagedObject; ! import org.ejtools.util.state.DefaultRule; ! import org.xml.sax.Attributes; ! ! /** ! * @author letiemble ! * @version $Revision$ ! */ ! public class ManagementGraphRule extends DefaultRule ! { ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! */ ! public void loadEnter(Map context) ! { ! ManagedObject resource = (ManagedObject) context.get("MANAGED-OBJECT"); ! if (resource != null) ! { ! Attributes attrs = (Attributes) context.get("ATTRIBUTES"); ! ! String attribute = attrs.getValue("attribute"); ! String target = attrs.getValue("target"); ! ! GraphConsumer consumer = GraphConsumerSelector.select(resource, target); ! resource.registerForGraph(consumer, attribute, null); ! } ! } ! } --- 1,42 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.state.rules; ! ! import java.util.Map; ! ! import org.ejtools.graph.service.GraphConsumer; ! import org.ejtools.graph.service.GraphConsumerSelector; ! import org.ejtools.management.browser.model.ManagedObject; ! import org.ejtools.util.state.DefaultRule; ! import org.xml.sax.Attributes; ! ! /** ! * @author letiemble ! * @version $Revision$ ! */ ! public class ManagementGraphRule extends DefaultRule ! { ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! */ ! public void loadEnter(Map context) ! { ! ManagedObject resource = (ManagedObject) context.get("MANAGED-OBJECT"); ! if (resource != null) ! { ! Attributes attrs = (Attributes) context.get("ATTRIBUTES"); ! ! String attribute = attrs.getValue("attribute"); ! String target = attrs.getValue("target"); ! ! GraphConsumer consumer = GraphConsumerSelector.select(resource, target); ! resource.registerForGraph(consumer, attribute, null); ! } ! } ! } Index: ServerInternalFrameRule.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/state/rules/ServerInternalFrameRule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ServerInternalFrameRule.java 27 Nov 2003 01:39:48 -0000 1.1 --- ServerInternalFrameRule.java 13 Dec 2003 22:31:57 -0000 1.2 *************** *** 1,32 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.state.rules; ! ! import java.util.Map; ! ! import org.ejtools.management.browser.frame.ServerInternalFrame; ! import org.ejtools.util.state.DefaultRule; ! ! /** ! * @author letiembl ! * @version $Revision$ ! * @created 20 juin 2003 ! */ ! public class ServerInternalFrameRule extends DefaultRule ! { ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! */ ! public void loadEnter(Map context) ! { ! ServerInternalFrame frame = new ServerInternalFrame(); ! context.put("FRAME", frame); ! context.put("HOLDER", frame); ! } ! } --- 1,32 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.state.rules; ! ! import java.util.Map; ! ! import org.ejtools.management.browser.frame.ServerInternalFrame; ! import org.ejtools.util.state.DefaultRule; ! ! /** ! * @author letiembl ! * @version $Revision$ ! * @created 20 juin 2003 ! */ ! public class ServerInternalFrameRule extends DefaultRule ! { ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! */ ! public void loadEnter(Map context) ! { ! ServerInternalFrame frame = new ServerInternalFrame(); ! context.put("FRAME", frame); ! context.put("HOLDER", frame); ! } ! } Index: ServerRule.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/state/rules/ServerRule.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ServerRule.java 27 Nov 2003 01:39:48 -0000 1.1 --- ServerRule.java 13 Dec 2003 22:31:57 -0000 1.2 *************** *** 1,51 **** ! /* ! * Created on 20 juin 2003 ! * ! * To change this generated comment go to ! * Window>Preferences>Java>Code Generation>Code Template ! */ ! package org.ejtools.management.browser.state.rules; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Map; ! ! import org.ejtools.management.browser.frame.ServerInternalFrame; ! import org.ejtools.management.browser.model.Server; ! import org.ejtools.util.state.DefaultRule; ! import org.xml.sax.Attributes; ! ! /** ! * @author letiemble ! * @created 20 juin 2003 ! * @version $Revision$ ! */ ! public class ServerRule extends DefaultRule ! { ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! */ ! public void loadEnter(Map context) ! { ! BeanContextServices container = (BeanContextServices) context.get("CONTAINER"); ! ServerInternalFrame frame = (ServerInternalFrame) context.get("FRAME"); ! ! Server server = new Server(); ! context.put("SERVER", server); ! ! frame.setServer(server); ! container.add(frame); ! ! Attributes attrs = (Attributes) context.get("ATTRIBUTES"); ! ! String name = attrs.getValue("name"); ! server.setName(name); ! ! String connected = attrs.getValue("connected"); ! if ("true".equals(connected)) ! { ! server.connect(); ! } ! } ! } --- 1,51 ---- ! /* ! * Created on 20 juin 2003 ! * ! * To change this generated comment go to ! * Window>Preferences>Java>Code Generation>Code Template ! */ ! package org.ejtools.management.browser.state.rules; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Map; ! ! import org.ejtools.management.browser.frame.ServerInternalFrame; ! import org.ejtools.management.browser.model.Server; ! import org.ejtools.util.state.DefaultRule; ! import org.xml.sax.Attributes; ! ! /** ! * @author letiemble ! * @created 20 juin 2003 ! * @version $Revision$ ! */ ! public class ServerRule extends DefaultRule ! { ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! */ ! public void loadEnter(Map context) ! { ! BeanContextServices container = (BeanContextServices) context.get("CONTAINER"); ! ServerInternalFrame frame = (ServerInternalFrame) context.get("FRAME"); ! ! Server server = new Server(); ! context.put("SERVER", server); ! ! frame.setServer(server); ! container.add(frame); ! ! Attributes attrs = (Attributes) context.get("ATTRIBUTES"); ! ! String name = attrs.getValue("name"); ! server.setName(name); ! ! String connected = attrs.getValue("connected"); ! if ("true".equals(connected)) ! { ! server.connect(); ! } ! } ! } |
From: <let...@us...> - 2003-12-14 09:49:31
|
Update of /cvsroot/ejtools/applications/management.browser/xdocs In directory sc8-pr-cvs1:/tmp/cvs-serv21061/management.browser/xdocs Added Files: manual.xml Log Message: Add more javadocs. Adjust workspace persistence. --- NEW FILE: manual.xml --- <?xml version="1.0"?> <!-- # ================================================================================ # EJTools, the Enterprise Java Tools # # Distributable under LGPL license. # See terms of license at gnu.org. # # $Revision: 1.1 $ # ================================================================================ --> <document> <properties> <title>Management Browser</title> </properties> <body> <section name="Manuals"> <p>The EJTools Management Browser manual is available under three forms :<ul> <li>A large HTML file : browse <a href="manual/large.html">here</a> </li> <li>Chuncked HTML files : browse <a href="manual/index.html">here</a> </li> <li>PDF document : download <a href="manual/large.html">here</a> </li> </ul> </p> </section> </body> </document> |
From: <let...@us...> - 2003-12-14 09:49:30
|
Update of /cvsroot/ejtools In directory sc8-pr-cvs1:/tmp/cvs-serv21405 Modified Files: maven.xml Log Message: Complete website generation. |
From: <let...@us...> - 2003-12-14 09:49:15
|
Update of /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/ui In directory sc8-pr-cvs1:/tmp/cvs-serv3339/applications/management.browser/src/main/org/ejtools/management/browser/ui Modified Files: ManagedObjectDetailViewer.java Log Message: Sort attributes and operations. Index: ManagedObjectDetailViewer.java =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/src/main/org/ejtools/management/browser/ui/ManagedObjectDetailViewer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ManagedObjectDetailViewer.java 27 Nov 2003 01:39:48 -0000 1.6 --- ManagedObjectDetailViewer.java 13 Dec 2003 22:52:56 -0000 1.7 *************** *** 1,723 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.management.browser.ui; ! ! import java.awt.Color; ! import java.awt.Component; [...1424 lines suppressed...] ! Object newValue = this.editor.getValue(); ! if ((newValue != null) && (this.info.isReadable())) ! { ! Object oldValue = ManagedObjectDetailViewer.this.object.getAttribute(this.info.getName()); ! if (!newValue.equals(oldValue)) ! { ! Attribute attr = new Attribute(this.info.getName(), newValue); ! ManagedObjectDetailViewer.this.object.setAttribute(attr); ! } ! } ! } ! catch (Exception e) ! { ! logger.error("Error while updating from editor", e); ! } ! } ! } ! } ! } ! |
From: <let...@us...> - 2003-12-14 09:49:14
|
Update of /cvsroot/ejtools/applications/management.browser In directory sc8-pr-cvs1:/tmp/cvs-serv3339/applications/management.browser Modified Files: project.xml Log Message: Sort attributes and operations. Index: project.xml =================================================================== RCS file: /cvsroot/ejtools/applications/management.browser/project.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** project.xml 13 Dec 2003 22:31:56 -0000 1.5 --- project.xml 13 Dec 2003 22:52:54 -0000 1.6 *************** *** 11,129 **** --> <project> ! <extend>${basedir}/../../project.xml</extend> ! <id>ejtools-management-browser</id> ! <groupId>ejtools</groupId> ! <name>Management Browser</name> ! <description>A tool which allows to view and interact with a JSR77 compliant J2EE server.</description> ! <currentVersion>1.0.0</currentVersion> ! <package>org/ejtools/management/browser</package> ! <url>/applications/management.browser</url> ! <dependencies> ! <dependency> ! <id>log4j</id> ! <version>1.2.8</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>mx4j</id> ! <artifactId>mx4j-jmx</artifactId> ! <version>1.1.1</version> ! </dependency> ! <dependency> ! <id>mx4j</id> ! <artifactId>mx4j-tools</artifactId> ! <version>1.1.1</version> ! </dependency> ! <!-- Project dependencies --> ! <dependency> ! <id>ejtools-adwt</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-common</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-graph</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-j2ee-icons</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-taglib</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <war.bundle.jar>true</war.bundle.jar> ! </properties> ! </dependency> ! <!-- Local dependencies --> ! <dependency> ! <id>dreambean</id> ! <groupId>dreambean</groupId> ! <artifactId>awt</artifactId> ! <version>1.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>sun</id> ! <groupId>sun</groupId> ! <artifactId>j2ee</artifactId> ! <version>1.4.0</version> ! </dependency> ! <dependency> ! <id>sun</id> ! <groupId>sun</groupId> ! <artifactId>jlfgr</artifactId> ! <version>1.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>sun</id> ! <groupId>sun</groupId> ! <artifactId>jsr77</artifactId> ! <version>1.1</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! </dependencies> ! <build> ! <!-- Resources --> ! <resources> ! <!-- General resources --> ! <resource> ! <directory>${basedir}/src/resources</directory> ! </resource> ! <!-- XDoclet Resources --> ! <resource> ! <directory>${basedir}/target/xdoclet/xdoclet</directory> ! <includes>*.properties</includes> ! </resource> ! </resources> ! </build> </project> --- 11,122 ---- --> <project> ! <extend>${basedir}/../../project.xml</extend> ! <id>ejtools-management-browser</id> ! <groupId>ejtools</groupId> ! <name>Management Browser</name> ! <description>A tool which allows to view and interact with a JSR77 compliant J2EE server.</description> ! <currentVersion>1.0.0</currentVersion> ! <package>org/ejtools/management/browser</package> ! <url>/applications/management.browser</url> ! <dependencies> ! <dependency> ! <id>log4j</id> ! <version>1.2.8</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>mx4j</id> ! <artifactId>mx4j-jmx</artifactId> ! <version>1.1.1</version> ! </dependency> ! <dependency> ! <id>mx4j</id> ! <artifactId>mx4j-tools</artifactId> ! <version>1.1.1</version> ! </dependency> ! <!-- Project dependencies --> ! <dependency> ! <id>ejtools-adwt</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-common</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-graph</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-j2ee-icons</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-j2ee-management</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-taglib</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <war.bundle.jar>true</war.bundle.jar> ! </properties> ! </dependency> ! <!-- Local dependencies --> ! <dependency> ! <id>dreambean</id> ! <groupId>dreambean</groupId> ! <artifactId>awt</artifactId> ! <version>1.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>sun</id> ! <groupId>sun</groupId> ! <artifactId>jlfgr</artifactId> ! <version>1.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! </dependencies> ! <build> ! <!-- Resources --> ! <resources> ! <!-- General resources --> ! <resource> ! <directory>${basedir}/src/resources</directory> ! </resource> ! <!-- XDoclet Resources --> ! <resource> ! <directory>${basedir}/target/xdoclet/xdoclet</directory> ! <includes>*.properties</includes> ! </resource> ! </resources> ! </build> </project> |
From: <let...@us...> - 2003-12-14 09:49:07
|
Update of /cvsroot/ejtools/thirdparty/jboss/jars In directory sc8-pr-cvs1:/tmp/cvs-serv29834/jboss/jars Modified Files: license.txt Log Message: Add licenses for each used library. Index: license.txt =================================================================== RCS file: /cvsroot/ejtools/thirdparty/jboss/jars/license.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** license.txt 3 Mar 2003 22:06:33 -0000 1.1 --- license.txt 13 Dec 2003 20:48:27 -0000 1.2 *************** *** 1,458 **** ! GNU LESSER GENERAL PUBLIC LICENSE ! Version 2.1, February 1999 ! ! Copyright (C) 1991, 1999 Free Software Foundation, Inc. ! 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! Everyone is permitted to copy and distribute verbatim copies ! of this license document, but changing it is not allowed. ! ! [This is the first released version of the Lesser GPL. It also counts ! as the successor of the GNU Library Public License, version 2, hence ! the version number 2.1.] ! ! Preamble ! ! The licenses for most software are designed to take away your ! freedom to share and change it. By contrast, the GNU General Public ! Licenses are intended to guarantee your freedom to share and change ! free software--to make sure the software is free for all its users. ! ! This license, the Lesser General Public License, applies to some ! specially designated software packages--typically libraries--of the ! Free Software Foundation and other authors who decide to use it. You ! can use it too, but we suggest you first think carefully about whether ! this license or the ordinary General Public License is the better ! strategy to use in any particular case, based on the explanations below. ! ! When we speak of free software, we are referring to freedom of use, ! not price. Our General Public Licenses are designed to make sure that ! you have the freedom to distribute copies of free software (and charge ! for this service if you wish); that you receive source code or can get ! it if you want it; that you can change the software and use pieces of ! it in new free programs; and that you are informed that you can do ! these things. ! ! To protect your rights, we need to make restrictions that forbid ! distributors to deny you these rights or to ask you to surrender these ! rights. These restrictions translate to certain responsibilities for ! you if you distribute copies of the library or if you modify it. ! ! For example, if you distribute copies of the library, whether gratis ! or for a fee, you must give the recipients all the rights that we gave ! you. You must make sure that they, too, receive or can get the source ! code. If you link other code with the library, you must provide ! complete object files to the recipients, so that they can relink them ! with the library after making changes to the library and recompiling ! it. And you must show them these terms so they know their rights. ! ! We protect your rights with a two-step method: (1) we copyright the ! library, and (2) we offer you this license, which gives you legal ! permission to copy, distribute and/or modify the library. ! ! To protect each distributor, we want to make it very clear that ! there is no warranty for the free library. Also, if the library is ! modified by someone else and passed on, the recipients should know ! that what they have is not the original version, so that the original ! author's reputation will not be affected by problems that might be ! introduced by others. ! ! Finally, software patents pose a constant threat to the existence of ! any free program. We wish to make sure that a company cannot ! effectively restrict the users of a free program by obtaining a ! restrictive license from a patent holder. Therefore, we insist that ! any patent license obtained for a version of the library must be ! consistent with the full freedom of use specified in this license. ! ! Most GNU software, including some libraries, is covered by the ! ordinary GNU General Public License. This license, the GNU Lesser ! General Public License, applies to certain designated libraries, and ! is quite different from the ordinary General Public License. We use ! this license for certain libraries in order to permit linking those ! libraries into non-free programs. ! ! When a program is linked with a library, whether statically or using ! a shared library, the combination of the two is legally speaking a ! combined work, a derivative of the original library. The ordinary ! General Public License therefore permits such linking only if the ! entire combination fits its criteria of freedom. The Lesser General ! Public License permits more lax criteria for linking other code with ! the library. ! ! We call this license the "Lesser" General Public License because it ! does Less to protect the user's freedom than the ordinary General ! Public License. It also provides other free software developers Less ! of an advantage over competing non-free programs. These disadvantages ! are the reason we use the ordinary General Public License for many ! libraries. However, the Lesser license provides advantages in certain ! special circumstances. ! ! For example, on rare occasions, there may be a special need to ! encourage the widest possible use of a certain library, so that it becomes ! a de-facto standard. To achieve this, non-free programs must be ! allowed to use the library. A more frequent case is that a free ! library does the same job as widely used non-free libraries. In this ! case, there is little to gain by limiting the free library to free ! software only, so we use the Lesser General Public License. ! ! In other cases, permission to use a particular library in non-free ! programs enables a greater number of people to use a large body of ! free software. For example, permission to use the GNU C Library in ! non-free programs enables many more people to use the whole GNU ! operating system, as well as its variant, the GNU/Linux operating ! system. ! ! Although the Lesser General Public License is Less protective of the ! users' freedom, it does ensure that the user of a program that is ! linked with the Library has the freedom and the wherewithal to run ! that program using a modified version of the Library. ! ! The precise terms and conditions for copying, distribution and ! modification follow. Pay close attention to the difference between a ! "work based on the library" and a "work that uses the library". The ! former contains code derived from the library, whereas the latter must ! be combined with the library in order to run. ! ! GNU LESSER GENERAL PUBLIC LICENSE ! TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ! ! 0. This License Agreement applies to any software library or other ! program which contains a notice placed by the copyright holder or ! other authorized party saying it may be distributed under the terms of ! this Lesser General Public License (also called "this License"). ! Each licensee is addressed as "you". ! ! A "library" means a collection of software functions and/or data ! prepared so as to be conveniently linked with application programs ! (which use some of those functions and data) to form executables. ! ! The "Library", below, refers to any such software library or work ! which has been distributed under these terms. A "work based on the ! Library" means either the Library or any derivative work under ! copyright law: that is to say, a work containing the Library or a ! portion of it, either verbatim or with modifications and/or translated ! straightforwardly into another language. (Hereinafter, translation is ! included without limitation in the term "modification".) ! ! "Source code" for a work means the preferred form of the work for ! making modifications to it. For a library, complete source code means ! all the source code for all modules it contains, plus any associated ! interface definition files, plus the scripts used to control compilation ! and installation of the library. ! ! Activities other than copying, distribution and modification are not ! covered by this License; they are outside its scope. The act of ! running a program using the Library is not restricted, and output from ! such a program is covered only if its contents constitute a work based ! on the Library (independent of the use of the Library in a tool for ! writing it). Whether that is true depends on what the Library does ! and what the program that uses the Library does. ! ! 1. You may copy and distribute verbatim copies of the Library's ! complete source code as you receive it, in any medium, provided that ! you conspicuously and appropriately publish on each copy an ! appropriate copyright notice and disclaimer of warranty; keep intact ! all the notices that refer to this License and to the absence of any ! warranty; and distribute a copy of this License along with the ! Library. ! ! You may charge a fee for the physical act of transferring a copy, ! and you may at your option offer warranty protection in exchange for a ! fee. ! ! 2. You may modify your copy or copies of the Library or any portion ! of it, thus forming a work based on the Library, and copy and ! distribute such modifications or work under the terms of Section 1 ! above, provided that you also meet all of these conditions: ! ! a) The modified work must itself be a software library. ! ! b) You must cause the files modified to carry prominent notices ! stating that you changed the files and the date of any change. ! ! c) You must cause the whole of the work to be licensed at no ! charge to all third parties under the terms of this License. ! ! d) If a facility in the modified Library refers to a function or a ! table of data to be supplied by an application program that uses ! the facility, other than as an argument passed when the facility ! is invoked, then you must make a good faith effort to ensure that, ! in the event an application does not supply such function or ! table, the facility still operates, and performs whatever part of ! its purpose remains meaningful. ! ! (For example, a function in a library to compute square roots has ! a purpose that is entirely well-defined independent of the ! application. Therefore, Subsection 2d requires that any ! application-supplied function or table used by this function must ! be optional: if the application does not supply it, the square ! root function must still compute square roots.) ! ! These requirements apply to the modified work as a whole. If ! identifiable sections of that work are not derived from the Library, ! and can be reasonably considered independent and separate works in ! themselves, then this License, and its terms, do not apply to those ! sections when you distribute them as separate works. But when you ! distribute the same sections as part of a whole which is a work based ! on the Library, the distribution of the whole must be on the terms of ! this License, whose permissions for other licensees extend to the ! entire whole, and thus to each and every part regardless of who wrote ! it. ! ! Thus, it is not the intent of this section to claim rights or contest ! your rights to work written entirely by you; rather, the intent is to ! exercise the right to control the distribution of derivative or ! collective works based on the Library. ! ! In addition, mere aggregation of another work not based on the Library ! with the Library (or with a work based on the Library) on a volume of ! a storage or distribution medium does not bring the other work under ! the scope of this License. ! ! 3. You may opt to apply the terms of the ordinary GNU General Public ! License instead of this License to a given copy of the Library. To do ! this, you must alter all the notices that refer to this License, so ! that they refer to the ordinary GNU General Public License, version 2, ! instead of to this License. (If a newer version than version 2 of the ! ordinary GNU General Public License has appeared, then you can specify ! that version instead if you wish.) Do not make any other change in ! these notices. ! ! Once this change is made in a given copy, it is irreversible for ! that copy, so the ordinary GNU General Public License applies to all ! subsequent copies and derivative works made from that copy. ! ! This option is useful when you wish to copy part of the code of ! the Library into a program that is not a library. ! ! 4. You may copy and distribute the Library (or a portion or ! derivative of it, under Section 2) in object code or executable form ! under the terms of Sections 1 and 2 above provided that you accompany ! it with the complete corresponding machine-readable source code, which ! must be distributed under the terms of Sections 1 and 2 above on a ! medium customarily used for software interchange. ! ! If distribution of object code is made by offering access to copy ! from a designated place, then offering equivalent access to copy the ! source code from the same place satisfies the requirement to ! distribute the source code, even though third parties are not ! compelled to copy the source along with the object code. ! ! 5. A program that contains no derivative of any portion of the ! Library, but is designed to work with the Library by being compiled or ! linked with it, is called a "work that uses the Library". Such a ! work, in isolation, is not a derivative work of the Library, and ! therefore falls outside the scope of this License. ! ! However, linking a "work that uses the Library" with the Library ! creates an executable that is a derivative of the Library (because it ! contains portions of the Library), rather than a "work that uses the ! library". The executable is therefore covered by this License. ! Section 6 states terms for distribution of such executables. ! ! When a "work that uses the Library" uses material from a header file ! that is part of the Library, the object code for the work may be a ! derivative work of the Library even though the source code is not. ! Whether this is true is especially significant if the work can be ! linked without the Library, or if the work is itself a library. The ! threshold for this to be true is not precisely defined by law. ! ! If such an object file uses only numerical parameters, data ! structure layouts and accessors, and small macros and small inline ! functions (ten lines or less in length), then the use of the object ! file is unrestricted, regardless of whether it is legally a derivative ! work. (Executables containing this object code plus portions of the ! Library will still fall under Section 6.) ! ! Otherwise, if the work is a derivative of the Library, you may ! distribute the object code for the work under the terms of Section 6. ! Any executables containing that work also fall under Section 6, ! whether or not they are linked directly with the Library itself. ! ! 6. As an exception to the Sections above, you may also combine or ! link a "work that uses the Library" with the Library to produce a ! work containing portions of the Library, and distribute that work ! under terms of your choice, provided that the terms permit ! modification of the work for the customer's own use and reverse ! engineering for debugging such modifications. ! ! You must give prominent notice with each copy of the work that the ! Library is used in it and that the Library and its use are covered by ! this License. You must supply a copy of this License. If the work ! during execution displays copyright notices, you must include the ! copyright notice for the Library among them, as well as a reference ! directing the user to the copy of this License. Also, you must do one ! of these things: ! ! a) Accompany the work with the complete corresponding ! machine-readable source code for the Library including whatever ! changes were used in the work (which must be distributed under ! Sections 1 and 2 above); and, if the work is an executable linked ! with the Library, with the complete machine-readable "work that ! uses the Library", as object code and/or source code, so that the ! user can modify the Library and then relink to produce a modified ! executable containing the modified Library. (It is understood ! that the user who changes the contents of definitions files in the ! Library will not necessarily be able to recompile the application ! to use the modified definitions.) ! ! b) Use a suitable shared library mechanism for linking with the ! Library. A suitable mechanism is one that (1) uses at run time a ! copy of the library already present on the user's computer system, ! rather than copying library functions into the executable, and (2) ! will operate properly with a modified version of the library, if ! the user installs one, as long as the modified version is ! interface-compatible with the version that the work was made with. ! ! c) Accompany the work with a written offer, valid for at ! least three years, to give the same user the materials ! specified in Subsection 6a, above, for a charge no more ! than the cost of performing this distribution. ! ! d) If distribution of the work is made by offering access to copy ! from a designated place, offer equivalent access to copy the above ! specified materials from the same place. ! ! e) Verify that the user has already received a copy of these ! materials or that you have already sent this user a copy. ! ! For an executable, the required form of the "work that uses the ! Library" must include any data and utility programs needed for ! reproducing the executable from it. However, as a special exception, ! the materials to be distributed need not include anything that is ! normally distributed (in either source or binary form) with the major ! components (compiler, kernel, and so on) of the operating system on ! which the executable runs, unless that component itself accompanies ! the executable. ! ! It may happen that this requirement contradicts the license ! restrictions of other proprietary libraries that do not normally ! accompany the operating system. Such a contradiction means you cannot ! use both them and the Library together in an executable that you ! distribute. ! ! 7. You may place library facilities that are a work based on the ! Library side-by-side in a single library together with other library ! facilities not covered by this License, and distribute such a combined ! library, provided that the separate distribution of the work based on ! the Library and of the other library facilities is otherwise ! permitted, and provided that you do these two things: ! ! a) Accompany the combined library with a copy of the same work ! based on the Library, uncombined with any other library ! facilities. This must be distributed under the terms of the ! Sections above. ! ! b) Give prominent notice with the combined library of the fact ! that part of it is a work based on the Library, and explaining ! where to find the accompanying uncombined form of the same work. ! ! 8. You may not copy, modify, sublicense, link with, or distribute ! the Library except as expressly provided under this License. Any ! attempt otherwise to copy, modify, sublicense, link with, or ! distribute the Library is void, and will automatically terminate your ! rights under this License. However, parties who have received copies, ! or rights, from you under this License will not have their licenses ! terminated so long as such parties remain in full compliance. ! ! 9. You are not required to accept this License, since you have not ! signed it. However, nothing else grants you permission to modify or ! distribute the Library or its derivative works. These actions are ! prohibited by law if you do not accept this License. Therefore, by ! modifying or distributing the Library (or any work based on the ! Library), you indicate your acceptance of this License to do so, and ! all its terms and conditions for copying, distributing or modifying ! the Library or works based on it. ! ! 10. Each time you redistribute the Library (or any work based on the ! Library), the recipient automatically receives a license from the ! original licensor to copy, distribute, link with or modify the Library ! subject to these terms and conditions. You may not impose any further ! restrictions on the recipients' exercise of the rights granted herein. ! You are not responsible for enforcing compliance by third parties with ! this License. ! ! 11. If, as a consequence of a court judgment or allegation of patent ! infringement or for any other reason (not limited to patent issues), ! conditions are imposed on you (whether by court order, agreement or ! otherwise) that contradict the conditions of this License, they do not ! excuse you from the conditions of this License. If you cannot ! distribute so as to satisfy simultaneously your obligations under this ! License and any other pertinent obligations, then as a consequence you ! may not distribute the Library at all. For example, if a patent ! license would not permit royalty-free redistribution of the Library by ! all those who receive copies directly or indirectly through you, then ! the only way you could satisfy both it and this License would be to ! refrain entirely from distribution of the Library. ! ! If any portion of this section is held invalid or unenforceable under any ! particular circumstance, the balance of the section is intended to apply, ! and the section as a whole is intended to apply in other circumstances. ! ! It is not the purpose of this section to induce you to infringe any ! patents or other property right claims or to contest validity of any ! such claims; this section has the sole purpose of protecting the ! integrity of the free software distribution system which is ! implemented by public license practices. Many people have made ! generous contributions to the wide range of software distributed ! through that system in reliance on consistent application of that ! system; it is up to the author/donor to decide if he or she is willing ! to distribute software through any other system and a licensee cannot ! impose that choice. ! ! This section is intended to make thoroughly clear what is believed to ! be a consequence of the rest of this License. ! ! 12. If the distribution and/or use of the Library is restricted in ! certain countries either by patents or by copyrighted interfaces, the ! original copyright holder who places the Library under this License may add ! an explicit geographical distribution limitation excluding those countries, ! so that distribution is permitted only in or among countries not thus ! excluded. In such case, this License incorporates the limitation as if ! written in the body of this License. ! ! 13. The Free Software Foundation may publish revised and/or new ! versions of the Lesser General Public License from time to time. ! Such new versions will be similar in spirit to the present version, ! but may differ in detail to address new problems or concerns. ! ! Each version is given a distinguishing version number. If the Library ! specifies a version number of this License which applies to it and ! "any later version", you have the option of following the terms and ! conditions either of that version or of any later version published by ! the Free Software Foundation. If the Library does not specify a ! license version number, you may choose any version ever published by ! the Free Software Foundation. ! ! 14. If you wish to incorporate parts of the Library into other free ! programs whose distribution conditions are incompatible with these, ! write to the author to ask for permission. For software which is ! copyrighted by the Free Software Foundation, write to the Free ! Software Foundation; we sometimes make exceptions for this. Our ! decision will be guided by the two goals of preserving the free status ! of all derivatives of our free software and of promoting the sharing ! and reuse of software generally. ! ! NO WARRANTY ! ! 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO ! WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ! EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR ! OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY ! KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE ! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ! PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE ! LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME ! THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ! ! 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN ! WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY ! AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU ! FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR ! CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE ! LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING ! RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A ! FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF ! SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH ! DAMAGES. ! ! END OF TERMS AND CONDITIONS --- 1,458 ---- ! GNU LESSER GENERAL PUBLIC LICENSE ! Version 2.1, February 1999 ! ! Copyright (C) 1991, 1999 Free Software Foundation, Inc. ! 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! Everyone is permitted to copy and distribute verbatim copies ! of this license document, but changing it is not allowed. ! ! [This is the first released version of the Lesser GPL. It also counts ! as the successor of the GNU Library Public License, version 2, hence ! the version number 2.1.] ! ! Preamble ! ! The licenses for most software are designed to take away your ! freedom to share and change it. By contrast, the GNU General Public ! Licenses are intended to guarantee your freedom to share and change ! free software--to make sure the software is free for all its users. ! ! This license, the Lesser General Public License, applies to some ! specially designated software packages--typically libraries--of the ! Free Software Foundation and other authors who decide to use it. You ! can use it too, but we suggest you first think carefully about whether ! this license or the ordinary General Public License is the better ! strategy to use in any particular case, based on the explanations below. ! ! When we speak of free software, we are referring to freedom of use, ! not price. Our General Public Licenses are designed to make sure that ! you have the freedom to distribute copies of free software (and charge ! for this service if you wish); that you receive source code or can get ! it if you want it; that you can change the software and use pieces of ! it in new free programs; and that you are informed that you can do ! these things. ! ! To protect your rights, we need to make restrictions that forbid ! distributors to deny you these rights or to ask you to surrender these ! rights. These restrictions translate to certain responsibilities for ! you if you distribute copies of the library or if you modify it. ! ! For example, if you distribute copies of the library, whether gratis ! or for a fee, you must give the recipients all the rights that we gave ! you. You must make sure that they, too, receive or can get the source ! code. If you link other code with the library, you must provide ! complete object files to the recipients, so that they can relink them ! with the library after making changes to the library and recompiling ! it. And you must show them these terms so they know their rights. ! ! We protect your rights with a two-step method: (1) we copyright the ! library, and (2) we offer you this license, which gives you legal ! permission to copy, distribute and/or modify the library. ! ! To protect each distributor, we want to make it very clear that ! there is no warranty for the free library. Also, if the library is ! modified by someone else and passed on, the recipients should know ! that what they have is not the original version, so that the original ! author's reputation will not be affected by problems that might be ! introduced by others. ! ! Finally, software patents pose a constant threat to the existence of ! any free program. We wish to make sure that a company cannot ! effectively restrict the users of a free program by obtaining a ! restrictive license from a patent holder. Therefore, we insist that ! any patent license obtained for a version of the library must be ! consistent with the full freedom of use specified in this license. ! ! Most GNU software, including some libraries, is covered by the ! ordinary GNU General Public License. This license, the GNU Lesser ! General Public License, applies to certain designated libraries, and ! is quite different from the ordinary General Public License. We use ! this license for certain libraries in order to permit linking those ! libraries into non-free programs. ! ! When a program is linked with a library, whether statically or using ! a shared library, the combination of the two is legally speaking a ! combined work, a derivative of the original library. The ordinary ! General Public License therefore permits such linking only if the ! entire combination fits its criteria of freedom. The Lesser General ! Public License permits more lax criteria for linking other code with ! the library. ! ! We call this license the "Lesser" General Public License because it ! does Less to protect the user's freedom than the ordinary General ! Public License. It also provides other free software developers Less ! of an advantage over competing non-free programs. These disadvantages ! are the reason we use the ordinary General Public License for many ! libraries. However, the Lesser license provides advantages in certain ! special circumstances. ! ! For example, on rare occasions, there may be a special need to ! encourage the widest possible use of a certain library, so that it becomes ! a de-facto standard. To achieve this, non-free programs must be ! allowed to use the library. A more frequent case is that a free ! library does the same job as widely used non-free libraries. In this ! case, there is little to gain by limiting the free library to free ! software only, so we use the Lesser General Public License. ! ! In other cases, permission to use a particular library in non-free ! programs enables a greater number of people to use a large body of ! free software. For example, permission to use the GNU C Library in ! non-free programs enables many more people to use the whole GNU ! operating system, as well as its variant, the GNU/Linux operating ! system. ! ! Although the Lesser General Public License is Less protective of the ! users' freedom, it does ensure that the user of a program that is ! linked with the Library has the freedom and the wherewithal to run ! that program using a modified version of the Library. ! ! The precise terms and conditions for copying, distribution and ! modification follow. Pay close attention to the difference between a ! "work based on the library" and a "work that uses the library". The ! former contains code derived from the library, whereas the latter must ! be combined with the library in order to run. ! ! GNU LESSER GENERAL PUBLIC LICENSE ! TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ! ! 0. This License Agreement applies to any software library or other ! program which contains a notice placed by the copyright holder or ! other authorized party saying it may be distributed under the terms of ! this Lesser General Public License (also called "this License"). ! Each licensee is addressed as "you". ! ! A "library" means a collection of software functions and/or data ! prepared so as to be conveniently linked with application programs ! (which use some of those functions and data) to form executables. ! ! The "Library", below, refers to any such software library or work ! which has been distributed under these terms. A "work based on the ! Library" means either the Library or any derivative work under ! copyright law: that is to say, a work containing the Library or a ! portion of it, either verbatim or with modifications and/or translated ! straightforwardly into another language. (Hereinafter, translation is ! included without limitation in the term "modification".) ! ! "Source code" for a work means the preferred form of the work for ! making modifications to it. For a library, complete source code means ! all the source code for all modules it contains, plus any associated ! interface definition files, plus the scripts used to control compilation ! and installation of the library. ! ! Activities other than copying, distribution and modification are not ! covered by this License; they are outside its scope. The act of ! running a program using the Library is not restricted, and output from ! such a program is covered only if its contents constitute a work based ! on the Library (independent of the use of the Library in a tool for ! writing it). Whether that is true depends on what the Library does ! and what the program that uses the Library does. ! ! 1. You may copy and distribute verbatim copies of the Library's ! complete source code as you receive it, in any medium, provided that ! you conspicuously and appropriately publish on each copy an ! appropriate copyright notice and disclaimer of warranty; keep intact ! all the notices that refer to this License and to the absence of any ! warranty; and distribute a copy of this License along with the ! Library. ! ! You may charge a fee for the physical act of transferring a copy, ! and you may at your option offer warranty protection in exchange for a ! fee. ! ! 2. You may modify your copy or copies of the Library or any portion ! of it, thus forming a work based on the Library, and copy and ! distribute such modifications or work under the terms of Section 1 ! above, provided that you also meet all of these conditions: ! ! a) The modified work must itself be a software library. ! ! b) You must cause the files modified to carry prominent notices ! stating that you changed the files and the date of any change. ! ! c) You must cause the whole of the work to be licensed at no ! charge to all third parties under the terms of this License. ! ! d) If a facility in the modified Library refers to a function or a ! table of data to be supplied by an application program that uses ! the facility, other than as an argument passed when the facility ! is invoked, then you must make a good faith effort to ensure that, ! in the event an application does not supply such function or ! table, the facility still operates, and performs whatever part of ! its purpose remains meaningful. ! ! (For example, a function in a library to compute square roots has ! a purpose that is entirely well-defined independent of the ! application. Therefore, Subsection 2d requires that any ! application-supplied function or table used by this function must ! be optional: if the application does not supply it, the square ! root function must still compute square roots.) ! ! These requirements apply to the modified work as a whole. If ! identifiable sections of that work are not derived from the Library, ! and can be reasonably considered independent and separate works in ! themselves, then this License, and its terms, do not apply to those ! sections when you distribute them as separate works. But when you ! distribute the same sections as part of a whole which is a work based ! on the Library, the distribution of the whole must be on the terms of ! this License, whose permissions for other licensees extend to the ! entire whole, and thus to each and every part regardless of who wrote ! it. ! ! Thus, it is not the intent of this section to claim rights or contest ! your rights to work written entirely by you; rather, the intent is to ! exercise the right to control the distribution of derivative or ! collective works based on the Library. ! ! In addition, mere aggregation of another work not based on the Library ! with the Library (or with a work based on the Library) on a volume of ! a storage or distribution medium does not bring the other work under ! the scope of this License. ! ! 3. You may opt to apply the terms of the ordinary GNU General Public ! License instead of this License to a given copy of the Library. To do ! this, you must alter all the notices that refer to this License, so ! that they refer to the ordinary GNU General Public License, version 2, ! instead of to this License. (If a newer version than version 2 of the ! ordinary GNU General Public License has appeared, then you can specify ! that version instead if you wish.) Do not make any other change in ! these notices. ! ! Once this change is made in a given copy, it is irreversible for ! that copy, so the ordinary GNU General Public License applies to all ! subsequent copies and derivative works made from that copy. ! ! This option is useful when you wish to copy part of the code of ! the Library into a program that is not a library. ! ! 4. You may copy and distribute the Library (or a portion or ! derivative of it, under Section 2) in object code or executable form ! under the terms of Sections 1 and 2 above provided that you accompany ! it with the complete corresponding machine-readable source code, which ! must be distributed under the terms of Sections 1 and 2 above on a ! medium customarily used for software interchange. ! ! If distribution of object code is made by offering access to copy ! from a designated place, then offering equivalent access to copy the ! source code from the same place satisfies the requirement to ! distribute the source code, even though third parties are not ! compelled to copy the source along with the object code. ! ! 5. A program that contains no derivative of any portion of the ! Library, but is designed to work with the Library by being compiled or ! linked with it, is called a "work that uses the Library". Such a ! work, in isolation, is not a derivative work of the Library, and ! therefore falls outside the scope of this License. ! ! However, linking a "work that uses the Library" with the Library ! creates an executable that is a derivative of the Library (because it ! contains portions of the Library), rather than a "work that uses the ! library". The executable is therefore covered by this License. ! Section 6 states terms for distribution of such executables. ! ! When a "work that uses the Library" uses material from a header file ! that is part of the Library, the object code for the work may be a ! derivative work of the Library even though the source code is not. ! Whether this is true is especially significant if the work can be ! linked without the Library, or if the work is itself a library. The ! threshold for this to be true is not precisely defined by law. ! ! If such an object file uses only numerical parameters, data ! structure layouts and accessors, and small macros and small inline ! functions (ten lines or less in length), then the use of the object ! file is unrestricted, regardless of whether it is legally a derivative ! work. (Executables containing this object code plus portions of the ! Library will still fall under Section 6.) ! ! Otherwise, if the work is a derivative of the Library, you may ! distribute the object code for the work under the terms of Section 6. ! Any executables containing that work also fall under Section 6, ! whether or not they are linked directly with the Library itself. ! ! 6. As an exception to the Sections above, you may also combine or ! link a "work that uses the Library" with the Library to produce a ! work containing portions of the Library, and distribute that work ! under terms of your choice, provided that the terms permit ! modification of the work for the customer's own use and reverse ! engineering for debugging such modifications. ! ! You must give prominent notice with each copy of the work that the ! Library is used in it and that the Library and its use are covered by ! this License. You must supply a copy of this License. If the work ! during execution displays copyright notices, you must include the ! copyright notice for the Library among them, as well as a reference ! directing the user to the copy of this License. Also, you must do one ! of these things: ! ! a) Accompany the work with the complete corresponding ! machine-readable source code for the Library including whatever ! changes were used in the work (which must be distributed under ! Sections 1 and 2 above); and, if the work is an executable linked ! with the Library, with the complete machine-readable "work that ! uses the Library", as object code and/or source code, so that the ! user can modify the Library and then relink to produce a modified ! executable containing the modified Library. (It is understood ! that the user who changes the contents of definitions files in the ! Library will not necessarily be able to recompile the application ! to use the modified definitions.) ! ! b) Use a suitable shared library mechanism for linking with the ! Library. A suitable mechanism is one that (1) uses at run time a ! copy of the library already present on the user's computer system, ! rather than copying library functions into the executable, and (2) ! will operate properly with a modified version of the library, if ! the user installs one, as long as the modified version is ! interface-compatible with the version that the work was made with. ! ! c) Accompany the work with a written offer, valid for at ! least three years, to give the same user the materials ! specified in Subsection 6a, above, for a charge no more ! than the cost of performing this distribution. ! ! d) If distribution of the work is made by offering access to copy ! from a designated place, offer equivalent access to copy the above ! specified materials from the same place. ! ! e) Verify that the user has already received a copy of these ! materials or that you have already sent this user a copy. ! ! For an executable, the required form of the "work that uses the ! Library" must include any data and utility programs needed for ! reproducing the executable from it. However, as a special exception, ! the materials to be distributed need not include anything that is ! normally distributed (in either source or binary form) with the major ! components (compiler, kernel, and so on) of the operating system on ! which the executable runs, unless that component itself accompanies ! the executable. ! ! It may happen that this requirement contradicts the license ! restrictions of other proprietary libraries that do not normally ! accompany the operating system. Such a contradiction means you cannot ! use both them and the Library together in an executable that you ! distribute. ! ! 7. You may place library facilities that are a work based on the ! Library side-by-side in a single library together with other library ! facilities not covered by this License, and distribute such a combined ! library, provided that the separate distribution of the work based on ! the Library and of the other library facilities is otherwise ! permitted, and provided that you do these two things: ! ! a) Accompany the combined library with a copy of the same work ! based on the Library, uncombined with any other library ! facilities. This must be distributed under the terms of the ! Sections above. ! ! b) Give prominent notice with the combined library of the fact ! that part of it is a work based on the Library, and explaining ! where to find the accompanying uncombined form of the same work. ! ! 8. You may not copy, modify, sublicense, link with, or distribute ! the Library except as expressly provided under this License. Any ! attempt otherwise to copy, modify, sublicense, link with, or ! distribute the Library is void, and will automatically terminate your ! rights under this License. However, parties who have received copies, ! or rights, from you under this License will not have their licenses ! terminated so long as such parties remain in full compliance. ! ! 9. You are not required to accept this License, since you have not ! signed it. However, nothing else grants you permission to modify or ! distribute the Library or its derivative works. These actions are ! prohibited by law if you do not accept this License. Therefore, by ! modifying or distributing the Library (or any work based on the ! Library), you indicate your acceptance of this License to do so, and ! all its terms and conditions for copying, distributing or modifying ! the Library or works based on it. ! ! 10. Each time you redistribute the Library (or any work based on the ! Library), the recipient automatically receives a license from the ! original licensor to copy, distribute, link with or modify the Library ! subject to these terms and conditions. You may not impose any further ! restrictions on the recipients' exercise of the rights granted herein. ! You are not responsible for enforcing compliance by third parties with ! this License. ! ! 11. If, as a consequence of a court judgment or allegation of patent ! infringement or for any other reason (not limited to patent issues), ! conditions are imposed on you (whether by court order, agreement or ! otherwise) that contradict the conditions of this License, they do not ! excuse you from the conditions of this License. If you cannot ! distribute so as to satisfy simultaneously your obligations under this ! License and any other pertinent obligations, then as a consequence you ! may not distribute the Library at all. For example, if a patent ! license would not permit royalty-free redistribution of the Library by ! all those who receive copies directly or indirectly through you, then ! the only way you could satisfy both it and this License would be to ! refrain entirely from distribution of the Library. ! ! If any portion of this section is held invalid or unenforceable under any ! particular circumstance, the balance of the section is intended to apply, ! and the section as a whole is intended to apply in other circumstances. ! ! It is not the purpose of this section to induce you to infringe any ! patents or other property right claims or to contest validity of any ! such claims; this section has the sole purpose of protecting the ! integrity of the free software distribution system which is ! implemented by public license practices. Many people have made ! generous contributions to the wide range of software distributed ! through that system in reliance on consistent application of that ! system; it is up to the author/donor to decide if he or she is willing ! to distribute software through any other system and a licensee cannot ! impose that choice. ! ! This section is intended to make thoroughly clear what is believed to ! be a consequence of the rest of this License. ! ! 12. If the distribution and/or use of the Library is restricted in ! certain countries either by patents or by copyrighted interfaces, the ! original copyright holder who places the Library under this License may add ! an explicit geographical distribution limitation excluding those countries, ! so that distribution is permitted only in or among countries not thus ! excluded. In such case, this License incorporates the limitation as if ! written in the body of this License. ! ! 13. The Free Software Foundation may publish revised and/or new ! versions of the Lesser General Public License from time to time. ! Such new versions will be similar in spirit to the present version, ! but may differ in detail to address new problems or concerns. ! ! Each version is given a distinguishing version number. If the Library ! specifies a version number of this License which applies to it and ! "any later version", you have the option of following the terms and ! conditions either of that version or of any later version published by ! the Free Software Foundation. If the Library does not specify a ! license version number, you may choose any version ever published by ! the Free Software Foundation. ! ! 14. If you wish to incorporate parts of the Library into other free ! programs whose distribution conditions are incompatible with these, ! write to the author to ask for permission. For software which is ! copyrighted by the Free Software Foundation, write to the Free ! Software Foundation; we sometimes make exceptions for this. Our ! decision will be guided by the two goals of preserving the free status ! of all derivatives of our free software and of promoting the sharing ! and reuse of software generally. ! ! NO WARRANTY ! ! 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO ! WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ! EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR ! OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY ! KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE ! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ! PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE ! LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME ! THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ! ! 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN ! WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY ! AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU ! FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR ! CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE ! LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING ! RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A ! FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF ! SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH ! DAMAGES. ! ! END OF TERMS AND CONDITIONS |
From: <let...@us...> - 2003-12-14 09:49:05
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/spi In directory sc8-pr-cvs1:/tmp/cvs-serv4692/src/main/javax/enterprise/deploy/spi Added Files: DConfigBean.java DConfigBeanRoot.java DeploymentConfiguration.java DeploymentManager.java Target.java TargetModuleID.java package.html Log Message: Add up-to-date implementation for the JSR 88. No need for the Sun one. --- NEW FILE: DConfigBean.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi; import java.beans.PropertyChangeListener; import javax.enterprise.deploy.model.DDBean; import javax.enterprise.deploy.model.XpathEvent; import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException; import javax.enterprise.deploy.spi.exceptions.ConfigurationException; /** * The DConfigBean is a deployment configuration bean (DConfigBean) that is associated * with one or more deployment descriptor beans, (DDBean). A DConfigBean represents * a logical grouping of deployment configuration data to be presented to the Deployer. * A DConfigBean provides zero or more XPaths that identifies the XML information * it requires. A DConfigBean may contain other DConfigBeans and regular JavaBeans. * The top most DConfigBean is a DConfigBeanRoot object which represents a single * XML instance document. <p> * * A DConfigBean is created by calling DConfigBean.getDConfigBean(DDBean) method, * where DConfigBean is the object that provided the XPath which the DDBean represents. * </p> <p> * * A DConfigBean is a JavaBean component that presents the dynamic deployment configuration * information for a J2EE plugin to the deployer. It is a JavaBean. The JavaBean * architecture was chosen because of its versatility in providing both simple and * complex components. JavaBeans also enable the development of property sheets and * property editors, as well as sophisticated customization wizards.</p> <p> * * It is expected that a plugin vendor will provide a Property Editor for any complex * datatype in a DConfigBean that a deployer needs to edit through a property sheet. * The Property Editor should be implemented and made available to a tool according * to the guidelines defined in the JavaBeans API Specification version 1.01.</p> * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 * @see javax.enterprise.deploy.model.DDBean * @see javax.enterprise.deploy.model.XpathEvent */ public interface DConfigBean { /** * Return the JavaBean containing the deployment descriptor XML text associated * with this DConfigBean. * * @return The bean class containing the XML text for this DConfigBean. */ public DDBean getDDBean(); /** * Return a list of XPaths designating the deployment descriptor information this * DConfigBean requires. A given server vendor will need to specify some server-specific * information. Each String returned by this method is an XPath describing a certain * portion of the standard deployment descriptor for which there is corresponding * server-specific configuration. * * @return a list of XPath Strings representing XML data to be retrieved or * 'null' if there are none. */ public String[] getXpaths(); /** * Return the JavaBean containing the server-specific deployment configuration * information based upon the XML data provided by the DDBean. * * @param bean The DDBean containing the XML data to be * evaluated. * @return The DConfigBean to display the server-specific * properties for the standard bean. * @exception ConfigurationException reports errors in generating a configuration * bean. This DDBean is considered undeployable to this server until this * exception is resolved. A suitably descriptive message is required so the * user can diagnose the error. */ public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException; /** * Remove a child DConfigBean from this bean. * * @param bean The child DConfigBean to be removed. * @exception BeanNotFoundException the bean provided is not in the child list * of this bean. */ public void removeDConfigBean(DConfigBean bean) throws BeanNotFoundException; /** * A notification that the DDBean provided in the event has changed and this bean * or its child beans need to reevaluate themselves. * * @param event an event containing a reference to the DDBean which has changed. */ public void notifyDDChange(XpathEvent event); /** * Register a property listener for this bean. * * @param pcl PropertyChangeListener to add */ public void addPropertyChangeListener(PropertyChangeListener pcl); /** * Unregister a property listener for this bean. * * @param pcl Listener to remove. */ public void removePropertyChangeListener(PropertyChangeListener pcl); } --- NEW FILE: DConfigBeanRoot.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi; import javax.enterprise.deploy.model.DDBeanRoot; /** * A J2EE component module consists of one or more deployment descriptor files and * zero or more non-deployment descriptor XML instance documents. A module must contain * a component-specific deployment descriptor file (see the component specification * for details). It may contain one or more secondary deployment descriptor files * that define extra functionality on the component and zero or more non-deployment * descriptor XML instance documents (see the Web Services specification). <p> * * The DConfigBeanRoot object is a deployment configuration bean (DConfigBean) that * is associated with the root of the component's deployment descriptor. It must * be created by calling the DeploymentConfiguration.getDConfigBean(DDBeanRoot) method, * where DDBeanRoot represents the component's deployment descriptor.</p> <p> * * A DConfigBean object is associated with a deployment descriptor that extends a * component's functionality. It must be created by calling the DConfigBeanRoot.getDConfigBean(DDBeanRoot) * method. This DConfigBean object is a child of the compontent's DConfigBeanRoot * object. The DDBeanRoot argument represents the secondary deployment descriptor. * Deployment descriptor files such as webservice.xml and webserviceclient.xml are * examples of secondary deployment descriptor files.</p> <p> * * The server plugin must request a DDBeanRoot object for any non-deployment descriptor * XML instance document data it requires. The plugin must call method DeployableObject.getDDBeanRoot(String) * where String is the full path name from the root of the module to the file to * be represented. A WSDL file is an example of a non-deployment descriptor XML instance * document.</p> * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 * @see javax.enterprise.deploy.model.DDBeanRoot */ public interface DConfigBeanRoot extends DConfigBean { /** * Return a DConfigBean for a deployment descriptor that is not the module's primary * deployment descriptor. Web services provides a deployment descriptor in addition * to the module's primary deployment descriptor. Only the DDBeanRoot for this * catagory of secondary deployment descriptors are to be passed as arguments * through this method. Web service has two deployment descriptor files, one that * defines the web service and one that defines a client of a web service. See * the Web Service specificiation for the details. * * @param ddBeanRoot represents the root element of a deployment descriptor file. * @return a DConfigBean to be used for processing this deployment * descriptor data. Null may be returned if no DConfigBean is required for * this deployment descriptor. */ public DConfigBean getDConfigBean(DDBeanRoot ddBeanRoot); } --- NEW FILE: DeploymentConfiguration.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi; import java.io.InputStream; import java.io.OutputStream; import javax.enterprise.deploy.model.DDBeanRoot; import javax.enterprise.deploy.model.DeployableObject; import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException; import javax.enterprise.deploy.spi.exceptions.ConfigurationException; /** * An interface that defines a container for all the server-specific configuration * information for a single top-level J2EE module. The DeploymentConfiguration object * could represent a single stand alone module or an EAR file that contains several * sub-modules. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 * @see javax.enterprise.deploy.model.DDBeanRoot * @see javax.enterprise.deploy.model.DeployableObject */ public interface DeploymentConfiguration { /** * Returns an object that provides access to the deployment descriptor data and * classes of a J2EE module. * * @return The DeployableObject */ public DeployableObject getDeployableObject(); /** * Returns the top level configuration bean, DConfigBeanRoot, associated with * the deployment descriptor represented by the designated DDBeanRoot bean. * * @param bean The top level bean that represents the associated * deployment descriptor. * @return the DConfigBeanRoot for editing the server-specific * properties required by the module. * @exception ConfigurationException reports errors in generating a configuration * bean */ public DConfigBeanRoot getDConfigBeanRoot(DDBeanRoot bean) throws ConfigurationException; /** * Remove the root DConfigBean and all its children. * * @param bean the top leve DConfigBean to remove. * @exception BeanNotFoundException the bean provides is not in this beans child * list. */ public void removeDConfigBean(DConfigBeanRoot bean) throws BeanNotFoundException; /** * Restore from disk to instantated objects all the DConfigBeans associated with * a specific deployment descriptor. The beans may be fully or partially configured. * * @param inputArchive The input stream for the file from which * the DConfigBeans should be restored. * @param bean The DDBeanRoot bean associated with the * deployment descriptor file. * @return The top most parent configuration bean, * DConfigBeanRoot * @exception ConfigurationException reports errors in restoring a configuration * bean */ public DConfigBeanRoot restoreDConfigBean(InputStream inputArchive, DDBeanRoot bean) throws ConfigurationException; /** * Save to disk all the configuration beans associated with a particular deployment * descriptor file. The saved data may be fully or partially configured DConfigBeans. * The output file format is recommended to be XML. * * @param outputArchive The output stream to which the DConfigBeans * should be saved. * @param bean The top level bean, DConfigBeanRoot, from * which to be save. * @exception ConfigurationException reports errors in saving a configuration * bean */ public void saveDConfigBean(OutputStream outputArchive, DConfigBeanRoot bean) throws ConfigurationException; /** * Restore from disk to a full set of configuration beans previously stored. * * @param inputArchive The input stream from which to restore the * Configuration. * @exception ConfigurationException reports errors in restoring a configuration */ public void restore(InputStream inputArchive) throws ConfigurationException; /** * Save to disk the current set configuration beans created for this deployable * module. It is recommended the file format be XML. * * @param outputArchive The output stream to which to save the Configuration. * @exception ConfigurationException reports errors in saving a configuration */ public void save(OutputStream outputArchive) throws ConfigurationException; } --- NEW FILE: DeploymentManager.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi; import java.io.File; import java.io.InputStream; import java.util.Locale; import javax.enterprise.deploy.model.DeployableObject; import javax.enterprise.deploy.shared.DConfigBeanVersionType; import javax.enterprise.deploy.shared.ModuleType; import javax.enterprise.deploy.spi.exceptions.DConfigBeanVersionUnsupportedException; import javax.enterprise.deploy.spi.exceptions.InvalidModuleException; import javax.enterprise.deploy.spi.exceptions.TargetException; import javax.enterprise.deploy.spi.status.ProgressObject; /** * The DeploymentManager object provides the core set of functions a J2EE platform * must provide for J2EE application deployment. It provides server related information, * such as, a list of deployment targets, and vendor unique runtime configuration * information. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 * @see javax.enterprise.deploy.model.DeployableObject * @see javax.enterprise.deploy.shared.DConfigBeanVersionType * @see javax.enterprise.deploy.shared.ModuleType * @see javax.enterprise.deploy.spi.status.ProgressObject */ public interface DeploymentManager { /** * Retrieve the list of deployment targets supported by this DeploymentManager. * * @return A list of deployment Target designators the * user may select for application deployment or 'null' if there are none. * @exception IllegalStateException is thrown when the method is called when * running in disconnected mode. */ public Target[] getTargets() throws IllegalStateException; /** * Retrieve the list of J2EE application modules distributed to the identified * targets and that are currently running on the associated server or servers. * * @param moduleType A predefined designator for a J2EE module * type. * @param targetList A list of deployment Target designators the * user wants checked for module run status. * @return An array of TargetModuleID objects representing * the running modules or 'null' if there are none. * @exception TargetException is thrown when the method is called when * running in disconnected mode. * @exception IllegalStateException An invalid Target designator encountered. */ public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException; /** * Retrieve the list of J2EE application modules distributed to the identified * targets and that are currently not running on the associated server or servers. * * @param moduleType A predefined designator for a J2EE module * type. * @param targetList A list of deployment Target designators the * user wants checked for module run status. * @return An array of TargetModuleID objects representing * the non-running modules or 'null' if there are none. * @exception TargetException is thrown when the method is called when * running in disconnected mode. * @exception IllegalStateException An invalid Target designator encountered. */ public TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException; /** * Retrieve the list of all J2EE application modules running or not running on * the identified targets. * * @param moduleType A predefined designator for a J2EE module * type. * @param targetList A list of deployment Target designators the * user wants checked for module run status. * @return An array of TargetModuleID objects representing * all deployed modules running or not or 'null' if there are no deployed * modules. * @exception TargetException is thrown when the method is called when * running in disconnected mode. * @exception IllegalStateException An invalid Target designator encountered. */ public TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException; /** * Retrieve the object that provides server-specific deployment configuration * information for the J2EE deployable component. * * @param dObj An object representing a J2EE deployable * component. * @return The DeploymentConfiguration corresponding * to the DeployableObject * @exception InvalidModuleException The DeployableObject is an unknown or unsupport * component for this configuration tool. */ public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException; /** * The distribute method performs three tasks; it validates the deployment configuration * data, generates all container specific classes and interfaces, and moves the * fully baked archive to the designated deployment targets. * * @param targetList A list of server targets the user is specifying * this application be deployed to. * @param moduleArchive The file name of the application archive * to be distributed. * @param deploymentPlan The XML file containing the runtime configuration * information associated with this application archive. * @return ProgressObject an object that tracks and * reports the status of the distribution process. * @exception IllegalStateException is thrown when the method is called when * running in disconnected mode. */ public ProgressObject distribute(Target[] targetList, File moduleArchive, File deploymentPlan) throws IllegalStateException; /** * The distribute method performs three tasks; it validates the deployment configuration * data, generates all container specific classes and interfaces, and moves the * fully baked archive to the designated deployment targets. * * @param targetList A list of server targets the user is specifying * this application be deployed to. * @param moduleArchive The input stream containing the application * archive to be distributed. * @param deploymentPlan The XML file containing the runtime configuration * information associated with this application archive. * @return ProgressObject an object that tracks and * reports the status of the distribution process. * @exception IllegalStateException is thrown when the method is called when * running in disconnected mode. */ public ProgressObject distribute(Target[] targetList, InputStream moduleArchive, InputStream deploymentPlan) throws IllegalStateException; /** * Start the application running. <p> * * Only the TargetModuleIDs which represent a root module are valid for being * started. A root TargetModuleID has no parent. A TargetModuleID with a parent * can not be individually started. A root TargetModuleID module and all its child * modules will be started.</p> * * @param moduleIDList A array of TargetModuleID objects representing * the modules to be started. * @return ProgressObject an object that tracks and * reports the status of the start operation. * @exception IllegalStateException is thrown when the method is called when * running in disconnected mode. */ public ProgressObject start(TargetModuleID[] moduleIDList) throws IllegalStateException; /** * Stop the application running. <p> * * Only the TargetModuleIDs which represent a root module are valid for being * stopped. A root TargetModuleID has no parent. A TargetModuleID with a parent * can not be individually stopped. A root TargetModuleID module and all its child * modules will be stopped.</p> * * @param moduleIDList A array of TargetModuleID objects representing * the modules to be stopped. * @return ProgressObject an object that tracks and * reports the status of the stop operation. * @exception IllegalStateException is thrown when the method is called when * running in disconnected mode. */ public ProgressObject stop(TargetModuleID[] moduleIDList) throws IllegalStateException; /** * Remove the application from the target server. <p> * * Only the TargetModuleIDs which represent a root module are valid for undeployment. * A root TargetModuleID has no parent. A TargetModuleID with a parent can not * be undeployed. A root TargetModuleID module and all its child modules will * be undeployed. The root TargetModuleID module and all its child modules must * stopped before they can be undeployed.</p> * * @param moduleIDList A array of TargetModuleID objects representing * the modules to be undeployed. * @return ProgressObject an object that tracks and * reports the status of the undeply operation. * @exception IllegalStateException is thrown when the method is called when * running in disconnected mode. */ public ProgressObject undeploy(TargetModuleID[] moduleIDList) throws IllegalStateException; /** * This method designates whether this platform vendor provides application redeployment * functionality. A value of true means it is supported. False means it is not. * * @return A value of true means redeployment is supported by this vendor's * DeploymentManager. False means it is not. */ public boolean isRedeploySupported(); /** * (optional) The redeploy method provides a means for updating currently deployed * J2EE applications. This is an optional method for vendor implementation. Redeploy * replaces a currently deployed application with an updated version. The runtime * configuration information for the updated application must remain identical * to the application it is updating. When an application update is redeployed, * all existing client connections to the original running application must not * be disrupted; new clients will connect to the application update. This operation * is valid for TargetModuleIDs that represent a root module. A root TargetModuleID * has no parent. A root TargetModuleID module and all its child modules will * be redeployed. A child TargetModuleID module cannot be individually redeployed. * The redeploy operation is complete only when this action for all the modules * has completed. * * @param moduleIDList A array of TargetModuleID objects * representing the modules to be redeployed. * @param moduleArchive The file name of the application * archive to be disrtibuted. * @param deploymentPlan The XML file containing the runtime * configuration information associated with this application archive. * @return ProgressObject an object that tracks * and reports the status of the distribution process. * @exception UnsupportedOperationException this optional command is not supported * by this implementation. * @exception IllegalStateException is thrown when the method is called * when running in disconnected mode. */ public ProgressObject redeploy(TargetModuleID[] moduleIDList, File moduleArchive, File deploymentPlan) throws UnsupportedOperationException, IllegalStateException; /** * (optional) The redeploy method provides a means for updating currently deployed * J2EE applications. This is an optional method for vendor implementation. Redeploy * replaces a currently deployed application with an updated version. The runtime * configuration information for the updated application must remain identical * to the application it is updating. When an application update is redeployed, * all existing client connections to the original running application must not * be disrupted; new clients will connect to the application update. This operation * is valid for TargetModuleIDs that represent a root module. A root TargetModuleID * has no parent. A root TargetModuleID module and all its child modules will * be redeployed. A child TargetModuleID module cannot be individually redeployed. * The redeploy operation is complete only when this action for all the modules * has completed. * * @param moduleIDList A array of TargetModuleID objects * representing the modules to be redeployed. * @param moduleArchive The input stream containing the application * archive to be distributed. * @param deploymentPlan The XML file containing the runtime * configuration information associated with this application archive. * @return ProgressObject an object that tracks * and reports the status of the distribution process. * @exception UnsupportedOperationException this optional command is not supported * by this implementation. * @exception IllegalStateException is thrown when the method is called * when running in disconnected mode. */ public ProgressObject redeploy(TargetModuleID[] moduleIDList, InputStream moduleArchive, InputStream deploymentPlan) throws UnsupportedOperationException, IllegalStateException; /** * The release method is the mechanism by which the tool signals to the DeploymentManager * that the tool does not need it to continue running connected to the platform. * The tool may be signaling it wants to run in a disconnected mode or it is planning * to shutdown. When release is called the DeploymentManager may close any J2EE * resource connections it had for deployment configuration and perform other * related resource cleanup. It should not accept any new operation requests (i.e., * distribute, start stop, undeploy, redeploy. It should finish any operations * that are currently in process. Each ProgressObject associated with a running * operation should be marked as released (see the ProgressObject). */ public void release(); /** * Returns the default locale supported by this implementation of javax.enterprise.deploy.spi * subpackages. * * @return Locale the default locale for this implementation. */ public Locale getDefaultLocale(); /** * Returns the active locale this implementation of javax.enterprise.deploy.spi * subpackages is running. * * @return Locale the active locale of this implementation. */ public Locale getCurrentLocale(); /** * Set the active locale for this implementation of javax.enterprise.deploy.spi * subpackages to run. * * @param locale The new locale * @exception UnsupportedOperationException the provide locale is not supported. */ public void setLocale(Locale locale) throws UnsupportedOperationException; /** * Returns an array of supported locales for this implementation. * * @return Locale[] the list of supported locales. */ public Locale[] getSupportedLocales(); /** * Reports if this implementation supports the designated locale. * * @param locale The locale to test * @return A value of 'true' means it is support and 'false' it is not. */ public boolean isLocaleSupported(Locale locale); /** * Returns the J2EE platform version number for which the configuration beans * are provided. The beans must have been compiled with the J2SE version required * by the J2EE platform. * * @return a DConfigBeanVersionType object representing the platform version * number for which these beans are provided. */ public DConfigBeanVersionType getDConfigBeanVersion(); /** * Returns 'true' if the configuration beans support the J2EE platform version * specified. It returns 'false' if the version is not supported. * * @param version a DConfigBeanVersionType object representing the J2EE platform * version for which support is requested. * @return 'true' if the version is supported and 'false if not. */ public boolean isDConfigBeanVersionSupported(DConfigBeanVersionType version); /** * Set the configuration beans to be used to the J2EE platform version specificed. * * @param version a DConfigBeanVersionType * object representing the J2EE platform version for which support is requested. * @exception DConfigBeanVersionUnsupportedException when the requested bean * version is not supported. */ public void setDConfigBeanVersion(DConfigBeanVersionType version) throws DConfigBeanVersionUnsupportedException; } --- NEW FILE: Target.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi; /** * A Target interface represents a single logical core server of one instance of * a J2EE platform product. It is a designator for a server and the implied location * to copy a configured application for the server to access. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 */ public interface Target { /** * Retrieve the name of the target server. * * @return The name */ public String getName(); /** * Retrieve other descriptive information about the target. * * @return The description */ public String getDescription(); } --- NEW FILE: TargetModuleID.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package javax.enterprise.deploy.spi; /** * A TargetModuleID interface represents a unique identifier for a deployed application * module. A deployable application module can be an EAR, JAR, WAR or RAR file. A * TargetModuleID can represent a root module or a child module. A root module TargetModuleID * has no parent. It represents a deployed EAR file or stand alone module. A child * module TargetModuleID represents a deployed sub module of a J2EE application. * A child TargetModuleID has only one parent, the super module it was bundled and * deployed with. The identifier consists of the target name and the unique identifier * for the deployed application module. * * @author Laurent Etiemble * @version $Revision: 1.1 $ * @since 1.0 */ public interface TargetModuleID { /** * Retrieve the name of the target server. this module was deployed to. * * @return Target an object representing a server target. */ public Target getTarget(); /** * Retrieve the id assigned to represent the deployed module. * * @return The module ID */ public String getModuleID(); /** * If this TargetModulID represents a web module retrieve the URL for it. * * @return the URL of a web module or null if the module is not a web module. */ public String getWebURL(); /** * Retrieve the identifier representing the deployed module. * * @return the identifier of the deployed module */ public String toString(); /** * Retrieve the identifier of the parent object of this deployed module. If there * is no parent then this is the root object deployed. The root could represent * an EAR file or it could be a stand alone module that was deployed. * * @return the TargetModuleID of the parent of this object. A null value means * this module is the root object deployed. */ public TargetModuleID getParentTargetModuleID(); /** * Retrieve a list of identifiers of the children of this deployed module. * * @return a list of TargetModuleIDs identifying the childern of this object. * A null value means this module has no childern. */ public TargetModuleID[] getChildTargetModuleID(); } --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides J2EE Product Vendor implementation classes. <h2>Package Specification</h2> <ul> <li><a href="http://jcp.org/jsr/detail/88.jsp">JSR 88, J2EE Application Deployment</a></li> </ul> <h2>Related Documentation</h2> For overviews, tutorials, examples, guides, and tool documentation, please see: <ul> <li><a href="http://java.sun.com/j2ee/tools">J2EE Tools</a></li> </ul> </body> </html> |
From: <let...@us...> - 2003-12-14 09:49:04
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/model In directory sc8-pr-cvs1:/tmp/cvs-serv3436/src/main/javax/enterprise/deploy/model Log Message: Directory /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/model added to the repository |
From: <let...@us...> - 2003-12-14 09:49:02
|
Update of /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/shared In directory sc8-pr-cvs1:/tmp/cvs-serv3565/src/main/javax/enterprise/deploy/shared Log Message: Directory /cvsroot/ejtools/libraries/j2ee.deployment/src/main/javax/enterprise/deploy/shared added to the repository |
From: <let...@us...> - 2003-12-14 09:48:58
|
Update of /cvsroot/ejtools/libraries/common/src/resources/org/ejtools/util In directory sc8-pr-cvs1:/tmp/cvs-serv18971/common/src/resources/org/ejtools/util Added Files: Resources.properties Resources_fr_FR.properties Log Message: Add more javadocs. Add package.html files. --- NEW FILE: Resources.properties --- workspace.file.dialog.extension.description=Workspace (*.xml) csv.file.dialog.extension.description=Comma Separated Values file (*.csv) png.file.dialog.extension.description=PNG image (*.png) file.dialog.overwrite.text=Do you want to overwrite the {0} file ? --- NEW FILE: Resources_fr_FR.properties --- (This appears to be a binary file; contents omitted.) |
From: <let...@us...> - 2003-12-14 09:48:41
|
Update of /cvsroot/ejtools/libraries/adwt/src/test/test/adwt/editor In directory sc8-pr-cvs1:/tmp/cvs-serv19233/adwt/src/test/test/adwt/editor Modified Files: EditorsTest.java Log Message: Add more javadocs. Add package.html files. Index: EditorsTest.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/test/test/adwt/editor/EditorsTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EditorsTest.java 15 Sep 2003 22:37:15 -0000 1.2 --- EditorsTest.java 13 Dec 2003 21:29:35 -0000 1.3 *************** *** 1,111 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package test.adwt.editor; ! ! import java.beans.PropertyEditor; ! import java.beans.PropertyEditorManager; ! import java.net.URL; ! import java.net.URLClassLoader; ! import java.util.ArrayList; ! import java.util.Vector; ! ! import javax.management.ObjectName; ! ! import org.ejtools.beans.CustomPropertyEditorManager; ! ! import junit.framework.TestCase; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class EditorsTest extends TestCase ! { ! ! /** Constructor for the CustomPropertyEditorManagerTest object */ ! public EditorsTest() ! { ! super(); ! } ! ! ! /** ! * Constructor for the CustomPropertyEditorManagerTest object ! * ! * @param name Description of the Parameter ! */ ! public EditorsTest(String name) ! { ! super(name); ! } ! ! ! /** A unit test for JUnit */ ! public void testAppend() ! { ! CustomPropertyEditorManager.findEditor(String.class); ! String[] paths = PropertyEditorManager.getEditorSearchPath(); ! boolean found = false; ! for (int i = 0; i < paths.length; i++) ! { ! if (paths[i].equals(CustomPropertyEditorManager.EDITORS_PACKAGE)) ! { ! found = true; ! break; ! } ! } ! assertTrue("EJTools package must be registered for search : found " + PropertyEditorManager.getEditorSearchPath(), found); ! } ! ! ! /** ! * A unit test for JUnit ! * ! * @exception Exception Description of the Exception ! */ ! public void testKnownClass() ! throws Exception ! { ! String object1 = new String("dummy"); ! PropertyEditor editor1 = CustomPropertyEditorManager.findEditor(object1.getClass()); ! assertNotNull("Editor must be found", editor1); ! assertTrue("Editor must be provided by Sun : found " + editor1.getClass().getName(), editor1.getClass().getName().indexOf("sun.beans.editors") >= 0); ! ! ObjectName object2 = new ObjectName("*:*"); ! PropertyEditor editor2 = CustomPropertyEditorManager.findEditor(object2.getClass()); ! assertNotNull("Editor must be found", editor2); ! assertTrue("Editor must be provided by EJTools : found " + editor2.getClass().getName(), editor2.getClass().getName().indexOf("org.ejtools.adwt.editor") >= 0); ! } ! ! ! /** A unit test for JUnit */ ! public void testUnknownClass() ! { ! Runtime object1 = Runtime.getRuntime(); ! PropertyEditor editor1 = CustomPropertyEditorManager.findEditor(object1.getClass()); ! assertNull("Editor must be null", editor1); ! ! URLClassLoader object2 = new URLClassLoader(new URL[0]); ! PropertyEditor editor2 = CustomPropertyEditorManager.findEditor(object2.getClass()); ! assertNull("Editor must be null", editor2); ! } ! ! ! /** A unit test for JUnit */ ! public void testUnknownClassWithKnownInterface() ! { ! Vector object1 = new Vector(); ! PropertyEditor editor1 = CustomPropertyEditorManager.findEditor(object1.getClass()); ! assertNotNull("Editor must be found", editor1); ! assertTrue("Editor must be provided by EJTools : found " + editor1.getClass().getName(), editor1.getClass().getName().indexOf("org.ejtools.adwt.editor") >= 0); ! ! ArrayList object2 = new ArrayList(); ! PropertyEditor editor2 = CustomPropertyEditorManager.findEditor(object2.getClass()); ! assertNotNull("Editor must be found", editor2); ! assertTrue("Editor must be provided by EJTools : found " + editor2.getClass().getName(), editor2.getClass().getName().indexOf("org.ejtools.adwt.editor") >= 0); ! } ! } --- 1,90 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package test.adwt.editor; ! ! import java.beans.PropertyEditor; ! import java.net.URL; ! import java.net.URLClassLoader; ! import java.util.ArrayList; ! import java.util.Vector; ! ! import javax.management.ObjectName; ! ! import junit.framework.TestCase; ! ! import org.ejtools.beans.CustomPropertyEditorManager; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class EditorsTest extends TestCase ! { ! /** Constructor for the CustomPropertyEditorManagerTest object */ ! public EditorsTest() ! { ! super(); ! } ! ! ! /** ! * Constructor for the CustomPropertyEditorManagerTest object ! * ! * @param name Description of the Parameter ! */ ! public EditorsTest(String name) ! { ! super(name); ! } ! ! /** ! * A unit test for JUnit ! * ! * @exception Exception Description of the Exception ! */ ! public void testKnownClass() ! throws Exception ! { ! String object1 = new String("dummy"); ! PropertyEditor editor1 = CustomPropertyEditorManager.findEditor(object1.getClass()); ! assertNotNull("Editor must be found", editor1); ! assertTrue("Editor must be provided by Sun : found " + editor1.getClass().getName(), editor1.getClass().getName().indexOf("sun.beans.editors") >= 0); ! ! ObjectName object2 = new ObjectName("*:*"); ! PropertyEditor editor2 = CustomPropertyEditorManager.findEditor(object2.getClass()); ! assertNotNull("Editor must be found", editor2); ! assertTrue("Editor must be provided by EJTools : found " + editor2.getClass().getName(), editor2.getClass().getName().indexOf("org.ejtools.adwt.editor") >= 0); ! } ! ! ! /** A unit test for JUnit */ ! public void testUnknownClass() ! { ! Runtime object1 = Runtime.getRuntime(); ! PropertyEditor editor1 = CustomPropertyEditorManager.findEditor(object1.getClass()); ! assertNull("Editor must be null", editor1); ! ! URLClassLoader object2 = new URLClassLoader(new URL[0]); ! PropertyEditor editor2 = CustomPropertyEditorManager.findEditor(object2.getClass()); ! assertNull("Editor must be null", editor2); ! } ! ! ! /** A unit test for JUnit */ ! public void testUnknownClassWithKnownInterface() ! { ! Vector object1 = new Vector(); ! PropertyEditor editor1 = CustomPropertyEditorManager.findEditor(object1.getClass()); ! assertNotNull("Editor must be found", editor1); ! assertTrue("Editor must be provided by EJTools : found " + editor1.getClass().getName(), editor1.getClass().getName().indexOf("org.ejtools.adwt.editor") >= 0); ! ! ArrayList object2 = new ArrayList(); ! PropertyEditor editor2 = CustomPropertyEditorManager.findEditor(object2.getClass()); ! assertNotNull("Editor must be found", editor2); ! assertTrue("Editor must be provided by EJTools : found " + editor2.getClass().getName(), editor2.getClass().getName().indexOf("org.ejtools.adwt.editor") >= 0); ! } ! } |
From: <let...@us...> - 2003-12-14 09:48:40
|
Update of /cvsroot/ejtools/libraries/adwt/src/test/test/adwt In directory sc8-pr-cvs1:/tmp/cvs-serv19233/adwt/src/test/test/adwt Modified Files: TestList.java TestTree.java TestTreePanel.java Log Message: Add more javadocs. Add package.html files. Index: TestList.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/test/test/adwt/TestList.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestList.java 15 Sep 2003 22:37:14 -0000 1.1 --- TestList.java 13 Dec 2003 21:29:35 -0000 1.2 *************** *** 1,61 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package test.adwt; ! ! import java.awt.event.WindowAdapter; ! import java.awt.event.WindowEvent; ! ! import org.ejtools.adwt.BeanContextList; ! import org.ejtools.adwt.BeanContextListModel; ! import org.ejtools.adwt.service.AboutServiceProvider; ! import org.ejtools.adwt.service.SDIFrameServiceProvider; ! import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class TestList extends CustomBeanContextServicesSupport ! { ! /** Constructor for the TestTree object */ ! public TestList() ! { ! SDIFrameServiceProvider frameService = new SDIFrameServiceProvider(); ! AboutServiceProvider aboutProvider = new AboutServiceProvider(); ! ! // Add a window hook ! frameService.addWindowListener( ! new WindowAdapter() ! { ! public void windowClosing(WindowEvent e) ! { ! super.windowClosing(e); ! System.exit(0); ! } ! }); ! ! BeanContextListModel model = new BeanContextListModel(this); ! BeanContextList tree = new BeanContextList(model); ! frameService.setContent(tree); ! ! this.add(frameService); ! this.add(aboutProvider); ! } ! ! ! /** ! * The main program for the TestTree class ! * ! * @param args The command line arguments ! */ ! public static void main(String[] args) ! { ! TestList test = new TestList(); ! } ! } --- 1,61 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package test.adwt; ! ! import java.awt.event.WindowAdapter; ! import java.awt.event.WindowEvent; ! ! import org.ejtools.adwt.BeanContextList; ! import org.ejtools.adwt.BeanContextListModel; ! import org.ejtools.adwt.service.AboutServiceProvider; ! import org.ejtools.adwt.service.SDIFrameServiceProvider; ! import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class TestList extends CustomBeanContextServicesSupport ! { ! /** Constructor for the TestTree object */ ! public TestList() ! { ! SDIFrameServiceProvider frameService = new SDIFrameServiceProvider(); ! AboutServiceProvider aboutProvider = new AboutServiceProvider(); ! ! // Add a window hook ! frameService.addWindowListener( ! new WindowAdapter() ! { ! public void windowClosing(WindowEvent e) ! { ! super.windowClosing(e); ! System.exit(0); ! } ! }); ! ! BeanContextListModel model = new BeanContextListModel(this); ! BeanContextList tree = new BeanContextList(model); ! frameService.setContent(tree); ! ! this.add(frameService); ! this.add(aboutProvider); ! } ! ! ! /** ! * The main program for the TestTree class ! * ! * @param args The command line arguments ! */ ! public static void main(String[] args) ! { ! TestList test = new TestList(); ! } ! } Index: TestTree.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/test/test/adwt/TestTree.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestTree.java 15 Sep 2003 22:37:14 -0000 1.1 --- TestTree.java 13 Dec 2003 21:29:35 -0000 1.2 *************** *** 1,94 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package test.adwt; ! ! import java.awt.event.WindowAdapter; ! import java.awt.event.WindowEvent; ! import java.net.URL; ! ! import org.ejtools.adwt.BeanContextTree; ! import org.ejtools.adwt.BeanContextTreeModel; ! import org.ejtools.adwt.service.AboutServiceProvider; ! import org.ejtools.adwt.service.HistoryService; ! import org.ejtools.adwt.service.HistoryServiceProvider; ! import org.ejtools.adwt.service.SDIFrameServiceProvider; ! import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class TestTree extends CustomBeanContextServicesSupport ! { ! /** Constructor for the TestTree object */ ! public TestTree() ! { ! SDIFrameServiceProvider frameService = new SDIFrameServiceProvider(); ! HistoryServiceProvider historyProvider = new HistoryServiceProvider( ! new HistoryService.Holder() ! { ! public void loadResource(URL url, Object context) ! { ! } ! }, 4); ! AboutServiceProvider aboutProvider = new AboutServiceProvider(); ! ! // Add a window hook ! frameService.addWindowListener( ! new WindowAdapter() ! { ! public void windowClosing(WindowEvent e) ! { ! super.windowClosing(e); ! System.exit(0); ! } ! }); ! ! BeanContextTreeModel model = new BeanContextTreeModel(this); ! BeanContextTree tree = new BeanContextTree(model); ! frameService.setContent(tree); ! ! this.add(frameService); ! this.add(aboutProvider); ! this.add(historyProvider); ! } ! ! ! /** ! * The main program for the TestTree class ! * ! * @param args The command line arguments ! * @exception Exception Description of the Exception ! */ ! public static void main(String[] args) ! throws Exception ! { ! final TestTree test = new TestTree(); ! ! Thread t = ! new Thread() ! { ! public void run() ! { ! try ! { ! for (int i = 0; i < 10; i++) ! { ! Thread.sleep(1000); ! test.add(new AboutServiceProvider()); ! } ! } ! catch (Exception e) ! { ! } ! } ! }; ! t.start(); ! } ! } --- 1,94 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package test.adwt; ! ! import java.awt.event.WindowAdapter; ! import java.awt.event.WindowEvent; ! import java.net.URL; ! ! import org.ejtools.adwt.BeanContextTree; ! import org.ejtools.adwt.BeanContextTreeModel; ! import org.ejtools.adwt.service.AboutServiceProvider; ! import org.ejtools.adwt.service.HistoryService; ! import org.ejtools.adwt.service.HistoryServiceProvider; ! import org.ejtools.adwt.service.SDIFrameServiceProvider; ! import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class TestTree extends CustomBeanContextServicesSupport ! { ! /** Constructor for the TestTree object */ ! public TestTree() ! { ! SDIFrameServiceProvider frameService = new SDIFrameServiceProvider(); ! HistoryServiceProvider historyProvider = new HistoryServiceProvider( ! new HistoryService.Holder() ! { ! public void loadResource(URL url, Object context) ! { ! } ! }, 4); ! AboutServiceProvider aboutProvider = new AboutServiceProvider(); ! ! // Add a window hook ! frameService.addWindowListener( ! new WindowAdapter() ! { ! public void windowClosing(WindowEvent e) ! { ! super.windowClosing(e); ! System.exit(0); ! } ! }); ! ! BeanContextTreeModel model = new BeanContextTreeModel(this); ! BeanContextTree tree = new BeanContextTree(model); ! frameService.setContent(tree); ! ! this.add(frameService); ! this.add(aboutProvider); ! this.add(historyProvider); ! } ! ! ! /** ! * The main program for the TestTree class ! * ! * @param args The command line arguments ! * @exception Exception Description of the Exception ! */ ! public static void main(String[] args) ! throws Exception ! { ! final TestTree test = new TestTree(); ! ! Thread t = ! new Thread() ! { ! public void run() ! { ! try ! { ! for (int i = 0; i < 10; i++) ! { ! Thread.sleep(1000); ! test.add(new AboutServiceProvider()); ! } ! } ! catch (Exception e) ! { ! } ! } ! }; ! t.start(); ! } ! } Index: TestTreePanel.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/test/test/adwt/TestTreePanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestTreePanel.java 15 Sep 2003 22:37:14 -0000 1.1 --- TestTreePanel.java 13 Dec 2003 21:29:35 -0000 1.2 *************** *** 1,92 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package test.adwt; ! ! import java.awt.event.WindowAdapter; ! import java.awt.event.WindowEvent; ! import java.net.URL; ! ! import org.ejtools.adwt.BeanContextTreePanel; ! import org.ejtools.adwt.service.AboutServiceProvider; ! import org.ejtools.adwt.service.HistoryService; ! import org.ejtools.adwt.service.HistoryServiceProvider; ! import org.ejtools.adwt.service.SDIFrameServiceProvider; ! import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class TestTreePanel extends CustomBeanContextServicesSupport ! { ! /** Constructor for the TestTree object */ ! public TestTreePanel() ! { ! SDIFrameServiceProvider frameService = new SDIFrameServiceProvider(); ! HistoryServiceProvider historyProvider = new HistoryServiceProvider( ! new HistoryService.Holder() ! { ! public void loadResource(URL url, Object context) ! { ! } ! }, 4); ! AboutServiceProvider aboutProvider = new AboutServiceProvider(); ! ! // Add a window hook ! frameService.addWindowListener( ! new WindowAdapter() ! { ! public void windowClosing(WindowEvent e) ! { ! super.windowClosing(e); ! System.exit(0); ! } ! }); ! ! BeanContextTreePanel panel = new BeanContextTreePanel(this); ! frameService.setContent(panel); ! ! this.add(frameService); ! this.add(aboutProvider); ! this.add(historyProvider); ! } ! ! ! /** ! * The main program for the TestTree class ! * ! * @param args The command line arguments ! * @exception Exception Description of the Exception ! */ ! public static void main(String[] args) ! throws Exception ! { ! final TestTreePanel test = new TestTreePanel(); ! ! Thread t = ! new Thread() ! { ! public void run() ! { ! try ! { ! for (int i = 0; i < 10; i++) ! { ! Thread.sleep(1000); ! test.add(new AboutServiceProvider()); ! } ! } ! catch (Exception e) ! { ! } ! } ! }; ! t.start(); ! } ! } --- 1,92 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package test.adwt; ! ! import java.awt.event.WindowAdapter; ! import java.awt.event.WindowEvent; ! import java.net.URL; ! ! import org.ejtools.adwt.BeanContextTreePanel; ! import org.ejtools.adwt.service.AboutServiceProvider; ! import org.ejtools.adwt.service.HistoryService; ! import org.ejtools.adwt.service.HistoryServiceProvider; ! import org.ejtools.adwt.service.SDIFrameServiceProvider; ! import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class TestTreePanel extends CustomBeanContextServicesSupport ! { ! /** Constructor for the TestTree object */ ! public TestTreePanel() ! { ! SDIFrameServiceProvider frameService = new SDIFrameServiceProvider(); ! HistoryServiceProvider historyProvider = new HistoryServiceProvider( ! new HistoryService.Holder() ! { ! public void loadResource(URL url, Object context) ! { ! } ! }, 4); ! AboutServiceProvider aboutProvider = new AboutServiceProvider(); ! ! // Add a window hook ! frameService.addWindowListener( ! new WindowAdapter() ! { ! public void windowClosing(WindowEvent e) ! { ! super.windowClosing(e); ! System.exit(0); ! } ! }); ! ! BeanContextTreePanel panel = new BeanContextTreePanel(this); ! frameService.setContent(panel); ! ! this.add(frameService); ! this.add(aboutProvider); ! this.add(historyProvider); ! } ! ! ! /** ! * The main program for the TestTree class ! * ! * @param args The command line arguments ! * @exception Exception Description of the Exception ! */ ! public static void main(String[] args) ! throws Exception ! { ! final TestTreePanel test = new TestTreePanel(); ! ! Thread t = ! new Thread() ! { ! public void run() ! { ! try ! { ! for (int i = 0; i < 10; i++) ! { ! Thread.sleep(1000); ! test.add(new AboutServiceProvider()); ! } ! } ! catch (Exception e) ! { ! } ! } ! }; ! t.start(); ! } ! } |
Update of /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action/edit In directory sc8-pr-cvs1:/tmp/cvs-serv19233/adwt/src/main/org/ejtools/adwt/action/edit Modified Files: CopyAction.java CutAction.java DeleteAction.java DeselectAllAction.java PasteAction.java SelectAllAction.java Log Message: Add more javadocs. Add package.html files. Index: CopyAction.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action/edit/CopyAction.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CopyAction.java 15 Sep 2003 22:37:13 -0000 1.8 --- CopyAction.java 13 Dec 2003 21:29:34 -0000 1.9 *************** *** 21,25 **** public class CopyAction extends CommandAction { ! /** Description of the Field */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); --- 21,25 ---- public class CopyAction extends CommandAction { ! /** Resource Bundle */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); Index: CutAction.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action/edit/CutAction.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CutAction.java 15 Sep 2003 22:37:13 -0000 1.8 --- CutAction.java 13 Dec 2003 21:29:34 -0000 1.9 *************** *** 21,25 **** public class CutAction extends CommandAction { ! /** Description of the Field */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); --- 21,25 ---- public class CutAction extends CommandAction { ! /** Resource Bundle */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); Index: DeleteAction.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action/edit/DeleteAction.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DeleteAction.java 15 Sep 2003 22:37:13 -0000 1.7 --- DeleteAction.java 13 Dec 2003 21:29:34 -0000 1.8 *************** *** 21,25 **** public class DeleteAction extends CommandAction { ! /** Description of the Field */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); --- 21,25 ---- public class DeleteAction extends CommandAction { ! /** Resource Bundle */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); Index: DeselectAllAction.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action/edit/DeselectAllAction.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DeselectAllAction.java 15 Sep 2003 22:37:13 -0000 1.8 --- DeselectAllAction.java 13 Dec 2003 21:29:34 -0000 1.9 *************** *** 21,25 **** public class DeselectAllAction extends CommandAction { ! /** Description of the Field */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); --- 21,25 ---- public class DeselectAllAction extends CommandAction { ! /** Resource Bundle */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); Index: PasteAction.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action/edit/PasteAction.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PasteAction.java 15 Sep 2003 22:37:13 -0000 1.8 --- PasteAction.java 13 Dec 2003 21:29:34 -0000 1.9 *************** *** 21,25 **** public class PasteAction extends CommandAction { ! /** Description of the Field */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); --- 21,25 ---- public class PasteAction extends CommandAction { ! /** Resource Bundle */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); Index: SelectAllAction.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action/edit/SelectAllAction.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SelectAllAction.java 15 Sep 2003 22:37:13 -0000 1.8 --- SelectAllAction.java 13 Dec 2003 21:29:34 -0000 1.9 *************** *** 21,25 **** public class SelectAllAction extends CommandAction { ! /** Description of the Field */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); --- 21,25 ---- public class SelectAllAction extends CommandAction { ! /** Resource Bundle */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); |
From: <let...@us...> - 2003-12-14 09:48:39
|
Update of /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action/action In directory sc8-pr-cvs1:/tmp/cvs-serv19233/adwt/src/main/org/ejtools/adwt/action/action Modified Files: RefreshAction.java Log Message: Add more javadocs. Add package.html files. Index: RefreshAction.java =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/src/main/org/ejtools/adwt/action/action/RefreshAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RefreshAction.java 15 Sep 2003 22:37:12 -0000 1.4 --- RefreshAction.java 13 Dec 2003 21:29:34 -0000 1.5 *************** *** 13,17 **** /** ! * Description of the Class * * @author Laurent Etiemble --- 13,17 ---- /** ! * * * @author Laurent Etiemble *************** *** 21,25 **** public class RefreshAction extends CommandAction { ! /** Description of the Field */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); --- 21,25 ---- public class RefreshAction extends CommandAction { ! /** Resource Bundle */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.adwt.action.Resources"); |
From: <let...@us...> - 2003-12-14 09:48:38
|
Update of /cvsroot/ejtools/libraries/adwt In directory sc8-pr-cvs1:/tmp/cvs-serv19233/adwt Modified Files: project.xml Log Message: Add more javadocs. Add package.html files. Index: project.xml =================================================================== RCS file: /cvsroot/ejtools/libraries/adwt/project.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** project.xml 8 Mar 2003 20:52:12 -0000 1.2 --- project.xml 13 Dec 2003 21:29:33 -0000 1.3 *************** *** 19,29 **** <dependencies> <dependency> - <id>log4j</id> - <version>1.2.7</version> - </dependency> - <dependency> <id>mx4j</id> <artifactId>mx4j-jmx</artifactId> ! <version>1.1</version> </dependency> <!-- Project dependencies --> --- 19,25 ---- <dependencies> <dependency> <id>mx4j</id> <artifactId>mx4j-jmx</artifactId> ! <version>1.1.1</version> </dependency> <!-- Project dependencies --> |
Update of /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service In directory sc8-pr-cvs1:/tmp/cvs-serv18971/common/src/main/org/ejtools/util/service Modified Files: Profile.java ProfileHolder.java ProfileMetaData.java ProfileService.java ProfileServiceProvider.java Added Files: package.html Log Message: Add more javadocs. Add package.html files. --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> </body> </html> Index: Profile.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service/Profile.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Profile.java 15 Sep 2003 22:23:45 -0000 1.2 --- Profile.java 13 Dec 2003 21:27:49 -0000 1.3 *************** *** 1,58 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.util.service; ! ! import java.util.Properties; ! ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class Profile extends Properties ! { ! /** Description of the Field */ ! private String name = null; ! ! ! /**Constructor for the Profile object */ ! public Profile() ! { ! super(); ! } ! ! ! /** ! * Returns the name. ! * ! * @return String ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Sets the name. ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * @return Description of the Return Value ! */ ! public String toString() ! { ! return this.name; ! } ! } --- 1,58 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.util.service; ! ! import java.util.Properties; ! ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class Profile extends Properties ! { ! /** Description of the Field */ ! private String name = null; ! ! ! /**Constructor for the Profile object */ ! public Profile() ! { ! super(); ! } ! ! ! /** ! * Returns the name. ! * ! * @return String ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Sets the name. ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * @return Description of the Return Value ! */ ! public String toString() ! { ! return this.name; ! } ! } Index: ProfileHolder.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service/ProfileHolder.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProfileHolder.java 15 Sep 2003 22:23:45 -0000 1.1 --- ProfileHolder.java 13 Dec 2003 21:27:49 -0000 1.2 *************** *** 1,24 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.util.service; ! ! ! /** ! * Description of the Interface ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public interface ProfileHolder ! { ! /** ! * Sets the profile attribute of the ProfileHolder object ! * ! * @param profile The new profile value ! */ ! void setProfile(Profile profile); ! } --- 1,24 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.util.service; ! ! ! /** ! * Description of the Interface ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public interface ProfileHolder ! { ! /** ! * Sets the profile attribute of the ProfileHolder object ! * ! * @param profile The new profile value ! */ ! void setProfile(Profile profile); ! } Index: ProfileMetaData.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service/ProfileMetaData.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ProfileMetaData.java 15 Sep 2003 22:23:45 -0000 1.2 --- ProfileMetaData.java 13 Dec 2003 21:27:49 -0000 1.3 *************** *** 1,48 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.util.service; ! ! import java.io.Serializable; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public interface ProfileMetaData extends Serializable ! { ! /** ! * Gets the fileName attribute of the ConnectionMetaData object ! * ! * @return The fileName value ! */ ! public String getFileName(); ! ! ! /** ! * Gets the key attribute of the ConnectionMetaData object ! * ! * @param index Description of the Parameter ! * @return The key value ! */ ! public String getKey(int index); ! ! ! /** ! * Gets the keys attribute of the ConnectionMetaData object ! * ! * @return The keys value ! */ ! public String[] getKeys(); ! ! ! /** ! * Gets the prefix attribute of the ConnectionMetaData object ! * ! * @return The prefix value ! */ ! public String getPrefix(); ! } --- 1,48 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.util.service; ! ! import java.io.Serializable; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public interface ProfileMetaData extends Serializable ! { ! /** ! * Gets the fileName attribute of the ConnectionMetaData object ! * ! * @return The fileName value ! */ ! public String getFileName(); ! ! ! /** ! * Gets the key attribute of the ConnectionMetaData object ! * ! * @param index Description of the Parameter ! * @return The key value ! */ ! public String getKey(int index); ! ! ! /** ! * Gets the keys attribute of the ConnectionMetaData object ! * ! * @return The keys value ! */ ! public String[] getKeys(); ! ! ! /** ! * Gets the prefix attribute of the ConnectionMetaData object ! * ! * @return The prefix value ! */ ! public String getPrefix(); ! } Index: ProfileService.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service/ProfileService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ProfileService.java 15 Sep 2003 22:23:45 -0000 1.2 --- ProfileService.java 13 Dec 2003 21:27:49 -0000 1.3 *************** *** 1,32 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.util.service; ! ! import java.io.Serializable; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public interface ProfileService extends Serializable ! { ! /** ! * Gets the metaDatas attribute of the FactoryService object ! * ! * @return The metaDatas value ! */ ! public Profile[] getProfiles(); ! ! ! /** ! * Gets the metaData attribute of the FactoryService object ! * ! * @param index Description of the Parameter ! * @return The metaData value ! */ ! public Profile getProfile(int index); ! } --- 1,32 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.util.service; ! ! import java.io.Serializable; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public interface ProfileService extends Serializable ! { ! /** ! * Gets the metaDatas attribute of the FactoryService object ! * ! * @return The metaDatas value ! */ ! public Profile[] getProfiles(); ! ! ! /** ! * Gets the metaData attribute of the FactoryService object ! * ! * @param index Description of the Parameter ! * @return The metaData value ! */ ! public Profile getProfile(int index); ! } Index: ProfileServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/service/ProfileServiceProvider.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ProfileServiceProvider.java 15 Sep 2003 22:23:45 -0000 1.3 --- ProfileServiceProvider.java 13 Dec 2003 21:27:49 -0000 1.4 *************** *** 1,169 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.util.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.io.IOException; ! import java.io.InputStream; ! import java.util.Arrays; ! import java.util.Enumeration; ! import java.util.Iterator; ! import java.util.Properties; ! import java.util.Vector; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class ProfileServiceProvider extends CustomBeanContextServiceProvider implements ProfileService ! { ! /** Description of the Field */ ! protected ProfileMetaData metadata = null; ! /** Description of the Field */ ! protected Profile[] profiles = null; ! /** Description of the Field */ ! protected ProfileService service = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ProfileServiceProvider.class); ! ! ! /** ! * Constructor for the FactoryServiceProvider object ! * ! * @param metadata Description of the Parameter ! */ ! public ProfileServiceProvider(ProfileMetaData metadata) ! { ! service = this; ! this.metadata = metadata; ! this.load(); ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * @param index Description of the Parameter ! * @return The metaData value ! */ ! public Profile getProfile(int index) ! { ! Profile profile = this.profiles[index]; ! return (Profile) profile.clone(); ! } ! ! ! /** ! * @return The metaDatas value ! */ ! public Profile[] getProfiles() ! { ! return this.profiles; ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{ProfileService.class}; ! } ! ! ! /** */ ! private void load() ! { ! this.profiles = new Profile[0]; ! ! try ! { ! String prefix = this.metadata.getPrefix(); ! InputStream in = ProfileServiceProvider.class.getResourceAsStream(this.metadata.getFileName()); ! if (in != null) ! { ! Properties props = new Properties(); ! props.load(in); ! in.close(); ! ! Vector keys = new Vector(); ! Enumeration enum = props.keys(); ! while (enum.hasMoreElements()) ! { ! String key = (String) enum.nextElement(); ! if ((key.startsWith(prefix + ".")) && (key.endsWith(".name"))) ! { ! keys.add(key.substring((prefix + ".").length(), key.indexOf(".name"))); ! } ! } ! ! this.profiles = new Profile[keys.size()]; ! String[] orderedKeys = (String[]) keys.toArray(new String[0]); ! Arrays.sort(orderedKeys); ! ! for (int i = 0; i < orderedKeys.length; i++) ! { ! String key = orderedKeys[i]; ! logger.debug("Loading key " + key); ! ! Profile data = new Profile(); ! data.setName(props.getProperty(prefix + "." + key + ".name")); ! ! for (int j = 0; j < this.metadata.getKeys().length; j++) ! { ! data.setProperty(this.metadata.getKey(j), props.getProperty(prefix + "." + key + "." + this.metadata.getKey(j), "")); ! } ! ! this.profiles[i] = data; ! } ! } ! } ! catch (IOException e) ! { ! logger.error("Error while loading profiles", e); ! } ! } ! } --- 1,169 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.util.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.io.IOException; ! import java.io.InputStream; ! import java.util.Arrays; ! import java.util.Enumeration; ! import java.util.Iterator; ! import java.util.Properties; ! import java.util.Vector; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class ProfileServiceProvider extends CustomBeanContextServiceProvider implements ProfileService ! { ! /** Description of the Field */ ! protected ProfileMetaData metadata = null; ! /** Description of the Field */ ! protected Profile[] profiles = null; ! /** Description of the Field */ ! protected ProfileService service = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ProfileServiceProvider.class); ! ! ! /** ! * Constructor for the FactoryServiceProvider object ! * ! * @param metadata Description of the Parameter ! */ ! public ProfileServiceProvider(ProfileMetaData metadata) ! { ! service = this; ! this.metadata = metadata; ! this.load(); ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * @param index Description of the Parameter ! * @return The metaData value ! */ ! public Profile getProfile(int index) ! { ! Profile profile = this.profiles[index]; ! return (Profile) profile.clone(); ! } ! ! ! /** ! * @return The metaDatas value ! */ ! public Profile[] getProfiles() ! { ! return this.profiles; ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{ProfileService.class}; ! } ! ! ! /** */ ! private void load() ! { ! this.profiles = new Profile[0]; ! ! try ! { ! String prefix = this.metadata.getPrefix(); ! InputStream in = ProfileServiceProvider.class.getResourceAsStream(this.metadata.getFileName()); ! if (in != null) ! { ! Properties props = new Properties(); ! props.load(in); ! in.close(); ! ! Vector keys = new Vector(); ! Enumeration enum = props.keys(); ! while (enum.hasMoreElements()) ! { ! String key = (String) enum.nextElement(); ! if ((key.startsWith(prefix + ".")) && (key.endsWith(".name"))) ! { ! keys.add(key.substring((prefix + ".").length(), key.indexOf(".name"))); ! } ! } ! ! this.profiles = new Profile[keys.size()]; ! String[] orderedKeys = (String[]) keys.toArray(new String[0]); ! Arrays.sort(orderedKeys); ! ! for (int i = 0; i < orderedKeys.length; i++) ! { ! String key = orderedKeys[i]; ! logger.debug("Loading key " + key); ! ! Profile data = new Profile(); ! data.setName(props.getProperty(prefix + "." + key + ".name")); ! ! for (int j = 0; j < this.metadata.getKeys().length; j++) ! { ! data.setProperty(this.metadata.getKey(j), props.getProperty(prefix + "." + key + "." + this.metadata.getKey(j), "")); ! } ! ! this.profiles[i] = data; ! } ! } ! } ! catch (IOException e) ! { ! logger.error("Error while loading profiles", e); ! } ! } ! } |
From: <let...@us...> - 2003-12-14 09:48:37
|
Update of /cvsroot/ejtools/libraries/common/src/main/org/ejtools/util/export In directory sc8-pr-cvs1:/tmp/cvs-serv18971/common/src/main/org/ejtools/util/export Added Files: CSVFileTools.java PNGFileTools.java package.html Log Message: Add more javadocs. Add package.html files. --- NEW FILE: CSVFileTools.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package org.ejtools.util.export; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ResourceBundle; import javax.swing.filechooser.FileFilter; import org.apache.log4j.Logger; import org.ejtools.util.FileTools; /** * Description of the Class * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public class CSVFileTools extends FileTools { /** Description of the Field */ private static Logger logger = Logger.getLogger(CSVFileTools.class); /** Description of the Field */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.util.Resources"); /** Description of the Field */ public final static FileFilter CSV_FILE_FILTER = new FileTools.SimpleFileFilter(".csv", resources.getString("csv.file.dialog.extension.description")); /** Constructor for the FileUtil object */ protected CSVFileTools() { } /** * Description of the Method * * @param output Description of the Parameter * @param content Description of the Parameter */ public static void exportAsCVS(StringBuffer content, File output) { try { FileWriter writer = new FileWriter(output); writer.write(content.toString()); writer.flush(); writer.close(); } catch (IOException ioe) { logger.error("Can't export content as CSV", ioe); } } } --- NEW FILE: PNGFileTools.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package org.ejtools.util.export; import java.awt.Component; import java.awt.image.BufferedImage; import java.awt.image.RenderedImage; import java.io.File; import java.io.IOException; import java.util.ResourceBundle; import javax.swing.filechooser.FileFilter; import org.apache.log4j.Logger; import org.ejtools.util.FileTools; import org.ejtools.util.Platform; /** * Description of the Class * * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public class PNGFileTools extends FileTools { /** Description of the Field */ private static Logger logger = Logger.getLogger(PNGFileTools.class); /** Description of the Field */ private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.util.Resources"); /** Description of the Field */ public final static FileFilter PNG_FILE_FILTER = new FileTools.SimpleFileFilter(".png", resources.getString("png.file.dialog.extension.description")); /** Constructor for the FileUtil object */ protected PNGFileTools() { } /** * Description of the Method * * @param image Description of the Parameter * @param output Description of the Parameter */ public static void exportAsPNG(RenderedImage image, File output) { if (Platform.isJavaVersionCompatible(Platform.JAVA_1_4)) { try { // Qualified name is mandatory javax.imageio.ImageIO.write(image, "PNG", output); } catch (IOException ioe) { logger.error("Can't export image as PNG", ioe); } } } /** * Description of the Method * * @param component Description of the Parameter * @param output Description of the Parameter */ public static void exportAsPNG(Component component, File output) { if (Platform.isJavaVersionCompatible(Platform.JAVA_1_4)) { try { BufferedImage image = paintAsPNG(component); // Qualified name is mandatory javax.imageio.ImageIO.write(image, "PNG", output); } catch (IOException ioe) { logger.error("Can't export image as PNG", ioe); } } } /** * Description of the Method * * @param component Description of the Parameter * @return Description of the Return Value */ public static BufferedImage paintAsPNG(Component component) { BufferedImage image = null; image = new BufferedImage(component.getWidth(), component.getHeight(), BufferedImage.TYPE_INT_ARGB); component.paint(image.getGraphics()); return image; } } --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> </body> </html> |
Update of /cvsroot/ejtools/libraries/common/src/main/org/ejtools/jmx In directory sc8-pr-cvs1:/tmp/cvs-serv18971/common/src/main/org/ejtools/jmx Modified Files: MBeanAccessor.java MBeanInvokeAccessor.java MBeanServerProxy.java ObjectNameFinder.java Added Files: package.html Log Message: Add more javadocs. Add package.html files. --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> </body> </html> Index: MBeanAccessor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/jmx/MBeanAccessor.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MBeanAccessor.java 15 Sep 2003 22:23:45 -0000 1.7 --- MBeanAccessor.java 13 Dec 2003 21:27:49 -0000 1.8 *************** *** 1,119 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx; ! ! import javax.management.Attribute; ! import javax.management.AttributeList; ! import javax.management.MBeanInfo; ! import javax.management.ObjectInstance; ! import javax.management.ObjectName; ! ! /** ! * Tag interface to be implemented by object that provides access to MBean informations ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo JavaDoc to complete ! */ ! public interface MBeanAccessor extends MBeanInvokeAccessor ! { ! /** ! * Gets the objectInstance attribute of the MBeanAccessor object ! * ! * @return The objectInstance value ! * @exception Exception Description of the Exception ! */ ! public ObjectInstance getObjectInstance() ! throws Exception; ! ! ! /** ! * Gets the attributes attribute of the MBeanAccessor object ! * ! * @param as Description of the Parameter ! * @return The attributes value ! * @exception Exception Description of the Exception ! */ ! public AttributeList getAttributes(String as[]) ! throws Exception; ! ! ! /** ! * Sets the attributes attribute of the MBeanAccessor object ! * ! * @param attributelist The new attributes value ! * @return Description of the Return Value ! * @exception Exception Description of the Exception ! */ ! public AttributeList setAttributes(AttributeList attributelist) ! throws Exception; ! ! ! /** ! * Gets the mBeanInfo attribute of the MBeanAccessor object ! * ! * @return The mBeanInfo value ! */ ! public MBeanInfo getMBeanInfo(); ! ! ! /** ! * Gets the instanceOf attribute of the MBeanAccessor object ! * ! * @param s Description of the Parameter ! * @return The instanceOf value ! * @exception Exception Description of the Exception ! */ ! public boolean isInstanceOf(String s) ! throws Exception; ! ! ! /** ! * Sets the attribute attribute of the MBeanAccessor object ! * ! * @param attribute The new attribute value ! * @exception Exception Description of the Exception ! */ ! public void setAttribute(Attribute attribute) ! throws Exception; ! ! ! /** ! * Gets the objectName attribute of the MBeanAccessor object ! * ! * @return The objectName value ! */ ! public ObjectName getObjectName(); ! ! ! /** ! * Gets the canonicalName attribute of the MBeanAccessor object ! * ! * @return The canonicalName value ! */ ! public String getCanonicalName(); ! ! ! /** ! * Gets the attribute attribute of the MBeanAccessor object ! * ! * @param attribute Description of the Parameter ! * @return The attribute value ! * @exception Exception Description of the Exception ! */ ! public Object getAttribute(String attribute) ! throws Exception; ! ! ! /** ! * Description of the Method ! * ! * @exception Exception Description of the Exception ! */ ! public void unregisterMBean() ! throws Exception; ! } --- 1,119 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx; ! ! import javax.management.Attribute; ! import javax.management.AttributeList; ! import javax.management.MBeanInfo; ! import javax.management.ObjectInstance; ! import javax.management.ObjectName; ! ! /** ! * Tag interface to be implemented by object that provides access to MBean informations ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo JavaDoc to complete ! */ ! public interface MBeanAccessor extends MBeanInvokeAccessor ! { ! /** ! * Gets the objectInstance attribute of the MBeanAccessor object ! * ! * @return The objectInstance value ! * @exception Exception Description of the Exception ! */ ! public ObjectInstance getObjectInstance() ! throws Exception; ! ! ! /** ! * Gets the attributes attribute of the MBeanAccessor object ! * ! * @param as Description of the Parameter ! * @return The attributes value ! * @exception Exception Description of the Exception ! */ ! public AttributeList getAttributes(String as[]) ! throws Exception; ! ! ! /** ! * Sets the attributes attribute of the MBeanAccessor object ! * ! * @param attributelist The new attributes value ! * @return Description of the Return Value ! * @exception Exception Description of the Exception ! */ ! public AttributeList setAttributes(AttributeList attributelist) ! throws Exception; ! ! ! /** ! * Gets the mBeanInfo attribute of the MBeanAccessor object ! * ! * @return The mBeanInfo value ! */ ! public MBeanInfo getMBeanInfo(); ! ! ! /** ! * Gets the instanceOf attribute of the MBeanAccessor object ! * ! * @param s Description of the Parameter ! * @return The instanceOf value ! * @exception Exception Description of the Exception ! */ ! public boolean isInstanceOf(String s) ! throws Exception; ! ! ! /** ! * Sets the attribute attribute of the MBeanAccessor object ! * ! * @param attribute The new attribute value ! * @exception Exception Description of the Exception ! */ ! public void setAttribute(Attribute attribute) ! throws Exception; ! ! ! /** ! * Gets the objectName attribute of the MBeanAccessor object ! * ! * @return The objectName value ! */ ! public ObjectName getObjectName(); ! ! ! /** ! * Gets the canonicalName attribute of the MBeanAccessor object ! * ! * @return The canonicalName value ! */ ! public String getCanonicalName(); ! ! ! /** ! * Gets the attribute attribute of the MBeanAccessor object ! * ! * @param attribute Description of the Parameter ! * @return The attribute value ! * @exception Exception Description of the Exception ! */ ! public Object getAttribute(String attribute) ! throws Exception; ! ! ! /** ! * Description of the Method ! * ! * @exception Exception Description of the Exception ! */ ! public void unregisterMBean() ! throws Exception; ! } Index: MBeanInvokeAccessor.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/jmx/MBeanInvokeAccessor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MBeanInvokeAccessor.java 15 Sep 2003 22:23:45 -0000 1.2 --- MBeanInvokeAccessor.java 13 Dec 2003 21:27:49 -0000 1.3 *************** *** 1,30 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx; ! ! ! /** ! * Tag interface to be implemented by object that provides access to MBean invoke method ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo JavaDoc to complete ! */ ! public interface MBeanInvokeAccessor ! { ! /** ! * Description of the Method ! * ! * @param action Description of the Parameter ! * @param params Description of the Parameter ! * @param signatures Description of the Parameter ! * @return Description of the Return Value ! * @exception Exception Description of the Exception ! */ ! public Object invoke(String action, Object[] params, String[] signatures) ! throws Exception; ! } --- 1,30 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx; ! ! ! /** ! * Tag interface to be implemented by object that provides access to MBean invoke method ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo JavaDoc to complete ! */ ! public interface MBeanInvokeAccessor ! { ! /** ! * Description of the Method ! * ! * @param action Description of the Parameter ! * @param params Description of the Parameter ! * @param signatures Description of the Parameter ! * @return Description of the Return Value ! * @exception Exception Description of the Exception ! */ ! public Object invoke(String action, Object[] params, String[] signatures) ! throws Exception; ! } Index: MBeanServerProxy.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/jmx/MBeanServerProxy.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MBeanServerProxy.java 15 Sep 2003 22:23:45 -0000 1.7 --- MBeanServerProxy.java 13 Dec 2003 21:27:49 -0000 1.8 *************** *** 1,99 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx; ! ! import java.lang.reflect.InvocationHandler; ! import java.lang.reflect.Method; ! import java.lang.reflect.Proxy; ! ! import javax.management.MBeanServer; ! ! /** ! * A proxy for object that provides MBeanServer fonctionnality ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class MBeanServerProxy implements InvocationHandler ! { ! /** The class to search the method on */ ! protected Class clazz = null; ! /** The real object */ ! protected Object object = null; ! /** Interface implemented by the proxy */ ! private final static Class[] INTERFACES = new Class[]{MBeanServer.class}; ! ! ! /** ! * Constructor for MBeanServerProxy. ! * ! * @param object Real object to proxy ! * @param clazz Class of the proxied object ! */ ! public MBeanServerProxy(Object object, Class clazz) ! { ! this.object = object; ! this.clazz = clazz; ! } ! ! ! /** ! * Invocation method. Delegates the method call to the real object. ! * ! * @param method Method called ! * @param args Method arguments ! * @param obj The method on which the invocation was made ! * @return The return value of the method ! * @exception Throwable In case of Exception ! */ ! public Object invoke(Object obj, Method method, Object[] args) ! throws Throwable ! { ! Method m = this.clazz.getMethod(method.getName(), method.getParameterTypes()); ! if (m != null) ! { ! ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader(); ! ! try ! { ! Thread.currentThread().setContextClassLoader(this.clazz.getClassLoader()); ! return m.invoke(this.object, args); ! } ! finally ! { ! Thread.currentThread().setContextClassLoader(ctxLoader); ! } ! } ! return null; ! } ! ! ! /** ! * Factory method to create a proxy ! * ! * @param object Real object to proxy ! * @return The proxy created ! */ ! public static MBeanServer createMBeanProxy(Object object) ! { ! return MBeanServerProxy.createMBeanProxy(object, object.getClass()); ! } ! ! ! /** ! * Factory method to create a proxy ! * ! * @param object Real object to proxy ! * @param clazz Class of the proxied object ! * @return The proxy created ! */ ! public static MBeanServer createMBeanProxy(Object object, Class clazz) ! { ! MBeanServerProxy proxy = new MBeanServerProxy(object, clazz); ! return (MBeanServer) Proxy.newProxyInstance(MBeanServerProxy.class.getClassLoader(), MBeanServerProxy.INTERFACES, proxy); ! } ! } --- 1,99 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx; ! ! import java.lang.reflect.InvocationHandler; ! import java.lang.reflect.Method; ! import java.lang.reflect.Proxy; ! ! import javax.management.MBeanServer; ! ! /** ! * A proxy for object that provides MBeanServer fonctionnality ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class MBeanServerProxy implements InvocationHandler ! { ! /** The class to search the method on */ ! protected Class clazz = null; ! /** The real object */ ! protected Object object = null; ! /** Interface implemented by the proxy */ ! private final static Class[] INTERFACES = new Class[]{MBeanServer.class}; ! ! ! /** ! * Constructor for MBeanServerProxy. ! * ! * @param object Real object to proxy ! * @param clazz Class of the proxied object ! */ ! public MBeanServerProxy(Object object, Class clazz) ! { ! this.object = object; ! this.clazz = clazz; ! } ! ! ! /** ! * Invocation method. Delegates the method call to the real object. ! * ! * @param method Method called ! * @param args Method arguments ! * @param obj The method on which the invocation was made ! * @return The return value of the method ! * @exception Throwable In case of Exception ! */ ! public Object invoke(Object obj, Method method, Object[] args) ! throws Throwable ! { ! Method m = this.clazz.getMethod(method.getName(), method.getParameterTypes()); ! if (m != null) ! { ! ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader(); ! ! try ! { ! Thread.currentThread().setContextClassLoader(this.clazz.getClassLoader()); ! return m.invoke(this.object, args); ! } ! finally ! { ! Thread.currentThread().setContextClassLoader(ctxLoader); ! } ! } ! return null; ! } ! ! ! /** ! * Factory method to create a proxy ! * ! * @param object Real object to proxy ! * @return The proxy created ! */ ! public static MBeanServer createMBeanProxy(Object object) ! { ! return MBeanServerProxy.createMBeanProxy(object, object.getClass()); ! } ! ! ! /** ! * Factory method to create a proxy ! * ! * @param object Real object to proxy ! * @param clazz Class of the proxied object ! * @return The proxy created ! */ ! public static MBeanServer createMBeanProxy(Object object, Class clazz) ! { ! MBeanServerProxy proxy = new MBeanServerProxy(object, clazz); ! return (MBeanServer) Proxy.newProxyInstance(MBeanServerProxy.class.getClassLoader(), MBeanServerProxy.INTERFACES, proxy); ! } ! } Index: ObjectNameFinder.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/jmx/ObjectNameFinder.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ObjectNameFinder.java 15 Sep 2003 22:23:45 -0000 1.6 --- ObjectNameFinder.java 13 Dec 2003 21:27:49 -0000 1.7 *************** *** 1,24 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx; ! ! ! /** ! * Interface implemented by structure that allows ObjectName search by canonical string. ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public interface ObjectNameFinder ! { ! /** ! * Search an ObjectName by its canonical string ! * ! * @param objectName Canonical value of the ObjectName to search ! */ ! public void findObjectName(String objectName); ! } --- 1,24 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx; ! ! ! /** ! * Interface implemented by structure that allows ObjectName search by canonical string. ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public interface ObjectNameFinder ! { ! /** ! * Search an ObjectName by its canonical string ! * ! * @param objectName Canonical value of the ObjectName to search ! */ ! public void findObjectName(String objectName); ! } |
Update of /cvsroot/ejtools/libraries/common/src/main/org/ejtools/swing/table In directory sc8-pr-cvs1:/tmp/cvs-serv18971/common/src/main/org/ejtools/swing/table Modified Files: TableModelDecorator.java TableModelFilter.java TableModelIndexed.java TableModelMatchFilter.java TableModelSorter.java Added Files: package.html Log Message: Add more javadocs. Add package.html files. --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides decorators for javax.swing.TableModel. Allows filtering, indexing and sorting. </body> </html> Index: TableModelDecorator.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/swing/table/TableModelDecorator.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TableModelDecorator.java 15 Sep 2003 22:23:45 -0000 1.8 --- TableModelDecorator.java 13 Dec 2003 21:27:49 -0000 1.9 *************** *** 1,143 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.swing.table; ! ! import javax.swing.event.TableModelEvent; ! import javax.swing.event.TableModelListener; ! import javax.swing.table.AbstractTableModel; ! import javax.swing.table.TableModel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public abstract class TableModelDecorator extends AbstractTableModel implements TableModelListener ! { ! /** Description of the Field */ ! protected TableModel model = null; ! ! ! /** ! * Constructor for TableFilter. ! * ! * @param model Description of the Parameter ! */ ! public TableModelDecorator(TableModel model) ! { ! this.model = model; ! this.model.addTableModelListener(this); ! } ! ! ! /** Constructor for TableModelDecorator. */ ! protected TableModelDecorator() ! { ! super(); ! } ! ! ! /** ! * @param column Description of the Parameter ! * @return The columnClass value ! */ ! public Class getColumnClass(int column) ! { ! return this.model.getColumnClass(column); ! } ! ! ! /** ! * @return The columnCount value ! */ ! public int getColumnCount() ! { ! return this.model.getColumnCount(); ! } ! ! ! /** ! * @param column Description of the Parameter ! * @return The columnName value ! */ ! public String getColumnName(int column) ! { ! return this.model.getColumnName(column); ! } ! ! ! /** ! * Returns the model. ! * ! * @return TableModel ! */ ! public TableModel getModel() ! { ! return this.model; ! } ! ! ! /** ! * @return The rowCount value ! */ ! public int getRowCount() ! { ! return this.model.getRowCount(); ! } ! ! ! /** ! * @param row Description of the Parameter ! * @param column Description of the Parameter ! * @return The valueAt value ! */ ! public Object getValueAt(int row, int column) ! { ! return this.model.getValueAt(row, column); ! } ! ! ! /** ! * @param row Description of the Parameter ! * @param column Description of the Parameter ! * @return The cellEditable value ! */ ! public boolean isCellEditable(int row, int column) ! { ! return this.model.isCellEditable(row, column); ! } ! ! ! /** ! * Sets the model. ! * ! * @param model The model to set ! */ ! public void setModel(TableModel model) ! { ! this.model = model; ! } ! ! ! /** ! * @param o The new valueAt value ! * @param row The new valueAt value ! * @param column The new valueAt value ! */ ! public void setValueAt(Object o, int row, int column) ! { ! this.model.setValueAt(o, row, column); ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void tableChanged(TableModelEvent event) ! { ! this.fireTableChanged(event); ! } ! } --- 1,143 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.swing.table; ! ! import javax.swing.event.TableModelEvent; ! import javax.swing.event.TableModelListener; ! import javax.swing.table.AbstractTableModel; ! import javax.swing.table.TableModel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public abstract class TableModelDecorator extends AbstractTableModel implements TableModelListener ! { ! /** Description of the Field */ ! protected TableModel model = null; ! ! ! /** ! * Constructor for TableFilter. ! * ! * @param model Description of the Parameter ! */ ! public TableModelDecorator(TableModel model) ! { ! this.model = model; ! this.model.addTableModelListener(this); ! } ! ! ! /** Constructor for TableModelDecorator. */ ! protected TableModelDecorator() ! { ! super(); ! } ! ! ! /** ! * @param column Description of the Parameter ! * @return The columnClass value ! */ ! public Class getColumnClass(int column) ! { ! return this.model.getColumnClass(column); ! } ! ! ! /** ! * @return The columnCount value ! */ ! public int getColumnCount() ! { ! return this.model.getColumnCount(); ! } ! ! ! /** ! * @param column Description of the Parameter ! * @return The columnName value ! */ ! public String getColumnName(int column) ! { ! return this.model.getColumnName(column); ! } ! ! ! /** ! * Returns the model. ! * ! * @return TableModel ! */ ! public TableModel getModel() ! { ! return this.model; ! } ! ! ! /** ! * @return The rowCount value ! */ ! public int getRowCount() ! { ! return this.model.getRowCount(); ! } ! ! ! /** ! * @param row Description of the Parameter ! * @param column Description of the Parameter ! * @return The valueAt value ! */ ! public Object getValueAt(int row, int column) ! { ! return this.model.getValueAt(row, column); ! } ! ! ! /** ! * @param row Description of the Parameter ! * @param column Description of the Parameter ! * @return The cellEditable value ! */ ! public boolean isCellEditable(int row, int column) ! { ! return this.model.isCellEditable(row, column); ! } ! ! ! /** ! * Sets the model. ! * ! * @param model The model to set ! */ ! public void setModel(TableModel model) ! { ! this.model = model; ! } ! ! ! /** ! * @param o The new valueAt value ! * @param row The new valueAt value ! * @param column The new valueAt value ! */ ! public void setValueAt(Object o, int row, int column) ! { ! this.model.setValueAt(o, row, column); ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void tableChanged(TableModelEvent event) ! { ! this.fireTableChanged(event); ! } ! } Index: TableModelFilter.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/swing/table/TableModelFilter.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TableModelFilter.java 15 Sep 2003 22:23:45 -0000 1.6 --- TableModelFilter.java 13 Dec 2003 21:27:49 -0000 1.7 *************** *** 1,86 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.swing.table; ! ! import javax.swing.event.TableModelEvent; ! import javax.swing.table.TableModel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public abstract class TableModelFilter extends TableModelIndexed ! { ! /** Description of the Field */ ! protected int column = -1; ! /** Description of the Field */ ! protected Object[] values; ! ! ! /** ! * Constructor for TableModelFilter. ! * ! * @param model ! */ ! public TableModelFilter(TableModel model) ! { ! super(model); ! } ! ! ! /** ! * Description of the Method ! * ! * @param column Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void filter(int column, Object value) ! { ! this.filter(column, new Object[]{value}); ! } ! ! ! /** Description of the Method */ ! public abstract void filter(); ! ! ! /** ! * Description of the Method ! * ! * @param column Description of the Parameter ! * @param values Description of the Parameter ! */ ! public void filter(int column, Object[] values) ! { ! this.column = column; ! this.values = values; ! this.filter(); ! super.tableChanged(new TableModelEvent(this)); ! } ! ! ! /** ! * Gets the column attribute of the TableModelFilter object ! * ! * @return The column value ! */ ! public int getColumn() ! { ! return column; ! } ! ! ! /** ! * Gets the values attribute of the TableModelFilter object ! * ! * @return The values value ! */ ! public Object[] getValues() ! { ! return values; ! } ! } --- 1,86 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.swing.table; ! ! import javax.swing.event.TableModelEvent; ! import javax.swing.table.TableModel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public abstract class TableModelFilter extends TableModelIndexed ! { ! /** Description of the Field */ ! protected int column = -1; ! /** Description of the Field */ ! protected Object[] values; ! ! ! /** ! * Constructor for TableModelFilter. ! * ! * @param model ! */ ! public TableModelFilter(TableModel model) ! { ! super(model); ! } ! ! ! /** ! * Description of the Method ! * ! * @param column Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void filter(int column, Object value) ! { ! this.filter(column, new Object[]{value}); ! } ! ! ! /** Description of the Method */ ! public abstract void filter(); ! ! ! /** ! * Description of the Method ! * ! * @param column Description of the Parameter ! * @param values Description of the Parameter ! */ ! public void filter(int column, Object[] values) ! { ! this.column = column; ! this.values = values; ! this.filter(); ! super.tableChanged(new TableModelEvent(this)); ! } ! ! ! /** ! * Gets the column attribute of the TableModelFilter object ! * ! * @return The column value ! */ ! public int getColumn() ! { ! return column; ! } ! ! ! /** ! * Gets the values attribute of the TableModelFilter object ! * ! * @return The values value ! */ ! public Object[] getValues() ! { ! return values; ! } ! } Index: TableModelIndexed.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/swing/table/TableModelIndexed.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TableModelIndexed.java 15 Sep 2003 22:23:45 -0000 1.7 --- TableModelIndexed.java 13 Dec 2003 21:27:49 -0000 1.8 *************** *** 1,90 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.swing.table; ! ! import javax.swing.table.TableModel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public abstract class TableModelIndexed extends TableModelDecorator ! { ! /** Description of the Field */ ! protected int[] indexes = new int[0]; ! ! ! /** ! * Constructor for TableFilter. ! * ! * @param model ! */ ! public TableModelIndexed(TableModel model) ! { ! super(model); ! } ! ! ! /** ! * Gets the rowCount attribute of the TableFilter object ! * ! * @return The rowCount value ! */ ! public int getRowCount() ! { ! return this.indexes.length; ! } ! ! ! /** ! * Gets the valueAt attribute of the TableFilter object ! * ! * @param row Description of the Parameter ! * @param column Description of the Parameter ! * @return The valueAt value ! */ ! public Object getValueAt(int row, int column) ! { ! return this.model.getValueAt(this.indexes[row], column); ! } ! ! ! /** ! * @param model The new model value ! */ ! public void setModel(TableModel model) ! { ! super.setModel(model); ! } ! ! ! /** ! * Sets the valueAt attribute of the TableFilter object ! * ! * @param newValue The new valueAt value ! * @param row The new valueAt value ! * @param column The new valueAt value ! */ ! public void setValueAt(Object newValue, int row, int column) ! { ! this.model.setValueAt(newValue, this.indexes[row], column); ! } ! ! ! /** ! * Description of the Method ! * ! * @param i Description of the Parameter ! * @param j Description of the Parameter ! */ ! protected void swap(int i, int j) ! { ! int tmp = indexes[i]; ! indexes[i] = indexes[j]; ! indexes[j] = tmp; ! } ! } --- 1,90 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.swing.table; ! ! import javax.swing.table.TableModel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public abstract class TableModelIndexed extends TableModelDecorator ! { ! /** Description of the Field */ ! protected int[] indexes = new int[0]; ! ! ! /** ! * Constructor for TableFilter. ! * ! * @param model ! */ ! public TableModelIndexed(TableModel model) ! { ! super(model); ! } ! ! ! /** ! * Gets the rowCount attribute of the TableFilter object ! * ! * @return The rowCount value ! */ ! public int getRowCount() ! { ! return this.indexes.length; ! } ! ! ! /** ! * Gets the valueAt attribute of the TableFilter object ! * ! * @param row Description of the Parameter ! * @param column Description of the Parameter ! * @return The valueAt value ! */ ! public Object getValueAt(int row, int column) ! { ! return this.model.getValueAt(this.indexes[row], column); ! } ! ! ! /** ! * @param model The new model value ! */ ! public void setModel(TableModel model) ! { ! super.setModel(model); ! } ! ! ! /** ! * Sets the valueAt attribute of the TableFilter object ! * ! * @param newValue The new valueAt value ! * @param row The new valueAt value ! * @param column The new valueAt value ! */ ! public void setValueAt(Object newValue, int row, int column) ! { ! this.model.setValueAt(newValue, this.indexes[row], column); ! } ! ! ! /** ! * Description of the Method ! * ! * @param i Description of the Parameter ! * @param j Description of the Parameter ! */ ! protected void swap(int i, int j) ! { ! int tmp = indexes[i]; ! indexes[i] = indexes[j]; ! indexes[j] = tmp; ! } ! } Index: TableModelMatchFilter.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/swing/table/TableModelMatchFilter.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TableModelMatchFilter.java 15 Sep 2003 22:23:45 -0000 1.7 --- TableModelMatchFilter.java 13 Dec 2003 21:27:49 -0000 1.8 *************** *** 1,68 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.swing.table; ! ! import java.util.ArrayList; ! ! import javax.swing.table.TableModel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class TableModelMatchFilter extends TableModelFilter ! { ! /** Description of the Field */ ! protected ArrayList tempIndexes = new ArrayList(); ! ! ! /** ! * Constructor for TableModelMatchFilter. ! * ! * @param model ! */ ! public TableModelMatchFilter(TableModel model) ! { ! super(model); ! } ! ! ! /** */ ! public synchronized void filter() ! { ! this.tempIndexes.clear(); ! int rows = this.model.getRowCount(); ! ! if (this.column < 0) ! { ! for (int row = 0; row < rows; row++) ! { ! this.tempIndexes.add(new Integer(row)); ! } ! } ! else ! { ! for (int row = 0; row < rows; row++) ! { ! Object value = model.getValueAt(row, column); ! for (int i = 0; i < values.length; i++) ! { ! if (values[i].equals(value)) ! { ! tempIndexes.add(new Integer(row)); ! } ! } ! } ! } ! ! this.indexes = new int[this.tempIndexes.size()]; ! for (int i = 0; i < this.indexes.length; i++) ! { ! this.indexes[i] = ((Integer) this.tempIndexes.get(i)).intValue(); ! } ! } ! } --- 1,68 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.swing.table; ! ! import java.util.ArrayList; ! ! import javax.swing.table.TableModel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class TableModelMatchFilter extends TableModelFilter ! { ! /** Description of the Field */ ! protected ArrayList tempIndexes = new ArrayList(); ! ! ! /** ! * Constructor for TableModelMatchFilter. ! * ! * @param model ! */ ! public TableModelMatchFilter(TableModel model) ! { ! super(model); ! } ! ! ! /** */ ! public synchronized void filter() ! { ! this.tempIndexes.clear(); ! int rows = this.model.getRowCount(); ! ! if (this.column < 0) ! { ! for (int row = 0; row < rows; row++) ! { ! this.tempIndexes.add(new Integer(row)); ! } ! } ! else ! { ! for (int row = 0; row < rows; row++) ! { ! Object value = model.getValueAt(row, column); ! for (int i = 0; i < values.length; i++) ! { ! if (values[i].equals(value)) ! { ! tempIndexes.add(new Integer(row)); ! } ! } ! } ! } ! ! this.indexes = new int[this.tempIndexes.size()]; ! for (int i = 0; i < this.indexes.length; i++) ! { ! this.indexes[i] = ((Integer) this.tempIndexes.get(i)).intValue(); ! } ! } ! } Index: TableModelSorter.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/swing/table/TableModelSorter.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TableModelSorter.java 15 Sep 2003 22:23:45 -0000 1.7 --- TableModelSorter.java 13 Dec 2003 21:27:49 -0000 1.8 *************** *** 1,487 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.swing.table; ! ! import java.awt.event.InputEvent; ! import java.awt.event.MouseAdapter; ! import java.awt.event.MouseEvent; ! import java.util.Date; ! import java.util.Vector; ! ! import javax.swing.JTable; ! import javax.swing.event.TableModelEvent; ! import javax.swing.table.JTableHeader; ! import javax.swing.table.TableColumnModel; ! import javax.swing.table.TableModel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class TableModelSorter extends TableModelIndexed ! { ! /** Description of the Field */ ! protected boolean ascending = true; ! /** Description of the Field */ ! protected int column = -1; ! /** Description of the Field */ ! protected int compares; ! /** Description of the Field */ ! protected Vector sortingColumns = new Vector(); ! ! ! /** ! * Constructor for TableModelSorter. ! * ! * @param model ! */ ! public TableModelSorter(TableModel model) ! { ! super(model); ! this.reallocateIndexes(); ! } ! ! ! /** ! * Add a mouse listener to the Table to trigger a table sort when a column ! * heading is clicked in the JTable. ! * ! * @param table The feature to be added to the MouseListenerToHeaderInTable ! * attribute ! */ ! public void addMouseListenerToHeaderInTable(JTable table) ! { ! final TableModelSorter tableSorter = this; ! final JTable tableView = table; ! tableView.setColumnSelectionAllowed(false); ! MouseAdapter listMouseListener = ! new MouseAdapter() ! { ! public void mouseClicked(MouseEvent e) ! { ! TableColumnModel columnModel = tableView.getColumnModel(); ! int viewColumn = columnModel.getColumnIndexAtX(e.getX()); ! int column = tableView.convertColumnIndexToModel(viewColumn); ! if (e.getClickCount() == 1 && column != -1) ! { ! int shiftPressed = e.getModifiers() & InputEvent.SHIFT_MASK; ! boolean ascending = (shiftPressed == 0); ! tableSorter.sortByColumn(column, ascending); ! } ! } ! }; ! JTableHeader th = tableView.getTableHeader(); ! th.addMouseListener(listMouseListener); ! } ! ! ! /** Description of the Method */ ! public void checkModel() ! { ! if (indexes.length != model.getRowCount()) ! { ! System.err.println("Sorter not informed of a change in model."); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param row1 Description of the Parameter ! * @param row2 Description of the Parameter ! * @return Description of the Return Value ! */ ! public int compare(int row1, int row2) ! { ! this.compares++; ! for (int level = 0; level < this.sortingColumns.size(); level++) ! { ! Integer column = (Integer) this.sortingColumns.elementAt(level); ! int result = this.compareRowsByColumn(row1, row2, column.intValue()); ! if (result != 0) ! { ! return this.ascending ? result : -result; ! } ! } ! return 0; ! } ! ! ! ! /** ! * Description of the Method ! * ! * @param row1 Description of the Parameter ! * @param row2 Description of the Parameter ! * @param column Description of the Parameter ! * @return Description of the Return Value ! */ ! public int compareRowsByColumn(int row1, int row2, int column) ! { ! Class type = this.model.getColumnClass(column); ! TableModel data = this.model; ! ! // Check for nulls. ! Object o1 = data.getValueAt(row1, column); ! Object o2 = data.getValueAt(row2, column); ! ! // If both values are null, return 0. ! if (o1 == null && o2 == null) ! { ! return 0; ! } ! else if (o1 == null) ! { ! // Define null less than everything. ! return -1; ! } ! else if (o2 == null) ! { ! return 1; ! } ! ! /* ! * We copy all returned values from the getValue call in case ! * an optimised model is reusing one object to return many ! * values. The Number subclasses in the JDK are immutable and ! * so will not be used in this way but other subclasses of ! * Number might want to do this to save space and avoid ! * unnecessary heap allocation. ! */ ! if (Comparable.class.isAssignableFrom(type)) ! { ! Comparable n1 = (Comparable) data.getValueAt(row1, column); ! Comparable n2 = (Comparable) data.getValueAt(row2, column); ! ! int result = n1.compareTo(n2); ! ! if (result < 0) ! { ! return -1; ! } ! else if (result > 0) ! { ! return 1; ! } ! else ! { ! return 0; ! } ! } ! else if (Number.class.isAssignableFrom(type)) ! { ! Number n1 = (Number) data.getValueAt(row1, column); ! double d1 = n1.doubleValue(); ! Number n2 = (Number) data.getValueAt(row2, column); ! double d2 = n2.doubleValue(); ! ! if (d1 < d2) ! { ! return -1; ! } ! else if (d1 > d2) ! { ! return 1; ! } ! else ! { ! return 0; ! } ! } ! else if (type == Date.class) ! { ! Date d1 = (Date) data.getValueAt(row1, column); ! long n1 = d1.getTime(); ! Date d2 = (Date) data.getValueAt(row2, column); ! long n2 = d2.getTime(); ! ! if (n1 < n2) ! { ! return -1; ! } ! else if (n1 > n2) ! { ! return 1; ! } ! else ! { ! return 0; ! } ! } ! else if (type == String.class) ! { ! String s1 = (String) data.getValueAt(row1, column); ! String s2 = (String) data.getValueAt(row2, column); ! int result = s1.compareTo(s2); ! ! if (result < 0) ! { ! return -1; ! } ! else if (result > 0) ! { ! return 1; ! } ! else ! { ! return 0; ! } ! } ! else if (type == Boolean.class) ! { ! Boolean bool1 = (Boolean) data.getValueAt(row1, column); ! boolean b1 = bool1.booleanValue(); ! Boolean bool2 = (Boolean) data.getValueAt(row2, column); ! boolean b2 = bool2.booleanValue(); ! ! if (b1 == b2) ! { ! return 0; ! } ! else if (b1) ! { ! // Define false < true ! return 1; ! } ! else ! { ! return -1; ! } ! } ! else ! { ! String comp1 = o1.toString(); ! String comp2 = o2.toString(); ! ! int result = comp1.compareTo(comp2); ! ! if (result < 0) ! { ! return -1; ! } ! else if (result > 0) ! { ! return 1; ! } ! else ! { ! return 0; ! } ! } ! } ! ! ! /** ! * Gets the column attribute of the TableModelSorter object ! * ! * @return The column value ! */ ! public int getColumn() ! { ! return this.column; ! } ! ! ! /** ! * Gets the valueAt attribute of the TableModelSorter object ! * ! * @param aRow Description of the Parameter ! * @param aColumn Description of the Parameter ! * @return The valueAt value ! */ ! public Object getValueAt(int aRow, int aColumn) ! { ! this.checkModel(); ! return super.getValueAt(aRow, aColumn); ! } ! ! ! /** ! * Gets the ascending attribute of the TableModelSorter object ! * ! * @return The ascending value ! */ ! public boolean isAscending() ! { ! return this.ascending; ! } ! ! ! /** Description of the Method */ ! public void n2sort() ! { ! for (int i = 0; i < getRowCount(); i++) ! { ! for (int j = i + 1; j < getRowCount(); j++) ! { ! if (compare(indexes[i], indexes[j]) == -1) ! { ! this.swap(i, j); ! } ! } ! } ! } ! ! ! ! /** Description of the Method */ ! public void reallocateIndexes() ! { ! int rowCount = model.getRowCount(); ! this.indexes = new int[rowCount]; ! ! // Initialise with the identity mapping. ! for (int row = 0; row < rowCount; row++) ! { ! indexes[row] = row; ! } ! } ! ! ! /** ! * Sets the valueAt attribute of the TableModelSorter object ! * ! * @param aValue The new valueAt value ! * @param aRow The new valueAt value ! * @param aColumn The new valueAt value ! */ ! public void setValueAt(Object aValue, int aRow, int aColumn) ! { ! this.checkModel(); ! super.setValueAt(aValue, aRow, aColumn); ! } ! ! ! ! /** ! * This is a home-grown implementation which we have not had time to research ! * - it may perform poorly in some circumstances. It requires twice the space ! * of an in-place algorithm and makes NlogN assigments shuttling the values ! * between the two arrays. The number of compares appears to vary between N-1 ! * and NlogN depending on the initial order but the main reason for using it ! * here is that, unlike qsort, it is stable. ! * ! * @param from Description of the Parameter ! * @param to Description of the Parameter ! * @param low Description of the Parameter ! * @param high Description of the Parameter ! */ ! public void shuttlesort(int from[], int to[], int low, int high) ! { ! if (high - low < 2) ! { ! return; ! } ! int middle = (low + high) / 2; ! ! this.shuttlesort(to, from, low, middle); ! this.shuttlesort(to, from, middle, high); ! ! int p = low; ! int q = middle; ! ! /* ! * This is an optional short-cut; at each recursive call, ! * check to see if the elements in this subset are already ! * ordered. If so, no further comparisons are needed; the ! * sub-array can just be copied. The array must be copied rather ! * than assigned otherwise sister calls in the recursion might ! * get out of sinc. When the number of elements is three they ! * are partitioned so that the first set, [low, mid), has one ! * element and and the second, [mid, high), has two. We skip the ! * optimisation when the number of elements is three or less as ! * the first compare in the normal merge will produce the same ! * sequence of steps. This optimisation seems to be worthwhile ! * for partially ordered lists but some analysis is needed to ! * find out how the performance drops to Nlog(N) as the initial ! * order diminishes - it may drop very quickly. ! */ ! if (high - low >= 4 && this.compare(from[middle - 1], from[middle]) <= 0) ! { ! for (int i = low; i < high; i++) ! { ! to[i] = from[i]; ! } ! return; ! } ! ! // A normal merge. ! for (int i = low; i < high; i++) ! { ! if (q >= high || (p < middle && this.compare(from[p], from[q]) <= 0)) ! { ! to[i] = from[p++]; ! } ! else ! { ! to[i] = from[q++]; ! } ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param sender Description of the Parameter ! */ ! public void sort(Object sender) ! { ! this.checkModel(); ! ! this.compares = 0; ! // n2sort(); ! // qsort(0, indexes.length-1); ! this.shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length); ! //System.out.println("Compares: "+compares); ! } ! ! ! ! /** ! * Description of the Method ! * ! * @param column Description of the Parameter ! */ ! public void sortByColumn(int column) ! { ! this.sortByColumn(column, true); ! } ! ! ! /** ! * Description of the Method ! * ! * @param column Description of the Parameter ! * @param ascending Description of the Parameter ! */ ! public void sortByColumn(int column, boolean ascending) ! { ! this.ascending = ascending; ! this.sortingColumns.removeAllElements(); ! this.sortingColumns.addElement(new Integer(column)); ! this.sort(this); ! super.tableChanged(new TableModelEvent(this)); ! } ! ! ! /** ! * Description of the Method ! * ! * @param event Description of the Parameter ! */ ! public void tableChanged(TableModelEvent event) ! { ! this.reallocateIndexes(); ! // if (column >= 0) ! // { ! // this.sortByColumn(column, ascending); ! // } ! super.tableChanged(event); ! } ! } --- 1,487 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.swing.table; ! ! import java.awt.event.InputEvent; ! import java.awt.event.MouseAdapter; ! import java.awt.event.MouseEvent; ! import java.util.Date; ! import java.util.Vector; ! ! import javax.swing.JTable; ! import javax.swing.event.TableModelEvent; ! import javax.swing.table.JTableHeader; ! import javax.swing.table.TableColumnModel; ! import javax.swing.table.TableModel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class TableModelSorter extends TableModelIndexed ! { ! /** Description of the Field */ ! protected boolean ascending = true; ! /** Description of the Field */ ! protected int column = -1; ! /** Description of the Field */ ! protected int compares; ! /** Description of the Field */ ! protected Vector sortingColumns = new Vector(); ! ! ! /** ! * Constructor for TableModelSorter. ! * ! * @param model ! */ ! public TableModelSorter(TableModel model) ! { ! super(model); ! this.reallocateIndexes(); ! } ! ! ! /** ! * Add a mouse listener to the Table to trigger a table sort when a column ! * heading is clicked in the JTable. ! * ! * @param table The feature to be added to the MouseListenerToHeaderInTable ! * attribute ! */ ! public void addMouseListenerToHeaderInTable(JTable table) ! { ! final TableModelSorter tableSorter = this; ! final JTable tableView = table; ! tableView.setColumnSelectionAllowed(false); ! MouseAdapter listMouseListener = ! new MouseAdapter() ! { ! public void mouseClicked(MouseEvent e) ! { ! TableColumnModel columnModel = tableView.getColumnModel(); ! int viewColumn = columnModel.getColumnIndexAtX(e.getX()); ! int column = tableView.convertColumnIndexToModel(viewColumn); ! if (e.getClickCount() == 1 && column != -1) ! { ! int shiftPressed = e.getModifiers() & InputEvent.SHIFT_MASK; ! boolean ascending = (shiftPressed == 0); ! tableSorter.sortByColumn(column, ascending); ! } ! } ! }; ! JTableHeader th = tableView.getTableHeader(); ! th.addMouseListener(listMouseListener); ! } ! ! ! /** Description of the Method */ ! public void checkModel() ! { ! if (indexes.length != model.getRowCount()) ! { ! System.err.println("Sorter not informed of a change in model."); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param row1 Description of the Parameter ! * @param row2 Description of the Parameter ! * @return Description of the Return Value ! */ ! public int compare(int row1, int row2) ! { ! this.compares++; ! for (int level = 0; level < this.sortingColumns.size(); level++) ! { ! Integer column = (Integer) this.sortingColumns.elementAt(level); ! int result = this.compareRowsByColumn(row1, row2, column.intValue()); ! if (result != 0) ! { ! return this.ascending ? result : -result; ! } ! } ! return 0; ! } ! ! ! ! /** ! * Description of the Method ! * ! * @param row1 Description of the Parameter ! * @param row2 Description of the Parameter ! * @param column Description of the Parameter ! * @return Description of the Return Value ! */ ! public int compareRowsByColumn(int row1, int row2, int column) ! { ! Class type = this.model.getColumnClass(column); ! TableModel data = this.model; ! ! // Check for nulls. ! Object o1 = data.getValueAt(row1, column); ! Object o2 = data.getValueAt(row2, column); ! ! // If both values are null, return 0. ! if (o1 == null && o2 == null) ! { ! return 0; ! } ! else if (o1 == null) ! { ! // Define null less than everything. ! return -1; ! } ! else if (o2 == null) ! { ! return 1; ! } ! ! /* ! * We copy all returned values from the getValue call in case ! * an optimised model is reusing one object to return many ! * values. The Number subclasses in the JDK are immutable and ! * so will not be used in this way but other subclasses of ! * Number might want to do this to save space and avoid ! * unnecessary heap allocation. ! */ ! if (Comparable.class.isAssignableFrom(type)) ! { ! Comparable n1 = (Comparable) data.getValueAt(row1, column); ! Comparable n2 = (Comparable) data.getValueAt(row2, column); ! ! int result = n1.compareTo(n2); ! ! if (result < 0) ! { ! return -1; ! } ! else if (result > 0) ! { ! return 1; ! } ! else ! { ! return 0; ! } ! } ! else if (Number.class.isAssignableFrom(type)) ! { ! Number n1 = (Number) data.getValueAt(row1, column); ! double d1 = n1.doubleValue(); ! Number n2 = (Number) data.getValueAt(row2, column); ! double d2 = n2.doubleValue(); ! ! if (d1 < d2) ! { ! return -1; ! } ! else if (d1 > d2) ! { ! return 1; ! } ! else ! { ! return 0; ! } ! } ! else if (type == Date.class) ! { ! Date d1 = (Date) data.getValueAt(row1, column); ! long n1 = d1.getTime(); ! Date d2 = (Date) data.getValueAt(row2, column); ! long n2 = d2.getTime(); ! ! if (n1 < n2) ! { ! return -1; ! } ! else if (n1 > n2) ! { ! return 1; ! } ! else ! { ! return 0; ! } ! } ! else if (type == String.class) ! { ! String s1 = (String) data.getValueAt(row1, column); ! String s2 = (String) data.getValueAt(row2, column); ! int result = s1.compareTo(s2); ! ! if (result < 0) ! { ! return -1; ! } ! else if (result > 0) ! { ! return 1; ! } ! else ! { ! return 0; ! } ! } ! else if (type == Boolean.class) ! { ! Boolean bool1 = (Boolean) data.getValueAt(row1, column); ! boolean b1 = bool1.booleanValue(); ! Boolean bool2 = (Boolean) data.getValueAt(row2, column); ! boolean b2 = bool2.booleanValue(); ! ! if (b1 == b2) ! { ! return 0; ! } ! else if (b1) ! { ! // Define false < true ! return 1; ! } ! else ! { ! return -1; ! } ! } ! else ! { ! String comp1 = o1.toString(); ! String comp2 = o2.toString(); ! ! int result = comp1.compareTo(comp2); ! ! if (result < 0) ! { ! return -1; ! } ! else if (result > 0) ! { ! return 1; ! } ! else ! { ! return 0; ! } ! } ! } ! ! ! /** ! * Gets the column attribute of the TableModelSorter object ! * ! * @return The column value ! */ ! public int getColumn() ! { ! return this.column; ! } ! ! ! /** ! * Gets the valueAt attribute of the TableModelSorter object ! * ! * @param aRow Description of the Parameter ! * @param aColumn Description of the Parameter ! * @return The valueAt value ! */ ! public Object getValueAt(int aRow, int aColumn) ! { ! this.checkModel(); ! return super.getValueAt(aRow, aColumn); ! } ! ! ! /** ! * Gets the ascending attribute of the TableModelSorter object ! * ! * @return The ascending value ! */ ! public boolean isAscending() ! { ! return this.ascending; ! } ! ! ! /** Description of the Method */ ! public void n2sort() ! { ! for (int i = 0; i < getRowCount(); i++) ! { ! for (int j = i + 1; j < getRowCount(); j++) ! { ! if (compare(indexes[i], indexes[j]) == -1) ! { ! this.swap(i, j); ! } ! } ! } ! } ! ! ! ! /** Description of the Method */ ! public void reallocateIndexes() ! { ! int rowCount = model.getRowCount(); ! this.indexes = new int[rowCount]; ! ! // Initialise with the identity mapping. ! for (int row = 0; row < rowCount; row++) ! { ! indexes[row] = row; ! } ! } ! ! ! /** ! * Sets the valueAt attribute of the TableModelSorter object ! * ! * @param aValue The new valueAt value ! * @param aRow The new valueAt value ! * @param aColumn The new valueAt value ! */ ! public void setValueAt(Object aValue, int aRow, int aColumn) ! { ! this.checkModel(); ! super.setValueAt(aValue, aRow, aColumn); ! } ! ! ! ! /** ! * This is a home-grown implementation which we have not had time to research ! * - it may perform poorly in some circumstances. It requires twice the space ! * of an in-place algorithm and makes NlogN assigments shuttling the values ! * between the two arrays. The number of compares appears to vary between N-1 ! * and NlogN depending on the initial order but the main reason for using it ! * here is that, unlike qsort, it is stable. ! * ! * @param from Description of the Parameter ! * @param to Description of the Parameter ! * @param low Description of the Parameter ! * @param high Description of the Parameter ! */ ! public void shuttlesort(int from[], int to[], int low, int high) ! { ! if (high - low < 2) ! { ! return; ! } ! int middle = (low + high) / 2; ! ! this.shuttlesort(to, from, low, middle); ! this.shuttlesort(to, from, middle, high); ! ! int p = low; ! int q = middle; ! ! /* ! * This is an optional short-cut; at each recursive call, ! * check to see if the elements in this subset are already ! * ordered. If so, no further comparisons are needed; the ! * sub-array can just be copied. The array must be copied rather ! * than assigned otherwise sister calls in the recursion might ! * get out of sinc. When the number of elements is three they ! * are partitioned so that the first set, [low, mid), has one ! * element and and the second, [mid, high), has two. We skip the ! * optimisation when the number of elements is three or less as ! * the first compare in the normal merge will produce the same ! * sequence of steps. This optimisation seems to be worthwhile ! * for partially ordered lists but some analysis is needed to ! * find out how the performance drops to Nlog(N) as the initial ! * order diminishes - it may drop very quickly. ! */ ! if (high - low >= 4 && this.compare(from[middle - 1], from[middle]) <= 0) ! { ! for (int i = low; i < high; i++) ! { ! to[i] = from[i]; ! } ! return; ! } ! ! // A normal merge. ! for (int i = low; i < high; i++) ! { ! if (q >= high || (p < middle && this.compare(from[p], from[q]) <= 0)) ! { ! to[i] = from[p++]; ! } ! else ! { ! to[i] = from[q++]; ! } ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param sender Description of the Parameter ! */ ! public void sort(Object sender) ! { ! this.checkModel(); ! ! this.compares = 0; ! // n2sort(); ! // qsort(0, indexes.length-1); ! this.shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length); ! //System.out.println("Compares: "+compares); ! } ! ! ! ! /** ! * Description of the Method ! * ! * @param column Description of the Parameter ! */ ! public void sortByColumn(int column) ! { ! this.sortByColumn(column, true); ! } ! ! ! /** ! * Description of the Method ! * ! * @param column Description of the Parameter ! * @param ascending Description of the Parameter ! */ ! public void sortByColumn(int column, boolean ascending) ! { ! this.ascending = ascending; ! this.sortingColumns.removeAllElements(); ! this.sortingColumns.addElement(new Integer(column)); ! this.sort(this); ! super.tableChanged(new TableModelEvent(this)); ! } ! ! ! /** ! * Description of the Method ! * ! * @param event Description of the Parameter ! */ ! public void tableChanged(TableModelEvent event) ! { ! this.reallocateIndexes(); ! // if (column >= 0) ! // { ! // this.sortByColumn(column, ascending); ! // } ! super.tableChanged(event); ! } ! } |
Update of /cvsroot/ejtools/libraries/common/src/main/org/ejtools/beans/beancontext In directory sc8-pr-cvs1:/tmp/cvs-serv18971/common/src/main/org/ejtools/beans/beancontext Modified Files: CustomBeanContextServiceProvider.java CustomBeanContextServicesSupport.java Added Files: package.html Log Message: Add more javadocs. Add package.html files. --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides classes that extends the JavaBeans BeanContext specifications. It includes recursive service discovery and template classes for commonly use functionnalities. </body> </html> Index: CustomBeanContextServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/beans/beancontext/CustomBeanContextServiceProvider.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** CustomBeanContextServiceProvider.java 15 Sep 2003 22:23:45 -0000 1.9 --- CustomBeanContextServiceProvider.java 13 Dec 2003 21:27:49 -0000 1.10 *************** *** 1,60 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.beans.beancontext; ! ! import java.beans.beancontext.BeanContextServiceProvider; ! import java.beans.beancontext.BeanContextServices; ! ! import org.apache.log4j.Logger; ! ! /** ! * Super class that aggregates the Service support role, and the service provider role. ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public abstract class CustomBeanContextServiceProvider extends CustomBeanContextServicesSupport implements BeanContextServiceProvider ! { ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(CustomBeanContextServiceProvider.class); ! ! ! /** ! * Returns the Service classes provided. ! * ! * @return The array of service provided ! */ ! protected abstract Class[] getServiceClass(); ! ! ! /** Registers every service into the parent bean context */ ! protected void initializeBeanContextResources() ! { ! super.initializeBeanContextResources(); ! ! Class[] services = this.getServiceClass(); ! for (int i = 0; i < services.length; i++) ! { ! ((BeanContextServices) this.getBeanContext()).addService(services[i], this); ! logger.debug("Service " + services[i] + " added"); ! } ! } ! ! ! /** Registers every service into the parent bean context */ ! protected void releaseBeanContextResources() ! { ! Class[] services = this.getServiceClass(); ! for (int i = 0; i < services.length; i++) ! { ! ((BeanContextServices) this.getBeanContext()).revokeService(services[i], this, true); ! logger.debug("Service " + services[i] + " revoked"); ! } ! ! super.releaseBeanContextResources(); ! } ! } --- 1,60 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.beans.beancontext; ! ! import java.beans.beancontext.BeanContextServiceProvider; ! import java.beans.beancontext.BeanContextServices; ! ! import org.apache.log4j.Logger; ! ! /** ! * Super class that aggregates the Service support role, and the service provider role. ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public abstract class CustomBeanContextServiceProvider extends CustomBeanContextServicesSupport implements BeanContextServiceProvider ! { ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(CustomBeanContextServiceProvider.class); ! ! ! /** ! * Returns the Service classes provided. ! * ! * @return The array of service provided ! */ ! protected abstract Class[] getServiceClass(); ! ! ! /** Registers every service into the parent bean context */ ! protected void initializeBeanContextResources() ! { ! super.initializeBeanContextResources(); ! ! Class[] services = this.getServiceClass(); ! for (int i = 0; i < services.length; i++) ! { ! ((BeanContextServices) this.getBeanContext()).addService(services[i], this); ! logger.debug("Service " + services[i] + " added"); ! } ! } ! ! ! /** Registers every service into the parent bean context */ ! protected void releaseBeanContextResources() ! { ! Class[] services = this.getServiceClass(); ! for (int i = 0; i < services.length; i++) ! { ! ((BeanContextServices) this.getBeanContext()).revokeService(services[i], this, true); ! logger.debug("Service " + services[i] + " revoked"); ! } ! ! super.releaseBeanContextResources(); ! } ! } Index: CustomBeanContextServicesSupport.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/beans/beancontext/CustomBeanContextServicesSupport.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CustomBeanContextServicesSupport.java 15 Sep 2003 22:23:45 -0000 1.8 --- CustomBeanContextServicesSupport.java 13 Dec 2003 21:27:49 -0000 1.9 *************** *** 1,102 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.beans.beancontext; ! ! import java.beans.beancontext.BeanContext; ! import java.beans.beancontext.BeanContextChild; ! import java.beans.beancontext.BeanContextServiceRevokedListener; ! import java.beans.beancontext.BeanContextServices; ! import java.beans.beancontext.BeanContextServicesSupport; ! import java.util.Iterator; ! import java.util.TooManyListenersException; ! ! import org.ejtools.util.state.Storable; ! import org.ejtools.util.state.StoreVisitor; ! ! /** ! * Enhancement of the {@link BeanContextServicesSupport} to provide an implementation ! * for the <code>clear</code> method, and a recursive search for a particular service. ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public abstract class CustomBeanContextServicesSupport extends BeanContextServicesSupport implements Storable ! { ! /** ! * Description of the Method ! * ! * @param visitor Description of the Parameter ! */ ! public void accept(StoreVisitor visitor) ! { ! visitor.persist(this); ! } ! ! ! /** Implementation of the <code>clear</code> method */ ! public void clear() ! { ! Iterator iterator; ! ! // Recursively clear the content ! iterator = this.iterator(); ! while (iterator.hasNext()) ! { ! Object o = iterator.next(); ! if (o instanceof BeanContext) ! { ! ((BeanContext) o).clear(); ! } ! } ! ! // Remove all elements ! iterator = this.iterator(); ! while (iterator.hasNext()) ! { ! iterator.next(); ! iterator.remove(); ! } ! } ! ! ! /** ! * Gets the BeanContext service recursivly if necessary. ! * ! * @param child Description of Parameter ! * @param requestor Description of Parameter ! * @param serviceClass Description of Parameter ! * @param serviceSelector Description of Parameter ! * @param bcsrl Description of Parameter ! * @return The value ! * @exception TooManyListenersException Description of Exception ! * Object,BeanContextServiceRevokedListener) ! */ ! public Object getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) ! throws TooManyListenersException ! { ! Object service = super.getService(child, requestor, serviceClass, serviceSelector, bcsrl); ! ! // If the service requested is not provided by this BeanContext, try the parent ! if (service == null) ! { ! BeanContextServices bcs = null; ! ! try ! { ! bcs = (BeanContextServices) this.getBeanContext(); ! } ! catch (ClassCastException cce) ! { ! return null; ! } ! ! return bcs.getService(this, requestor, serviceClass, serviceSelector, bcsrl); ! } ! ! return service; ! } ! } --- 1,102 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.beans.beancontext; ! ! import java.beans.beancontext.BeanContext; ! import java.beans.beancontext.BeanContextChild; ! import java.beans.beancontext.BeanContextServiceRevokedListener; ! import java.beans.beancontext.BeanContextServices; ! import java.beans.beancontext.BeanContextServicesSupport; ! import java.util.Iterator; ! import java.util.TooManyListenersException; ! ! import org.ejtools.util.state.Storable; ! import org.ejtools.util.state.StoreVisitor; ! ! /** ! * Enhancement of the {@link BeanContextServicesSupport} to provide an implementation ! * for the <code>clear</code> method, and a recursive search for a particular service. ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public abstract class CustomBeanContextServicesSupport extends BeanContextServicesSupport implements Storable ! { ! /** ! * Description of the Method ! * ! * @param visitor Description of the Parameter ! */ ! public void accept(StoreVisitor visitor) ! { ! visitor.persist(this); ! } ! ! ! /** Implementation of the <code>clear</code> method */ ! public void clear() ! { ! Iterator iterator; ! ! // Recursively clear the content ! iterator = this.iterator(); ! while (iterator.hasNext()) ! { ! Object o = iterator.next(); ! if (o instanceof BeanContext) ! { ! ((BeanContext) o).clear(); ! } ! } ! ! // Remove all elements ! iterator = this.iterator(); ! while (iterator.hasNext()) ! { ! iterator.next(); ! iterator.remove(); ! } ! } ! ! ! /** ! * Gets the BeanContext service recursivly if necessary. ! * ! * @param child Description of Parameter ! * @param requestor Description of Parameter ! * @param serviceClass Description of Parameter ! * @param serviceSelector Description of Parameter ! * @param bcsrl Description of Parameter ! * @return The value ! * @exception TooManyListenersException Description of Exception ! * Object,BeanContextServiceRevokedListener) ! */ ! public Object getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) ! throws TooManyListenersException ! { ! Object service = super.getService(child, requestor, serviceClass, serviceSelector, bcsrl); ! ! // If the service requested is not provided by this BeanContext, try the parent ! if (service == null) ! { ! BeanContextServices bcs = null; ! ! try ! { ! bcs = (BeanContextServices) this.getBeanContext(); ! } ! catch (ClassCastException cce) ! { ! return null; ! } ! ! return bcs.getService(this, requestor, serviceClass, serviceSelector, bcsrl); ! } ! ! return service; ! } ! } |
From: <let...@us...> - 2003-12-14 09:48:33
|
Update of /cvsroot/ejtools/libraries/graph/src/resources/org/ejtools/graph In directory sc8-pr-cvs1:/tmp/cvs-serv18699/graph/src/resources/org/ejtools/graph Modified Files: GraphService.properties GraphService_fr_FR.properties Log Message: Add more javadocs. Adjust text export. Index: GraphService.properties =================================================================== RCS file: /cvsroot/ejtools/libraries/graph/src/resources/org/ejtools/graph/GraphService.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GraphService.properties 27 Nov 2003 00:53:32 -0000 1.3 --- GraphService.properties 13 Dec 2003 21:26:47 -0000 1.4 *************** *** 24,27 **** --- 24,32 ---- export.as.text.column.numeric.format=0 + file.dialog.title.export.csv=Export data as CSV file + file.dialog.title.export.png=Export data as PNG image + file.dialog.button.export.csv=Export + file.dialog.button.export.png=Export + action.tools=Tools action.tools.export.as.text=Export as Text Data Index: GraphService_fr_FR.properties =================================================================== RCS file: /cvsroot/ejtools/libraries/graph/src/resources/org/ejtools/graph/GraphService_fr_FR.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GraphService_fr_FR.properties 27 Nov 2003 00:53:32 -0000 1.5 --- GraphService_fr_FR.properties 13 Dec 2003 21:26:47 -0000 1.6 *************** *** 24,27 **** --- 24,32 ---- export.as.text.column.numeric.format=0 + file.dialog.title.export.csv=Exporter les données au format CSV + file.dialog.title.export.png=Exporter les données en image PNG + file.dialog.button.export.csv=Exporter + file.dialog.button.export.png=Exporter + action.tools=Outils action.tools.export.as.text=Exporter en données texte |
From: <let...@us...> - 2003-12-14 09:48:33
|
Update of /cvsroot/ejtools/libraries/graph/src/main/org/ejtools/graph/dialog In directory sc8-pr-cvs1:/tmp/cvs-serv18699/graph/src/main/org/ejtools/graph/dialog Modified Files: SelectGraphDialog.java Log Message: Add more javadocs. Adjust text export. Index: SelectGraphDialog.java =================================================================== RCS file: /cvsroot/ejtools/libraries/graph/src/main/org/ejtools/graph/dialog/SelectGraphDialog.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SelectGraphDialog.java 15 Sep 2003 22:11:22 -0000 1.4 --- SelectGraphDialog.java 13 Dec 2003 21:26:46 -0000 1.5 *************** *** 1,154 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.graph.dialog; ! ! import java.awt.Component; ! import java.awt.GridBagConstraints; ! import java.awt.GridBagLayout; ! import java.awt.GridLayout; ! import java.awt.Insets; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.util.ResourceBundle; ! ! import javax.swing.JButton; ! import javax.swing.JComboBox; ! import javax.swing.JDialog; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class SelectGraphDialog extends JDialog ! { ! /** Description of the Field */ ! protected JComboBox choices; ! /** Description of the Field */ ! protected Object initialSelectionValue; ! /** Description of the Field */ ! protected Object selectedValue = null; ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.graph.GraphService"); ! ! ! /** ! *Constructor for the CustomJOptionPane object ! * ! * @param parentComponent Description of the Parameter ! * @param selectionValues Description of the Parameter ! * @param initialSelectionValue Description of the Parameter ! */ ! public SelectGraphDialog(Component parentComponent, Object[] selectionValues, Object initialSelectionValue) ! { ! super(); ! this.setModal(true); ! this.setTitle(resources.getString("graph.dialog.title")); ! ! JPanel main = new JPanel(new GridBagLayout()); ! GridBagConstraints constraints = new GridBagConstraints(); ! constraints.insets = new Insets(5, 5, 5, 5); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! constraints.fill = GridBagConstraints.HORIZONTAL; ! constraints.anchor = GridBagConstraints.WEST; ! JLabel messageLabel = new JLabel(resources.getString("graph.dialog.text.description")); ! main.add(messageLabel, constraints); ! ! this.initialSelectionValue = initialSelectionValue; ! ! this.choices = new JComboBox(selectionValues); ! this.choices.setSelectedItem(this.initialSelectionValue); ! this.choices.setEditable(true); ! if (selectionValues.length == 0) ! { ! choices.getEditor().setItem(this.initialSelectionValue); ! } ! ! main.add(choices, constraints); ! ! JPanel buttons = new JPanel(new GridLayout(1, 2, 2, 2)); ! ! JButton buttonSelect = new JButton(resources.getString("graph.dialog.button.select")); ! buttons.add(buttonSelect); ! buttonSelect.addActionListener( ! new ActionListener() ! { ! /** ! * @param e Description of the Parameter ! */ ! public void actionPerformed(ActionEvent e) ! { ! select(); ! dispose(); ! } ! }); ! ! JButton buttonCancel = new JButton(resources.getString("graph.dialog.button.cancel")); ! buttons.add(buttonCancel); ! buttonCancel.addActionListener( ! new ActionListener() ! { ! /** ! * @param e Description of the Parameter ! */ ! public void actionPerformed(ActionEvent e) ! { ! selectedValue = null; ! dispose(); ! } ! }); ! ! constraints.fill = GridBagConstraints.NONE; ! constraints.anchor = GridBagConstraints.SOUTH; ! main.add(buttons, constraints); ! ! this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); ! this.getContentPane().add(main); ! this.pack(); ! this.setLocationRelativeTo(parentComponent); ! } ! ! ! /** ! * Returns the selectedValue. ! * ! * @return Object ! */ ! public Object getSelectedValue() ! { ! return selectedValue; ! } ! ! ! /** Description of the Method */ ! private void select() ! { ! boolean found = false; ! ! Object choice = this.choices.getSelectedItem(); ! Object text = this.choices.getEditor().getItem(); ! ! for (int i = 0; i < this.choices.getModel().getSize(); i++) ! { ! choice = this.choices.getModel().getElementAt(i); ! if (choice.toString().equals(text.toString())) ! { ! found = true; ! break; ! } ! } ! if (!found) ! { ! choice = text; ! } ! ! this.selectedValue = choice; ! } ! } --- 1,154 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.graph.dialog; ! ! import java.awt.Component; ! import java.awt.GridBagConstraints; ! import java.awt.GridBagLayout; ! import java.awt.GridLayout; ! import java.awt.Insets; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.util.ResourceBundle; ! ! import javax.swing.JButton; ! import javax.swing.JComboBox; ! import javax.swing.JDialog; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class SelectGraphDialog extends JDialog ! { ! /** Description of the Field */ ! protected JComboBox choices; ! /** Description of the Field */ ! protected Object initialSelectionValue; ! /** Description of the Field */ ! protected Object selectedValue = null; ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.graph.GraphService"); ! ! ! /** ! *Constructor for the CustomJOptionPane object ! * ! * @param parentComponent Description of the Parameter ! * @param selectionValues Description of the Parameter ! * @param initialSelectionValue Description of the Parameter ! */ ! public SelectGraphDialog(Component parentComponent, Object[] selectionValues, Object initialSelectionValue) ! { ! super(); ! this.setModal(true); ! this.setTitle(resources.getString("graph.dialog.title")); ! ! JPanel main = new JPanel(new GridBagLayout()); ! GridBagConstraints constraints = new GridBagConstraints(); ! constraints.insets = new Insets(5, 5, 5, 5); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! constraints.fill = GridBagConstraints.HORIZONTAL; ! constraints.anchor = GridBagConstraints.WEST; ! JLabel messageLabel = new JLabel(resources.getString("graph.dialog.text.description")); ! main.add(messageLabel, constraints); ! ! this.initialSelectionValue = initialSelectionValue; ! ! this.choices = new JComboBox(selectionValues); ! this.choices.setSelectedItem(this.initialSelectionValue); ! this.choices.setEditable(true); ! if (selectionValues.length == 0) ! { ! choices.getEditor().setItem(this.initialSelectionValue); ! } ! ! main.add(choices, constraints); ! ! JPanel buttons = new JPanel(new GridLayout(1, 2, 2, 2)); ! ! JButton buttonSelect = new JButton(resources.getString("graph.dialog.button.select")); ! buttons.add(buttonSelect); ! buttonSelect.addActionListener( ! new ActionListener() ! { ! /** ! * @param e Description of the Parameter ! */ ! public void actionPerformed(ActionEvent e) ! { ! select(); ! dispose(); ! } ! }); ! ! JButton buttonCancel = new JButton(resources.getString("graph.dialog.button.cancel")); ! buttons.add(buttonCancel); ! buttonCancel.addActionListener( ! new ActionListener() ! { ! /** ! * @param e Description of the Parameter ! */ ! public void actionPerformed(ActionEvent e) ! { ! selectedValue = null; ! dispose(); ! } ! }); ! ! constraints.fill = GridBagConstraints.NONE; ! constraints.anchor = GridBagConstraints.SOUTH; ! main.add(buttons, constraints); ! ! this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); ! this.getContentPane().add(main); ! this.pack(); ! this.setLocationRelativeTo(parentComponent); ! } ! ! ! /** ! * Returns the selectedValue. ! * ! * @return Object ! */ ! public Object getSelectedValue() ! { ! return selectedValue; ! } ! ! ! /** Description of the Method */ ! private void select() ! { ! boolean found = false; ! ! Object choice = this.choices.getSelectedItem(); ! Object text = this.choices.getEditor().getItem(); ! ! for (int i = 0; i < this.choices.getModel().getSize(); i++) ! { ! choice = this.choices.getModel().getElementAt(i); ! if (choice.toString().equals(text.toString())) ! { ! found = true; ! break; ! } ! } ! if (!found) ! { ! choice = text; ! } ! ! this.selectedValue = choice; ! } ! } |
From: <let...@us...> - 2003-12-14 09:48:32
|
Update of /cvsroot/ejtools/libraries/graph/src/main/org/ejtools/graph/action In directory sc8-pr-cvs1:/tmp/cvs-serv18699/graph/src/main/org/ejtools/graph/action Modified Files: ExportAsImageAction.java ExportAsTextAction.java Log Message: Add more javadocs. Adjust text export. Index: ExportAsImageAction.java =================================================================== RCS file: /cvsroot/ejtools/libraries/graph/src/main/org/ejtools/graph/action/ExportAsImageAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExportAsImageAction.java 15 Sep 2003 22:11:22 -0000 1.2 --- ExportAsImageAction.java 13 Dec 2003 21:26:46 -0000 1.3 *************** *** 1,44 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.graph.action; ! ! import java.util.ResourceBundle; ! ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.CommandAction; ! import org.ejtools.util.Platform; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ExportAsImageAction extends CommandAction ! { ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.graph.GraphService"); ! ! ! /** ! * Constructor for the NewAction object ! * ! * @param command Description of Parameter ! */ ! public ExportAsImageAction(Command command) ! { ! super(command, resources, "action.tools.export.as.image"); ! this.setMenu("action.tools"); ! this.setToolBar(true); ! this.setSmallIcon("/toolbarButtonGraphics/general/Export16.gif"); ! this.setIcon("/toolbarButtonGraphics/general/Export24.gif"); ! ! // Enable export if JDK 1.4 is available (contains Image IO API) ! this.setEnabled(Platform.isJavaVersionCompatible(Platform.JAVA_1_4)); ! } ! } --- 1,44 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.graph.action; ! ! import java.util.ResourceBundle; ! ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.CommandAction; ! import org.ejtools.util.Platform; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ExportAsImageAction extends CommandAction ! { ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.graph.GraphService"); ! ! ! /** ! * Constructor for the NewAction object ! * ! * @param command Description of Parameter ! */ ! public ExportAsImageAction(Command command) ! { ! super(command, resources, "action.tools.export.as.image"); ! this.setMenu("action.tools"); ! this.setToolBar(true); ! this.setSmallIcon("/toolbarButtonGraphics/general/Export16.gif"); ! this.setIcon("/toolbarButtonGraphics/general/Export24.gif"); ! ! // Enable export if JDK 1.4 is available (contains Image IO API) ! this.setEnabled(Platform.isJavaVersionCompatible(Platform.JAVA_1_4)); ! } ! } Index: ExportAsTextAction.java =================================================================== RCS file: /cvsroot/ejtools/libraries/graph/src/main/org/ejtools/graph/action/ExportAsTextAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExportAsTextAction.java 15 Sep 2003 22:11:22 -0000 1.2 --- ExportAsTextAction.java 13 Dec 2003 21:26:46 -0000 1.3 *************** *** 1,40 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.graph.action; ! ! import java.util.ResourceBundle; ! ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.CommandAction; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ExportAsTextAction extends CommandAction ! { ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.graph.GraphService"); ! ! ! /** ! * Constructor for the NewAction object ! * ! * @param command Description of Parameter ! */ ! public ExportAsTextAction(Command command) ! { ! super(command, resources, "action.tools.export.as.text"); ! this.setMenu("action.tools"); ! this.setToolBar(true); ! this.setSmallIcon("/toolbarButtonGraphics/general/Export16.gif"); ! this.setIcon("/toolbarButtonGraphics/general/Export24.gif"); ! } ! } --- 1,40 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.graph.action; ! ! import java.util.ResourceBundle; ! ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.CommandAction; ! ! /** ! * Description of the Class ! * ! * @author Laurent Etiemble ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ExportAsTextAction extends CommandAction ! { ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.graph.GraphService"); ! ! ! /** ! * Constructor for the NewAction object ! * ! * @param command Description of Parameter ! */ ! public ExportAsTextAction(Command command) ! { ! super(command, resources, "action.tools.export.as.text"); ! this.setMenu("action.tools"); ! this.setToolBar(true); ! this.setSmallIcon("/toolbarButtonGraphics/general/Export16.gif"); ! this.setIcon("/toolbarButtonGraphics/general/Export24.gif"); ! } ! } |
From: <let...@us...> - 2003-12-14 09:48:32
|
Update of /cvsroot/ejtools/libraries/graph In directory sc8-pr-cvs1:/tmp/cvs-serv18699/graph Modified Files: project.xml Log Message: Add more javadocs. Adjust text export. Index: project.xml =================================================================== RCS file: /cvsroot/ejtools/libraries/graph/project.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** project.xml 15 Sep 2003 22:02:49 -0000 1.3 --- project.xml 13 Dec 2003 21:26:46 -0000 1.4 *************** *** 18,25 **** <url>/libraries/graph</url> <dependencies> - <dependency> - <id>log4j</id> - <version>1.2.7</version> - </dependency> <!-- Project dependencies --> <dependency> --- 18,21 ---- *************** *** 38,46 **** <artifactId>awt</artifactId> <version>1.0</version> - </dependency> - <dependency> - <id>sun</id> - <artifactId>j2ee</artifactId> - <version>1.3.1</version> </dependency> </dependencies> --- 34,37 ---- |