[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Wed Dec 22 16:07:03 UTC 2004


kawas
Wed Dec 22 11:07:03 EST 2004
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceTypeCreationTool
In directory pub.open-bio.org:/tmp/cvs-serv2555/org/biomoby/client/gui/serviceTypeCreationTool

Modified Files:
	ServiceTypeApplet.java 
Log Message:
Added documentation

moby-live/Java/src/main/org/biomoby/client/gui/serviceTypeCreationTool ServiceTypeApplet.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceTypeCreationTool/ServiceTypeApplet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceTypeCreationTool/ServiceTypeApplet.java	2004/09/27 21:06:17	1.2
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceTypeCreationTool/ServiceTypeApplet.java	2004/12/22 16:07:03	1.3
@@ -35,14 +35,13 @@
 import org.biomoby.shared.PendingCurationException;
 
 /**
- * @author Eddie Created for
- *         <p>
- *         This class was created to ...
- *         <p>
- *         For questions, comments, or bugs
- *         <p>
- *         email me at edward.kawas at gmail.com
- *         <p>
+ * 
+ * @author Eddie Kawas
+ * <p>This class was created to present 
+ * users of moby the chance to create 
+ * new service types quickly and easily.
+ * <p>For questions, comments, or bugs
+ * <p>email me at edward.kawas at gmail.com
  */
 public class ServiceTypeApplet extends JApplet {
 
@@ -125,17 +124,20 @@
         return super.getAppletContext();
     }
 
-	/*
-	 * (non-Javadoc)
-	 *@see java.applet.Applet#getAppletInfo() 
-	 */
+    /*
+     * (non-Javadoc)
+     *@see java.applet.Applet#getAppletInfo() 
+     */
     public String getAppletInfo() {
-		return "Title: Moby Service Type Construction Tool v1.00, 24 September 2004\n"
-			+ "Author: Edward Kawas\n"
-			+ "An interactive way to create Service Types for the MobyCentral Ontology." +
-					newline + "This is" + ((PROTOTYPE) ? "" : " not " ) + "a prototype!";
-	}
-	
+        return "Title: Moby Service Type Construction Tool v1.00, 24 September 2004\n"
+                + "Author: Edward Kawas\n"
+                + "An interactive way to create Service Types for the MobyCentral Ontology."
+                + newline
+                + "This is"
+                + ((PROTOTYPE) ? "" : " not ")
+                + "a prototype!";
+    }
+
     /*
      * (non-Javadoc)
      * 
@@ -159,17 +161,17 @@
                                 .getLastSelectedPathComponent().toString();
 
                         switch (arg0.getClickCount()) {
-                        case 1:
-                            break;
-                        case 2:
-                            //set text box to be this node, and close frame
-                            parentTextField.setText(selected);
-                            frame.dispose();
-                            frame = null;
-                            break;
-                        default:
-                            // do nothing
-                            break;
+                            case 1:
+                                break;
+                            case 2:
+                                //set text box to be this node, and close frame
+                                parentTextField.setText(selected);
+                                frame.dispose();
+                                frame = null;
+                                break;
+                            default:
+                                // do nothing
+                                break;
                         }
                     }
 
@@ -229,9 +231,8 @@
             title.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 24));
             title.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
             title.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
-            title
-                    .setIcon(new ImageIcon(getClass().getResource(
-                            "/org/biomoby/client/gui/img/moby.gif")));
+            title.setIcon(new ImageIcon(getClass().getResource(
+                    "/org/biomoby/client/gui/img/moby.gif")));
             title.setOpaque(true);
             backgroundPane.add(title, java.awt.BorderLayout.NORTH);
             backgroundPane.add(getCenterPane(), java.awt.BorderLayout.CENTER);
@@ -313,20 +314,24 @@
             registerServiceType.setText("Create New Service Type");
             registerServiceType.setCursor(new java.awt.Cursor(
                     java.awt.Cursor.DEFAULT_CURSOR));
-            registerServiceType.setIcon(new ImageIcon(getClass().getResource(
-                    "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/ComposeMail24.gif")));
+            registerServiceType
+                    .setIcon(new ImageIcon(
+                            getClass()
+                                    .getResource(
+                                            "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/ComposeMail24.gif")));
             registerServiceType.setActionCommand("register");
             registerServiceType
                     .addActionListener(new java.awt.event.ActionListener() {
                         public void actionPerformed(java.awt.event.ActionEvent e) {
-                           
+
                             // check whether inputs is valid
                             /*
                              * data is an array of values: 0.service type name
                              * 1.service type description 2.service type uri
                              * 3.service type parent 4. valid email address
                              */
