/**
   * @param args
   * @throws SshToolsApplicationException
   */
  public void init(String[] args) throws SshToolsApplicationException {
    File f = getApplicationPreferencesDirectory();

    if (f != null) {
      //
      PreferencesStore.init(new File(f, getApplicationName() + ".properties"));
      log.info("Preferences will be saved to " + f.getAbsolutePath());
    } else {
      log.warn("No preferences can be saved.");
    }

    try {
      setLookAndFeel(PreferencesStore.get(PREF_LAF, SYSTEM_LAF));

      UIManager.put(
          "OptionPane.errorIcon", new ResourceIcon(SshToolsApplication.class, "dialog-error4.png"));
      UIManager.put(
          "OptionPane.informationIcon",
          new ResourceIcon(SshToolsApplication.class, "dialog-information.png"));
      UIManager.put(
          "OptionPane.warningIcon",
          new ResourceIcon(SshToolsApplication.class, "dialog-warning2.png"));
      UIManager.put(
          "OptionPane.questionIcon",
          new ResourceIcon(SshToolsApplication.class, "dialog-question3.png"));
    } catch (Throwable t) {
      log.error(t);
    }
  }
Beispiel #2
0
 private void saveCalibration() {
   Preferences p = PreferencesStore.get();
   int iv = 0;
   for (View v : getViews()) {
     v.getCalibrationContext().save(p, iv);
     iv++;
   }
 }
Beispiel #3
0
 private void loadCalibration() {
   Preferences p = PreferencesStore.get();
   int iv = 0;
   for (View v : getViews()) {
     v.getCalibrationContext().load(p, iv);
     calibrate(v);
     iv++;
   }
 }