Commit in hps-java/src/main/java/org/lcsim/hps/monitoring on MAIN
MonitoringPlotFactory.java+14-91.2 -> 1.3
fix up tab naming

hps-java/src/main/java/org/lcsim/hps/monitoring
MonitoringPlotFactory.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- MonitoringPlotFactory.java	5 Jun 2013 17:34:59 -0000	1.2
+++ MonitoringPlotFactory.java	5 Jun 2013 19:06:59 -0000	1.3
@@ -5,6 +5,8 @@
 import hep.aida.ref.plotter.PlotterUtilities;
 
 import java.awt.BorderLayout;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.swing.JLabel;
 import javax.swing.JPanel;
@@ -18,33 +20,36 @@
  * plotter factories.  It is set externally by the MonitoringApplication before 
  * any calls to AIDA are made from Drivers.  
  * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: MonitoringPlotFactory.java,v 1.2 2013/06/05 17:34:59 jeremy Exp $
+ * @version $Id: MonitoringPlotFactory.java,v 1.3 2013/06/05 19:06:59 jeremy Exp $
  */
 class MonitoringPlotFactory extends PlotterFactory {
     
-    // Name of factory.
-    String name = null;
-    
+	// The name of the factory which will be used in naming tabs in the monitoring app.
+	String name = null;
+	
     // The GUI tabs for this factory's plots.
-    JTabbedPane tabs = new JTabbedPane();
+    private JTabbedPane tabs = new JTabbedPane();
     
     // Root pane where this factory's top-level tab will be inserted.
-    static JTabbedPane rootPane = null;
+    private static JTabbedPane rootPane = null;
     
     MonitoringPlotFactory() {        
         super();
         rootPane.addTab("", tabs);
+        rootPane.setTabComponentAt(rootPane.getTabCount()-1, new JLabel("  "));
     }
     
     MonitoringPlotFactory(String name) {
         super();
         this.name = name;        
-        if (!(new RuntimeException()).getStackTrace()[2].getClassName().equals("hep.aida.ref.plotter.style.registry.StyleStoreXMLReader"))
+        if (!(new RuntimeException()).getStackTrace()[2].getClassName().equals("hep.aida.ref.plotter.style.registry.StyleStoreXMLReader")) {
             rootPane.addTab(name, tabs);
+            rootPane.setTabComponentAt(rootPane.getTabCount()-1, new JLabel(name));
+        }
     }
               
     public IPlotter create(String plotterName) {
-        IPlotter plotter = super.create(plotterName);         
+        IPlotter plotter = super.create(plotterName);
         JPanel plotterPanel = new JPanel(new BorderLayout());
         plotterPanel.add(PlotterUtilities.componentForPlotter(plotter), BorderLayout.CENTER);
         tabs.addTab(plotterName, plotterPanel);
@@ -57,7 +62,7 @@
     }
     
     /**
-     * Set the static reference to the root tabbed pane where this factory's GUI tabs will be inserted. 
+     * Set the reference to the root tab pane where this factory's GUI tabs will be inserted. 
      * @param rootPane
      */
     static void setRootPane(JTabbedPane rootPane) {
CVSspam 0.2.12


Use REPLY-ALL to reply to list

To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1