Package fr.soleil.bossanova.model

Examples of fr.soleil.bossanova.model.Step


    }
  }

  public void moveStepdown(final int stepIndex) {
    if (stepIndex < batch.size() - 1) {
      final Step stepToMove = batch.getStep(stepIndex);
      if (stepToMove != null) {
        batch.removeStepAt(stepIndex);
        batch.insertStepAt(stepToMove, stepIndex + 1);
        setCurrentBatchSaved(false);
        setChangedAndNotify();
View Full Code Here


      }
    }
  }

  public void modifyIterationCountForStepAt(final int stepIndex, final int iterationCount) {
    final Step step = getBatch().getStep(stepIndex);

    if (step != null) {
      if (step.isBlockDelimiter()) {
        step.setBlockIterationCount(iterationCount);
      } else {
        step.setIterationCount(iterationCount);
      }
      setCurrentBatchSaved(false);
      setChangedAndNotify();
    }
  }
View Full Code Here

      setChangedAndNotify();
    }
  }

  public void modifyTypeAndNameForStepAt(final int stepIndex, final String name, final StepType stepType) {
    final Step step = getBatch().getStep(stepIndex);

    if (step != null) {
      if (stepType == null) {
        step.setOnFault(true);
        JOptionPane.showMessageDialog(BossaNovaData.getSingleton().getApplication().getDialogHookComponent(),
            "Error in Step configuration - unknown Step type or data " + step.getName());
      } else {

        // we apply changes only if it's a real changes. for example if the current step is
        // a Traccer and user click on combobox step to select a Tracer (same actor) then
        // there are nothing to change. But if he select an AttributeReader it's a real
        // change and we apply it.
        //
        // cf bug 0018737
        if ((!step.getName().equals(name)) || (step.getType() != stepType)) {
          step.setOnFault(false);
          step.setFlow(null);
          step.setName(name);
          step.setType(stepType);

          // TODO REFACTOR that's weird
          BossaNovaData.getSingleton().getApplication().getMainScreen().changeStep();
          setCurrentBatchSaved(false);
          setChangedAndNotify();
View Full Code Here

      }
    }
  }

  public void modifyCommentForStepAt(final int stepIndex, final String comment) {
    final Step step = getBatch().getStep(stepIndex);

    if (step != null) {
      step.setComment(comment);
    }
  }
View Full Code Here

      step.setComment(comment);
    }
  }

  public void modifyEnableForStepAt(final int stepIndex, final boolean enable) {
    final Step step = getBatch().getStep(stepIndex);

    if (step != null) {
      step.setEnable(enable);
    }
  }
View Full Code Here

   *
   * @param enable
   */
  public void modifyEnableForAllStep(final boolean enable) {
    for (int i = 0; i < getBatch().size(); i++) {
      final Step step = getBatch().getStep(i);
      step.setEnable(enable);
    }
    setCurrentBatchSaved(false);
    setChangedAndNotify();
  }
View Full Code Here

    setChangedAndNotify();
  }

  public void checkBatchSteps() {
    for (int i = 0; i < getBatch().size(); i++) {
      final Step step = getBatch().getStep(i);
      if (StepType.SEQUENCE.equals(step.getType())) {
        final File f = RepositoryManager.getSequenceRepository().getSequenceForName(step.getName());
        if (f == null) {
          step.setOnFault(true);
          setChangedAndNotify();
        }
      }
    }
View Full Code Here

    BatchViewer viewer = getBatchViewerPanel();
    if (viewer != null) {

      int selectedIndex = viewer.getSelectedRowIndex();
      if (selectedIndex >= 0) {
        Step currentStep = sequencer.getBatch().getStep(selectedIndex);
        BossaNovaData.getSingleton().getApplication().setSelectedStep(selectedIndex, currentStep);

        // if a batch is running and the selected step were already
        // executed
        // we disable the parameters panels
View Full Code Here

    }

    public void actionPerformed(ActionEvent e) {
    int index = table.getSelectedRow();
    if (index >= 0) {
        Step newStep = new Step(null, "", 1);
        sequencer.insertStepAt(newStep,index);
        // We select the new step.
        BossaNovaData.getSingleton().getApplication().setSelectedStep(index, newStep);
      StateMachine.getInstance().transitionTo(StateMachine.MODEL_OPEN);
View Full Code Here

    protected void doSpecificPreTreatment(){
        BatchViewerControler.cleanStepsToCopy();
    }
    protected void doSpecificUnitaryActionOnRow(int row) {
        if (row >= 0) {
            Step step = sequencer.getBatch().getStep(row);
            if (step != null) {
                BatchViewerControler.addStepToCopy(step);
            }

            sequencer.removeStepAt(row);
View Full Code Here

TOP

Related Classes of fr.soleil.bossanova.model.Step

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.