[MOBY-guts] biomoby commit
Martin Senger
senger at pub.open-bio.org
Tue Sep 13 06:53:28 UTC 2005
senger
Tue Sep 13 02:53:28 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard
In directory pub.open-bio.org:/tmp/cvs-serv10917/src/main/org/biomoby/service/dashboard
Modified Files:
AbstractPanel.java DashboardPanel.java RegistryPanel.java
Added Files:
NOTES
Log Message:
moby-live/Java/src/main/org/biomoby/service/dashboard NOTES,NONE,1.1 AbstractPanel.java,1.2,1.3 DashboardPanel.java,1.1,1.2 RegistryPanel.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.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/service/dashboard/AbstractPanel.java 2005/09/04 13:45:38 1.2
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/AbstractPanel.java 2005/09/13 06:53:28 1.3
@@ -8,12 +8,17 @@
package org.biomoby.service.dashboard;
+import org.tulsoft.tools.gui.SwingUtils;
+
import javax.swing.JLabel;
import javax.swing.JPanel;
-import javax.swing.text.html.HTMLDocument;
import javax.swing.Icon;
import javax.swing.JComponent;
+import javax.swing.AbstractButton;
+import javax.swing.text.html.HTMLDocument;
+import java.awt.GridBagConstraints;
+import java.awt.Insets;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeSupport;
@@ -29,6 +34,40 @@
extends JPanel
implements DashboardPanel {
+
+ // copy here some often used constants
+ protected static final int RELATIVE = GridBagConstraints.RELATIVE;
+ protected static final int REMAINDER = GridBagConstraints.REMAINDER;
+ protected static final int NONE = GridBagConstraints.NONE;
+ protected static final int BOTH = GridBagConstraints.BOTH;
+ protected static final int HORIZONTAL = GridBagConstraints.HORIZONTAL;
+ protected static final int VERTICAL = GridBagConstraints.VERTICAL;
+ protected static final int CENTER = GridBagConstraints.CENTER;
+ protected static final int NORTH = GridBagConstraints.NORTH;
+ protected static final int NORTHEAST = GridBagConstraints.NORTHEAST;
+ protected static final int EAST = GridBagConstraints.EAST;
+ protected static final int SOUTHEAST = GridBagConstraints.SOUTHEAST;
+ protected static final int SOUTH = GridBagConstraints.SOUTH;
+ protected static final int SOUTHWEST = GridBagConstraints.SOUTHWEST;
+ protected static final int WEST = GridBagConstraints.WEST;
+ protected static final int NORTHWEST = GridBagConstraints.NORTHWEST;
+ protected static final int PAGE_START = GridBagConstraints.PAGE_START;
+ protected static final int PAGE_END = GridBagConstraints.PAGE_END;
+ protected static final int LINE_START = GridBagConstraints.LINE_START;
+ protected static final int LINE_END = GridBagConstraints.LINE_END;
+ protected static final int FIRST_LINE_START = GridBagConstraints.FIRST_LINE_START;
+ protected static final int FIRST_LINE_END = GridBagConstraints.FIRST_LINE_END;
+ protected static final int LAST_LINE_START = GridBagConstraints.LAST_LINE_START;
+ protected static final int LAST_LINE_END = GridBagConstraints.LAST_LINE_END;
+
+
+ /*********************************************************************
+ * Default constructor (just for the sub-classes).
+ ********************************************************************/
+ protected AbstractPanel() {
+ support = new PropertyChangeSupport (this);
+ }
+
/**************************************************************************
*
**************************************************************************/
@@ -59,7 +98,7 @@
}
/**************************************************************************
- * Here we get notified when a property chnage happen.
+ * Here we get notified when a property change happen.
**************************************************************************/
public void propertyChange (PropertyChangeEvent event) {
}
@@ -83,4 +122,25 @@
**************************************************************************/
abstract public JLabel getTitle();
+ //
+ // Methods to be used by sub-classes
+ //
+
+ /*********************************************************************
+ * Set a button to a common look-and-feel.
+ ********************************************************************/
+ protected static void commonButtonLookAndFeel (AbstractButton but) {
+// but.setMargin (new Insets (0,0,0,0));
+// but.setBorderPainted (false);
+ but.setFocusPainted (false);
+// but.setContentAreaFilled (false);
+ }
+
+ /*********************************************************************
+ * Return true if confirmation dialog passed.
+ ********************************************************************/
+ public boolean confirm (Object msg) {
+ return SwingUtils.confirm (this, msg, null);
+ }
+
}
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardPanel.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/DashboardPanel.java 2005/09/02 07:38:36 1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/DashboardPanel.java 2005/09/13 06:53:28 1.2
@@ -29,7 +29,7 @@
*/
public interface DashboardPanel
- extends PropertyChangeListener {
+ extends PropertyChangeListener, DashboardProperties {
/**************************************************************************
* A name identifies a panel in the dashboard's tabs. It should be
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.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/service/dashboard/RegistryPanel.java 2005/09/04 13:45:38 1.2
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistryPanel.java 2005/09/13 06:53:28 1.3
@@ -8,16 +8,22 @@
package org.biomoby.service.dashboard;
+import org.tulsoft.tools.gui.SwingUtils;
+
import javax.swing.JLabel;
-import javax.swing.text.html.HTMLDocument;
import javax.swing.Icon;
import javax.swing.JComponent;
+import javax.swing.text.html.HTMLDocument;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeEvent;
/**
- *
+ * A panel displaying contents of a Biomoby registry. It also select
+ * what Biomoby registry to work with, and what cache directory to
+ * use. <p>
*
* WORK IN PROGRESS. <p>
*
@@ -60,7 +66,7 @@
*
**************************************************************************/
public JLabel getTitle() {
- return null;
+ return new JLabel (getName());
}
}
More information about the MOBY-guts
mailing list