Package fr.soleil.bossanova.model

Examples of fr.soleil.bossanova.model.Step


    }

    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.
        BossaNovaReferentComponent.getSingleton().getApplication().setSelectedStep(newStep, false);
      StateMachine.getInstance().transitionTo(StateMachine.MODEL_OPEN);
View Full Code Here


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

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

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

    @Override
    public void run() {
        // Can't use iterator in loop because it may cause
        // ConcurrentModificationException
        final 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(final int blockIndex, final StepBlock block) throws Exception {
        final int iterationCount = block.getIterationCount();
        int iterationInd, stepInd;
        final 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(final String comment) {
        final Step step = new Step(StepType.ACTOR, "");
        step.setComment(comment);
        return addStep(step, false);
    }
View Full Code Here

        return true;
    }

    @Override
    public boolean addSequenceStep(final String stepName) {
        final Step step = new Step(StepType.SEQUENCE, stepName);
        return addStep(step, true);
    }
View Full Code Here

    }

    @Override
    public boolean addActorStep(final String stepName, final String comment,
            final Map<String, String> parameters) {
        final Step step = new Step(StepType.ACTOR, stepName);
        step.setParameters(parameters);
        step.setComment(comment);
        return addStep(step, true);
    }
View Full Code Here

    }

    public void insertStepsAt(final List<Step> steps, final int index) {
        if (batch != null) {
            for (int i = 0; i < steps.size(); i++) {
                final Step step = steps.get(i);
                batch.insertStepAt(step, index + i);
            }
        }
        setCurrentBatchSaved(false);
        setChangedAndNotify();
View Full Code Here

        setChangedAndNotify();
    }

    public void moveStepUp(final int stepIndex) {
        if (stepIndex > 0 && stepIndex < batch.size()) {
            final Step stepToMove = batch.getStep(stepIndex);
            if (stepToMove != null) {
                batch.removeStepAt(stepIndex);
                batch.insertStepAt(stepToMove, stepIndex - 1);
                setCurrentBatchSaved(false);
                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

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.