/**
  * This is called when the CacheManager detects the need ot clear memory. It is intended to be
  * overwritten by derived classes that are holding cached data that is not in the normal putCache
  * facilities provided by this class since that data is actually managed by the CacheManager
  */
 public void clearCachedData() {
   super.clearCachedData();
   List<RadarAdapter> adapters = getAdapters();
   for (Iterator iter = adapters.iterator(); iter.hasNext(); ) {
     RadarAdapter adapter = (RadarAdapter) iter.next();
     adapter.clearCachedData();
   }
 }
 /** Gets called by the {@link DataManager} when this DataSource has been removed. */
 public void doRemove() {
   if (getAdapters() != null) {
     for (RadarAdapter ra : getAdapters()) {
       ra.doRemove();
     }
   }
   super.doRemove();
 }
示例#3
0
  /**
   * add to properties
   *
   * @param comps comps
   */
  public void getPropertiesComponents(List comps) {
    super.getPropertiesComponents(comps);
    binWidthField = new TimeLengthField("Bin Width", true);
    binRoundToField = new TimeLengthField("Bin Round To", true);
    binWidthField.setTime(binWidth);
    binRoundToField.setTime(binRoundTo);
    List roundToItems =
        Misc.toList(
            new Object[] {
              new TwoFacedObject("Change", new Double(0)),
              new TwoFacedObject("On the hour", new Double(60)),
              new TwoFacedObject("5 after", new Double(5)),
              new TwoFacedObject("10 after", new Double(10)),
              new TwoFacedObject("15 after", new Double(15)),
              new TwoFacedObject("20 after", new Double(20)),
              new TwoFacedObject("30 after", new Double(30)),
              new TwoFacedObject("45 after", new Double(45)),
              new TwoFacedObject("10 to", new Double(50)),
              new TwoFacedObject("5 to", new Double(55))
            });

    roundToCbx =
        GuiUtils.makeComboBox(
            roundToItems, roundToItems.get(0), false, this, "setRoundToFromComboBox");

    List widthItems =
        Misc.toList(
            new Object[] {
              new TwoFacedObject("Change", new Double(0)),
              new TwoFacedObject("5 minutes", new Double(5)),
              new TwoFacedObject("10 minutes", new Double(10)),
              new TwoFacedObject("15 minutes", new Double(15)),
              new TwoFacedObject("20 minutes", new Double(20)),
              new TwoFacedObject("30 minutes", new Double(30)),
              new TwoFacedObject("45 minutes", new Double(45)),
              new TwoFacedObject("1 hour", new Double(60)),
              new TwoFacedObject("6 hours", new Double(60 * 6)),
              new TwoFacedObject("12 hours", new Double(60 * 12)),
              new TwoFacedObject("1 day", new Double(60 * 24))
            });

    widthCbx =
        GuiUtils.makeComboBox(widthItems, widthItems.get(0), false, this, "setWidthFromComboBox");

    comps.add(GuiUtils.filler());
    comps.add(getPropertiesHeader("Time Binning"));

    comps.add(GuiUtils.rLabel("Bin Size:"));
    comps.add(GuiUtils.left(GuiUtils.hbox(binWidthField.getContents(), widthCbx, 5)));
    comps.add(GuiUtils.rLabel("Round To:"));
    comps.add(GuiUtils.left(GuiUtils.hbox(binRoundToField.getContents(), roundToCbx, 5)));
  }
 /** handle legacy bundles */
 public void initAfterUnpersistence() {
   super.initAfterUnpersistence();
   Integer mostRecent = null;
   if (getProperties() != null) {
     mostRecent = (Integer) getProperties().get(MOST_RECENT);
     if (mostRecent == null) {
       mostRecent = (Integer) getProperties().get(RADAR_MOST_RECENT);
     }
   }
   if ((mostRecent != null) && (mostRecent.intValue() > 0)) {
     getPollingInfo().setFileCount(mostRecent.intValue());
   }
 }
示例#5
0
 /**
  * Add the Grid Fields component to the properties tab
  *
  * @param tabbedPane properties tab
  */
 public void addPropertiesTabs(JTabbedPane tabbedPane) {
   super.addPropertiesTabs(tabbedPane);
   List comps = new ArrayList();
   gridProperties = new GridParameters(this);
   makeGridFieldsCbx = new JCheckBox("Make Grid Fields", makeGridFields);
   comps.add(GuiUtils.filler());
   comps.add(GuiUtils.left(makeGridFieldsCbx));
   comps.addAll(gridProperties.comps);
   GuiUtils.tmpInsets = GuiUtils.INSETS_5;
   tabbedPane.addTab(
       "Objective Analysis",
       GuiUtils.topLeft(GuiUtils.doLayout(comps, 2, GuiUtils.WT_NN, GuiUtils.WT_N)));
 }
示例#6
0
 /** Reload the data */
 public void reloadData() {
   dataChoices = null;
   getDataChoices();
   super.reloadData();
 }
示例#7
0
 /** Gets called by the {@link DataManager} when this DataSource has been removed. */
 public void doRemove() {
   super.doRemove();
   if (gridProperties != null) {
     gridProperties.doRemove();
   }
 }