Commit in hps-java/src/main/java/org/lcsim/hps/monitoring on MAIN
MonitoringPlotFactory.java+29-121.5 -> 1.6
MonitoringApplication.java+4-51.60 -> 1.61
MonitoringAnalysisFactory.java+24-11.3 -> 1.4
+57-18
3 modified files
pushing changes from laptop for SVN update

hps-java/src/main/java/org/lcsim/hps/monitoring
MonitoringPlotFactory.java 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- MonitoringPlotFactory.java	6 Nov 2013 19:19:56 -0000	1.5
+++ MonitoringPlotFactory.java	10 Dec 2013 07:36:40 -0000	1.6
@@ -18,19 +18,17 @@
  * 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.5 2013/11/06 19:19:56 jeremy Exp $
+ * @version $Id: MonitoringPlotFactory.java,v 1.6 2013/12/10 07:36:40 jeremy Exp $
  */
 class MonitoringPlotFactory extends PlotterFactory {
 
-    /*
-     * The name of the factory which will be used in naming tabs in the monitoring app.
-     */
+    /* 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.
+    /* The GUI tabs for this factory's plots. */
     private JTabbedPane tabs = new JTabbedPane();
 
-    // Root pane where this factory's top-level tab will be inserted.
+    /* Root pane where this factory's top-level tab will be inserted. */
     private static JTabbedPane rootPane = null;
 
     /**
@@ -38,8 +36,15 @@
      */
     MonitoringPlotFactory() {
         super();
-        rootPane.addTab("", tabs);
-        rootPane.setTabComponentAt(rootPane.getTabCount() - 1, new JLabel("  "));
+        
+        /* Enable embedded mode. */
+        setEmbedded(true);
+        
+        setupRootPane("  ");
+        
+        /** Setup the root pane by adding a tab for this factory. */
+        //rootPane.addTab("  ", tabs);
+        //rootPane.setTabComponentAt(rootPane.getTabCount() - 1, new JLabel("  "));
     }
 
     /**
@@ -49,6 +54,14 @@
     MonitoringPlotFactory(String name) {
         super();
         this.name = name;
+        
+        setEmbedded(true);
+        
+        setupRootPane(name);
+    }
+
+    private void setupRootPane(String name) {
+        // FIXME: hack
         if (!(new RuntimeException()).getStackTrace()[2].getClassName()
                 .equals("hep.aida.ref.plotter.style.registry.StyleStoreXMLReader")) {
             rootPane.addTab(name, tabs);
@@ -63,10 +76,7 @@
      */
     public IPlotter create(String plotterName) {
         IPlotter plotter = super.create(plotterName);
-        JPanel plotterPanel = new JPanel(new BorderLayout());
-        plotterPanel.add(PlotterUtilities.componentForPlotter(plotter), BorderLayout.CENTER);
-        tabs.addTab(plotterName, plotterPanel);
-        tabs.setTabComponentAt(tabs.getTabCount() - 1, new JLabel(plotterName));
+        setupPlotterTab(plotterName, plotter);
         return plotter;
     }
 
@@ -85,4 +95,11 @@
     static void setRootPane(JTabbedPane rootPane) {
         MonitoringPlotFactory.rootPane = rootPane;
     }
+    
+    private void setupPlotterTab(String plotterName, IPlotter plotter) {
+        JPanel plotterPanel = new JPanel(new BorderLayout());
+        plotterPanel.add(PlotterUtilities.componentForPlotter(plotter), BorderLayout.CENTER);
+        tabs.addTab(plotterName, plotterPanel);
+        tabs.setTabComponentAt(tabs.getTabCount() - 1, new JLabel(plotterName));
+    }
 }
\ No newline at end of file

hps-java/src/main/java/org/lcsim/hps/monitoring
MonitoringApplication.java 1.60 -> 1.61
diff -u -r1.60 -r1.61
--- MonitoringApplication.java	6 Nov 2013 19:19:56 -0000	1.60
+++ MonitoringApplication.java	10 Dec 2013 07:36:40 -0000	1.61
@@ -93,7 +93,7 @@
  * converted from the ET ring. This class is accessible to users by calling its main()
  * method.
  * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: MonitoringApplication.java,v 1.60 2013/11/06 19:19:56 jeremy Exp $
+ * @version $Id: MonitoringApplication.java,v 1.61 2013/12/10 07:36:40 jeremy Exp $
  */
 // FIXME: Review minimum size settings to see which are actually being respected. Remove
 // where they are not needed.
@@ -1595,13 +1595,12 @@
 
         log(Level.INFO, "Setting up LCSim.");
 
-        // Clear the static AIDA tree in case plots are hanging around from previous
-        // sessions.
+        // Clear the static AIDA tree in case plots are hanging around from previous sessions.
         resetAidaTree();
 
-        // Reset the plots tab.
+        // Reset the top plots panel so that it is empty.
         plotPane.removeAll();
-        // ((MonitoringAnalysisFactory)MonitoringAnalysisFactory.create()).clearPlotFactories();
+        //((MonitoringAnalysisFactory)MonitoringAnalysisFactory.create()).clearPlotterFactories();
 
         // Get steering resource or file as a String parameter.
         String steering = getSteering();

hps-java/src/main/java/org/lcsim/hps/monitoring
MonitoringAnalysisFactory.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- MonitoringAnalysisFactory.java	6 Nov 2013 19:19:56 -0000	1.3
+++ MonitoringAnalysisFactory.java	10 Dec 2013 07:36:40 -0000	1.4
@@ -10,10 +10,16 @@
  * <code>IPlotterFactory</code> object.
  * 
  * @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: MonitoringAnalysisFactory.java,v 1.3 2013/11/06 19:19:56 jeremy Exp $
+ * @version $Id: MonitoringAnalysisFactory.java,v 1.4 2013/12/10 07:36:40 jeremy Exp $
  */
 public class MonitoringAnalysisFactory extends AnalysisFactory {
 
+    //Map<String,IPlotterFactory> plotterFactories = new HashMap<String,IPlotterFactory>();
+    
+    public MonitoringAnalysisFactory() {
+        System.out.println("MonitoringAnalysisFactory - ctor");
+    }
+    
     /**
      * Register this class as the default AnalysisFactory for AIDA by setting
      * the magic property string.
@@ -26,13 +32,30 @@
      * Create a named plotter factory for the monitoring application.
      */
     public IPlotterFactory createPlotterFactory(String name) {
+        System.out.println("createPlotterFactory - " + name);
+        //if (!plotterFactories.containsKey(name)) {
+        //    plotterFactories.put(name, new MonitoringPlotFactory(name));
+        //}
         return new MonitoringPlotFactory(name);
+        //return plotterFactories.get(name);
     }
 
     /**
      * Create an unnamed plotter factory for the monitoring application.
      */
     public IPlotterFactory createPlotterFactory() {
+        //System.out.println("createPlotterFactory - w/o name");
         return new MonitoringPlotFactory(null);
     }
+    
+    /*
+    public void clearPlotterFactories() {
+        if (plotterFactories.size() > 0) {
+            System.out.println("clearPlotterFactories - clearing " + plotterFactories.size() + " plotterFactories");
+            plotterFactories.clear();
+        } else {
+            System.out.println("clearPlotterFactories - plotterFactories is empty");
+        }
+    }
+    */
 }
\ No newline at end of file
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