[MOBY-guts] biomoby commit

Martin Senger senger at pub.open-bio.org
Sun Sep 4 13:45:38 UTC 2005


senger
Sun Sep  4 09:45:38 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard
In directory pub.open-bio.org:/tmp/cvs-serv27838/src/main/org/biomoby/service/dashboard

Modified Files:
	AbstractPanel.java RegistryPanel.java 
Log Message:


moby-live/Java/src/main/org/biomoby/service/dashboard AbstractPanel.java,1.1,1.2 RegistryPanel.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java	2005/09/02 07:38:36	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java	2005/09/04 13:45:38	1.2
@@ -9,11 +9,14 @@
 package org.biomoby.service.dashboard;
 
 import javax.swing.JLabel;
+import javax.swing.JPanel;
 import javax.swing.text.html.HTMLDocument;
 import javax.swing.Icon;
 import javax.swing.JComponent;
+
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeSupport;
 
 /**
  * WORK IN PROGRESS. <p>
@@ -23,6 +26,7 @@
  */
 
 public abstract class AbstractPanel
+    extends JPanel
     implements DashboardPanel {
 
     /**************************************************************************
@@ -39,20 +43,23 @@
 	return null;
     }
 
-    /**************************************************************************
-     *
-     **************************************************************************/
-    public void addPropertyChangeListener (PropertyChangeListener listener) {
+    /*********************************************************************
+     * Property change stuff
+     ********************************************************************/
+    protected PropertyChangeSupport support;
+
+    public void addPropertyChangeListener (PropertyChangeListener l) {
+        if (support != null)
+	    support.addPropertyChangeListener(l);
     }
 
-    /**************************************************************************
-     *
-     **************************************************************************/
-    public void removePropertyChangeListener(PropertyChangeListener listener) {
+    public void removePropertyChangeListener (PropertyChangeListener l) {
+        if (support != null)
+	    support.removePropertyChangeListener(l);
     }
 
     /**************************************************************************
-     *
+     * Here we get notified when a property chnage happen.
      **************************************************************************/
     public void propertyChange (PropertyChangeEvent event) {
     }

===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java	2005/09/02 07:38:36	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java	2005/09/04 13:45:38	1.2
@@ -12,7 +12,9 @@
 import javax.swing.text.html.HTMLDocument;
 import javax.swing.Icon;
 import javax.swing.JComponent;
+
 import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeEvent;
 
 /**
  * 
@@ -26,6 +28,20 @@
 public class RegistryPanel
     extends AbstractPanel {
 
+    /*********************************************************************
+     * propertyChange()
+     ********************************************************************/
+    public void propertyChange (PropertyChangeEvent e) {
+        String prop = e.getPropertyName();
+        String newVal = (String)e.getNewValue();
+        if (newVal == null) return;   // no interest in non-defined  new values
+        if (prop == null) return;     // no interest in non-specific changes
+// 	else if (prop.equalsIgnoreCase (PROP_MODE))          setMode (checkAndGetOperMode (newVal));
+//         else if (prop.equalsIgnoreCase (PROP_BEAN_VISIBLE))  setBeanVisible (BBConfig.getBoolFromString (newVal));
+//         else if (prop.equalsIgnoreCase (PROP_LISTEN_TO))     setListenTo (newVal);
+//         else if (prop.equalsIgnoreCase (PROP_DATA_IDENTITY)) setDataIdentity (newVal);
+    }
+
     /**************************************************************************
      *
      **************************************************************************/




More information about the MOBY-guts mailing list