예제 #1
0
  /**
   * @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);
    }
  }
예제 #2
0
파일: Scene.java 프로젝트: Giladx/mpm
 private void saveCalibration() {
   Preferences p = PreferencesStore.get();
   int iv = 0;
   for (View v : getViews()) {
     v.getCalibrationContext().save(p, iv);
     iv++;
   }
 }
예제 #3
0
파일: Scene.java 프로젝트: Giladx/mpm
 private void loadCalibration() {
   Preferences p = PreferencesStore.get();
   int iv = 0;
   for (View v : getViews()) {
     v.getCalibrationContext().load(p, iv);
     calibrate(v);
     iv++;
   }
 }