Ejemplo n.º 1
0
 /** ************************************************************************* * * Do the step */
 private DialogAndInProcessCmd stepToProcess() {
   if (doAdd) {
     doAdd();
   } else {
     doRemove();
   }
   appState_.getPathControls().handlePathButtons();
   return (new DialogAndInProcessCmd(DialogAndInProcessCmd.Progress.DONE, this));
 }
Ejemplo n.º 2
0
 /** ************************************************************************* * * Command */
 public void doAdd() {
   UserTreePathStopCreationDialog scd = new UserTreePathStopCreationDialog(appState_);
   scd.setVisible(true);
   if (!scd.haveResult()) {
     return;
   }
   String addToPathKey = scd.getChosenPath();
   String insertMode = scd.getInsertionMode();
   appState_.getPathController().addAStop(addToPathKey, insertMode, dacx_);
   appState_.getPathControls().handlePathButtons();
   return;
 }
Ejemplo n.º 3
0
 /** ************************************************************************* * * Command */
 public void doRemove() {
   if (appState_.getPathController().pathHasOnlyOneStop()) {
     ResourceManager rMan = appState_.getRMan();
     int ok =
         JOptionPane.showConfirmDialog(
             appState_.getTopFrame(),
             rMan.getString("treePathDeleteStop.oneStopWarningMessage"),
             rMan.getString("treePathDeleteStop.oneStopWarningMessageTitle"),
             JOptionPane.YES_NO_OPTION);
     if (ok != JOptionPane.YES_OPTION) {
       return;
     }
   }
   appState_.getPathController().deleteCurrentStop(dacx_);
   appState_.getPathControls().handlePathButtons();
   return;
 }