-                            String[] data = { getNameTxtField().getText(),
+                            String[] data = {
+                                    getNameTxtField().getText(),
                                     getDescTxtArea().getText(),
                                     getUriTxtField().getText(),
                                     getParentTextField().getText(),
@@ -351,7 +356,7 @@
                                 createPopUpMsg("Please enter a valid email address.");
                                 return;
                             }
-                            
+
                             Central worker = null;
                             boolean success = false;
                             String errorMsg = "";
@@ -560,8 +565,11 @@
     private JButton getNamehelpBtn() {
         if (namehelpBtn == null) {
             namehelpBtn = new JButton();
-            namehelpBtn.setIcon(new ImageIcon(getClass().getResource(
-                    "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/Help24.gif")));
+            namehelpBtn
+                    .setIcon(new ImageIcon(
+                            getClass()
+                                    .getResource(
+                                            "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/Help24.gif")));
             namehelpBtn.setOpaque(false);
             namehelpBtn.setActionCommand("nameHelp");
             namehelpBtn.setMaximumSize(new java.awt.Dimension(34, 26));
@@ -592,8 +600,11 @@
             descHelpBtn.setMaximumSize(new java.awt.Dimension(34, 26));
             descHelpBtn.setMinimumSize(new java.awt.Dimension(34, 26));
             descHelpBtn.setOpaque(false);
-            descHelpBtn.setIcon(new ImageIcon(getClass().getResource(
-                    "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/Help24.gif")));
+            descHelpBtn
+                    .setIcon(new ImageIcon(
+                            getClass()
+                                    .getResource(
+                                            "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/Help24.gif")));
             descHelpBtn.setActionCommand("descHelp");
             descHelpBtn.addActionListener(new java.awt.event.ActionListener() {
                 public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -619,8 +630,11 @@
             emailHelpBtn.setMaximumSize(new java.awt.Dimension(34, 26));
             emailHelpBtn.setMinimumSize(new java.awt.Dimension(34, 26));
             emailHelpBtn.setOpaque(false);
-            emailHelpBtn.setIcon(new ImageIcon(getClass().getResource(
-                    "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/Help24.gif")));
+            emailHelpBtn
+                    .setIcon(new ImageIcon(
+                            getClass()
+                                    .getResource(
+                                            "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/Help24.gif")));
             emailHelpBtn.setActionCommand("emailHelp");
             emailHelpBtn.addActionListener(new java.awt.event.ActionListener() {
                 public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -645,8 +659,11 @@
             uriHelpBtn.setMaximumSize(new java.awt.Dimension(34, 26));
             uriHelpBtn.setMinimumSize(new java.awt.Dimension(34, 26));
             uriHelpBtn.setOpaque(false);
-            uriHelpBtn.setIcon(new ImageIcon(getClass().getResource(
-                    "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/Help24.gif")));
+            uriHelpBtn
+                    .setIcon(new ImageIcon(
+                            getClass()
+                                    .getResource(
+                                            "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/Help24.gif")));
             uriHelpBtn.setActionCommand("uriHelp");
             uriHelpBtn.addActionListener(new java.awt.event.ActionListener() {
                 public void actionPerformed(java.awt.event.ActionEvent e) {
@@ -686,8 +703,11 @@
             chooseParentBtn = new JButton();
             chooseParentBtn.setText("Choose Service Type Parent");
             chooseParentBtn.setActionCommand("chooseParent");
-            chooseParentBtn.setIcon(new ImageIcon(getClass().getResource(
-                    "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/Preferences24.gif")));
+            chooseParentBtn
+                    .setIcon(new ImageIcon(
+                            getClass()
+                                    .getResource(
+                                            "/org/biomoby/client/gui/img/toolbarButtonGraphics/general/Preferences24.gif")));
             chooseParentBtn.setOpaque(true);
             chooseParentBtn.setPreferredSize(new java.awt.Dimension(274, 27));
             chooseParentBtn.setMinimumSize(new java.awt.Dimension(274, 27));
@@ -708,7 +728,8 @@
                                 return;
                             }
                             frame = new JFrame("Service Type Chooser");
-                            JScrollPane scrollable = new JScrollPane(tree.getTree());
+                            JScrollPane scrollable = new JScrollPane(tree
+                                    .getTree());
                             frame.getContentPane().add(scrollable);
                             frame
                                     .setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);




More information about the MOBY-guts mailing list