/** Save state to the PreferencesExt. */
  public void saveState(PreferencesExt store) {
    if (store == null) return;

    int ncols = table.getColumnCount();
    int[] size = new int[ncols];
    int[] modelIndex = new int[ncols];

    TableColumnModel tcm = table.getColumnModel();
    for (int i = 0; i < ncols; i++) {
      TableColumn tc = tcm.getColumn(i);
      size[i] = tc.getWidth();
      modelIndex[i] = tc.getModelIndex();
    }
    store.putBeanObject("ColumnWidths", size);
    store.putBeanObject("ColumnOrder", modelIndex);

    store.putInt("SortOnCol", model.getSortCol());
    store.putBoolean("SortReverse", model.getReverse());
    store.putBoolean("isThreadsOn", model.isThreadsOn());

    if (debug) {
      System.out.println(" store widths = ");
      for (int i = 0; i < size.length; i++) System.out.print(" " + size[i]);
      System.out.println();
    }
  }
 public void save() {
   messageTable.saveState(false);
   ddsTable.saveState(false);
   obsTable.saveState(false);
   prefs.putBeanObject("InfoWindowBounds", infoWindow.getBounds());
   prefs.putBeanObject("InfoWindowBounds2", infoWindow2.getBounds());
   prefs.putInt("splitPos", split.getDividerLocation());
   prefs.putInt("splitPos2", split2.getDividerLocation());
   if (fileChooser != null) fileChooser.save();
 }
 public void save() {
   varTable.saveState(false);
   csTable.saveState(false);
   axisTable.saveState(false);
   prefs.putBeanObject("InfoWindowBounds", infoWindow.getBounds());
   prefs.putInt("splitPos", split.getDividerLocation());
   prefs.putInt("splitPos2", split2.getDividerLocation());
   prefs.putBeanObject("InfoWindowBounds", infoWindow.getBounds());
   if (attWindow != null) prefs.putBeanObject("AttWindowBounds", attWindow.getBounds());
 }
  public void save() {
    dumpPane.save();
    for (NestedTable nt : nestedTableList) {
      nt.saveState();
    }
    prefs.putBeanObject("InfoWindowBounds", infoWindow.getBounds());
    prefs.putBeanObject("DumpWindowBounds", dumpWindow.getBounds());
    if (attWindow != null) prefs.putBeanObject("AttWindowBounds", attWindow.getBounds());

    prefs.putInt("mainSplit", mainSplit.getDividerLocation());
  }
Exemple #5
0
  public void exit() {
    session.close();

    if (dnsCache != null) {
      System.out.printf(" cache= %s%n", dnsCache.toString());
      System.out.printf(" cache.size= %d%n", dnsCache.getSize());
      System.out.printf(" cache.memorySize= %d%n", dnsCache.getMemoryStoreSize());
      Statistics stats = dnsCache.getStatistics();
      System.out.printf(" stats= %s%n", stats.toString());
    }

    cacheManager.shutdown();
    fileChooser.save();
    managePanel.save();
    accessLogPanel.save();
    servletLogPanel.save();
    urlDump.save();

    Rectangle bounds = frame.getBounds();
    prefs.putBeanObject(FRAME_SIZE, bounds);
    try {
      store.save();
    } catch (IOException ioe) {
      ioe.printStackTrace();
    }

    done = true; // on some systems, still get a window close event
    System.exit(0);
  }
Exemple #6
0
 void save() {
   if (infoWindow != null) prefs.putBeanObject(FRAME_SIZE, infoWindow.getBounds());
 }
Exemple #7
0
 public void save() {
   fileChooser.save();
   prefs.putBeanObject("InfoWindowBounds", infoWindow.getBounds());
 }