Ejemplo n.º 1
0
  private void quit() {
    String currentMapRestorable = (getModel() != null) ? getModel().getRestoreable() : null;
    while (getView() != null) {
      boolean closingNotCancelled = getMapModuleManager().close(false);
      if (!closingNotCancelled) {
        return;
      }
    }

    String lastOpenedString = lastOpened.save();
    setProperty("lastOpened", lastOpenedString);
    if (currentMapRestorable != null) {
      getFrame().setProperty("onStartIfNotSpecified", currentMapRestorable);
    }
    // getFrame().setProperty("menubarVisible",menubarVisible ? "true" :
    // "false");
    // ^ Not allowed in application because of problems with not working key
    // shortcuts
    setProperty("toolbarVisible", toolbarVisible ? "true" : "false");
    // ICON AOP
    // setProperty("leftToolbarVisible", leftToolbarVisible ? "true" :
    // "false");
    setProperty("antialiasEdges", antialiasEdges ? "true" : "false");
    setProperty("antialiasAll", antialiasAll ? "true" : "false");
    setProperty("appwindow_width", String.valueOf(getFrame().getWinWidth()));
    setProperty("appwindow_height", String.valueOf(getFrame().getWinHeight()));
    setProperty("appwindow_state", String.valueOf(getFrame().getWinState()));
    getFrame().saveProperties();
    // save to properties
    System.exit(0);
  }
Ejemplo n.º 2
0
 /**
  * @param storage
  * @param propertyName
  */
 public void storeDialogPositions(
     JDialog dialog, WindowConfigurationStorage storage, String propertyName) {
   storage.setX((dialog.getX()));
   storage.setY((dialog.getY()));
   storage.setWidth((dialog.getWidth()));
   storage.setHeight((dialog.getHeight()));
   String marshalled = marshall(storage);
   setProperty(propertyName, marshalled);
 }