LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  May 2015

HPS-SVN May 2015

Subject:

r3033 - /java/trunk/monitoring-util/src/main/java/org/hps/monitoring/plotting/PlotterRegistry.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Wed, 27 May 2015 19:37:22 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (94 lines)

Author: [log in to unmask]
Date: Wed May 27 12:37:13 2015
New Revision: 3033

Log:
Minor changes.

Modified:
    java/trunk/monitoring-util/src/main/java/org/hps/monitoring/plotting/PlotterRegistry.java

Modified: java/trunk/monitoring-util/src/main/java/org/hps/monitoring/plotting/PlotterRegistry.java
 =============================================================================
--- java/trunk/monitoring-util/src/main/java/org/hps/monitoring/plotting/PlotterRegistry.java	(original)
+++ java/trunk/monitoring-util/src/main/java/org/hps/monitoring/plotting/PlotterRegistry.java	Wed May 27 12:37:13 2015
@@ -10,13 +10,14 @@
 import java.util.Map.Entry;
 
 /**
- * This is a global registry of plotters used by the monitoring plot factory. 
+ * This is a global registry of plotters used by the monitoring plot factory.
+ * 
  * @author Jeremy McCormick <[log in to unmask]>
  */
 public class PlotterRegistry {
-    
+
     HashMap<IPlotter, int[]> plotterMap = new HashMap<IPlotter, int[]>();
-    
+
     /**
      * Clear the list of plotters.
      */
@@ -24,9 +25,10 @@
         System.out.println("clearing PlotterRegistry");
         plotterMap.clear();
     }
-    
+
     /**
      * Find a plotter that contains the region object.
+     * 
      * @param region The plotter region object.
      * @return The plotter that contains this region or null if none.
      */
@@ -40,20 +42,31 @@
         }
         return null;
     }
-    
+
+    /**
+     * Get the tab indices of the plotter.
+     * 
+     * @param plotter the plotter to lookup
+     * @return the tab indices of the plotter or <code>null</code> if it doesn't exist
+     */
+    public int[] getTabIndices(IPlotter plotter) {
+        return plotterMap.get(plotter);
+    }
+
     /**
      * Register a plotter along with its tab indices.
+     * 
      * @param plotter The plotter to register.
      * @param index1 The top tab index.
      * @param index2 The sub-tab index.
      */
     public void register(IPlotter plotter, int index1, int index2) {
-        plotterMap.put(plotter, new int[] { index1, index2 });
+        plotterMap.put(plotter, new int[] {index1, index2});
     }
-    
+
     /**
-     * Find a plotter by its tab indices e.g. those that are currently selected
-     * in an application.
+     * Find a plotter by its tab indices e.g. those that are currently selected in an application.
+     * 
      * @param index1 The top tab index.
      * @param index2 The sub-tab index.
      * @return The plotter or null if none found.
@@ -67,9 +80,10 @@
         }
         return null;
     }
-    
+
     /**
      * Get the current collection of plotters as an unmodifiable collection.
+     * 
      * @return The current collection of plotters.
      */
     public List<IPlotter> getPlotters() {

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use