Examples of IRunnable


Examples of org.jamesii.core.processor.IRunnable

  private class ShowStatusCommandAction extends CommandAction {

    @Override
    public boolean execute(String param) {

      IRunnable r = ((IRunnable) simulation.getProcessorInfo().getLocal());

      if (r.isRunning()) {
        out.print("Running");
        if (r.isPausing()) {
          out.print(" but currently paused");
        }
        if (r.isStopping()) {
          out.print(" and trying to stop");
        }
      } else {
        if (r.isStopping()) {
          out.print("Simulation stopped.");
        }
//        } else {
//          if (simulation.getProcessorInfo().getLocal().getTime() > 0) {
//            out.print("Simulation has run up to "
View Full Code Here

Examples of org.jamesii.core.processor.IRunnable

  }

  @Override
  public void simulationInitialized(ITaskRunner simRunner,
      ComputationTaskRuntimeInformation srti) {
    IRunnable processor =
        (IRunnable) srti.getComputationTask().getProcessorInfo().getLocal();
    toolbar.setProcessor(processor);
  }
View Full Code Here

Examples of org.jamesii.core.processor.IRunnable

    synchronized (this) {
      try {
        IProcessor processor =
            getSimRuntimeInfo().getComputationTask().getProcessorInfo()
                .getLocal();
        IRunnable run = null;
        if (processor instanceof IRunnable) {
          run = (IRunnable) processor;
        } else {
          return;
        }
        if (!simControllingPossible()) {
          SimSystem.report(Level.INFO,
              "Computing the computation task stepwise is not possible.");
          return;
        }
        ComputationRuntimeState state = getSimRuntimeInfo().getState();
        if (state == ComputationRuntimeState.RUNNING) {
          run.pause();
        }

        // show input dialog where the user can enter the steps amount to
        // forward
        String slowDown =
            JOptionPane.showInputDialog(
                "Please enter the delay in ms after each computation step.",
                delay == null ? DEFAULT_SIMSTEP_DELAY_MS : delay);

        // TODO fill with the current pause value set in the run object
        if (slowDown == null) {
          if (state == ComputationRuntimeState.RUNNING) {
            run.pause();
          }
          return;
        }

        try {
          delay = new Long(slowDown);
        } catch (Exception ex) {
          SimSystem.report(Level.INFO, "No valid delay given!");
        }
        run.setDelay(delay);
        if (state == ComputationRuntimeState.RUNNING) {
          run.pause();
          // getSimRuntimeInfo().setState(SimulationRuntimeState.RUNNING);
        }
      } catch (Exception e2) {
      }
    }
View Full Code Here

Examples of org.jamesii.core.processor.IRunnable

    // the simulation run has to be a local simulation run object
    ISimulationRun simulation = getSimulationByUID(simulationID);

    if (simulation != null) {

      IRunnable runnable = (IRunnable) simulation.getProcessorInfo().getLocal();

      Object result =
          org.jamesii.core.util.Reflect.executeMethod(runnable, command, args);

      // special case: stop => we have to remove the simulation
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.