View Javadoc

1   package org.lsst.ccs.plugin.jas3.trending.timeselection;
2   
3   import javax.swing.JComponent;
4   import org.freehep.jas.services.PreferencesTopic;
5   
6   /**
7    * Allows the user to select what time period trending plots should be displayed over.
8    * @author turri
9    */
10  public class TimeSelectionPreferencesTopic implements PreferencesTopic {
11  
12      private final String[] timeSelectionPreferencesPath = {"LSST","Trending", "Time Selection"};
13  
14      public TimeSelectionPreferencesTopic() {
15      }
16      
17      @Override
18      public boolean apply(JComponent panel) {
19          TimeSelectionPreferencesPanel prefs = (TimeSelectionPreferencesPanel) panel;
20          prefs.apply();
21          return true;
22      }
23  
24      @Override
25      public String[] path() {
26          return timeSelectionPreferencesPath;
27      }
28  
29      @Override
30      public JComponent component() {
31          return new TimeSelectionPreferencesPanel();
32      }
33  }