Package fr.soleil.bossanova.model

Examples of fr.soleil.bossanova.model.Step


    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl shift A"));

  }

  public void actionPerformed(ActionEvent e) {
    Step newStep = new Step(null, "", 1);
    importAfter(newStep);
    StateMachine.getInstance().transitionTo(StateMachine.MODEL_OPEN);
  }
View Full Code Here


    if (sequencer.getCurrentRunningStepIndex() == row) {
      result = GUIConstants.RUNNING_COLOR;
    }
    Batch batch = sequencer.getBatch();
    if (batch != null){
      Step step = batch.getStep(row);
      if (step != null){
        if (!step.isEnable()){
          result = GUIConstants.DISABLE_COLOR;
        }
        if (step.isOnFault()){
          result = GUIConstants.FAULT_COLOR;
        }
      }
    }
    return result;
View Full Code Here

                  JOptionPane.INFORMATION_MESSAGE, null,
                  possibleValues, possibleValues[0]);
        String result = (String)selectedValue;
        iterationCount = Integer.parseInt( result );
       
        Step voidStep = new Step();
        voidStep.setName("Block");
        voidStep.setIterationCount(iterationCount);
       
        int positionToInsert = getTable().getSelectedRow();     
        sequencer.insertStepAt(voidStep, positionToInsert);
     
        if( selection.length == 0)
View Full Code Here

      }
    }
  }
 
  public void doSpecificUnitaryActionOnRow(int row) {
    Step step = sequencer.getBatch().getStep(row);
    if (step != null) {
      step.setBlockId(BossaNovaSequencerImpl.getCurrentBlockInd());
      step.setBlockIterationCount(iterationCount);
      BossaNovaSequencerImpl.incCurrentBlockInd();
     
      Object stepObj = getTable().getValueAt(row, 1 );
      String stepName = "    " + (String)stepObj;
      getTable().setValueAt(stepName, row, 1 );
View Full Code Here

    if (sequencer.getCurrentRunningStepIndex() == row) {
      result = GUIConstants.RUNNING_COLOR;
    }
    Batch batch = sequencer.getBatch();
    if (batch != null){
      Step step = batch.getStep(row);
      if (step != null){
        if (!step.isEnable()){
          result = GUIConstants.DISABLE_COLOR;
        }
        if (step.isOnFault()){
          result = GUIConstants.FAULT_COLOR;
        }
      }
    }
    return result;
View Full Code Here

  }

  public static List<Step> getStepsToCopy() {
    List<Step> result = new ArrayList<Step>();
    for (Iterator<Step> iterator = stepsToCopy.iterator(); iterator.hasNext();) {
      Step step = (Step) iterator.next();
      try {
        result.add((Step) step.clone());
      } catch (Exception e) {
                // Bug 18567
        LoggerFactory.getLogger("BatchViewerControler").error("Cannot Copy selected Step");
      }
    }
View Full Code Here

  @Override
  public void run() {
    // Can't use iterator in loop because it may cause
    // ConcurrentModificationException
    List<Step> list = batch.getSteps();
    Step step = null;
    StepBlock currentBlock = null;

    for (int i = 0; i < list.size(); i++) {
      step = list.get(i);
      try {
        // if stop is requested : we stop execution of batch
        if (!isStopRequested()) {
          if (step.getBlockId() == 0) {
            executeStep(i, step);
          } else {
            if (currentBlock == null) {
              currentBlock = new StepBlock(step.getBlockIterationCount());
            }
            currentBlock.addStep(step);

            if ((i == list.size() - 1) || (step.getBlockId() != list.get(i + 1).getBlockId())) {
              executeBlock(i, currentBlock);
              currentBlock = null;
            }
          }
        }
View Full Code Here

  private void executeBlock(int blockIndex, StepBlock block) throws Exception {
    int iterationCount = block.getIterationCount();
    int iterationInd, stepInd;
    List<Step> list = block.getSteps();
    Step step = null;

    for (iterationInd = 0; iterationInd < iterationCount; iterationInd++) {
      for (stepInd = 0; stepInd < list.size(); stepInd++) {
        step = list.get(stepInd);
        try {
View Full Code Here

    setChangedAndNotify();
  }

  @Override
  public boolean addEmptyStep(String comment) {
    Step step = new Step(StepType.ACTOR, "");
    step.setComment(comment);
    return addStep(step, false);
  }
View Full Code Here

    return true;
  }

  @Override
  public boolean addSequenceStep(String stepName) {
    Step step = new Step(StepType.SEQUENCE, stepName);
    return addStep(step, true);
  }
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.