Package fr.soleil.bossanova.gui.view.batchViewer

Examples of fr.soleil.bossanova.gui.view.batchViewer.BatchLoadSaveMonitor


    public void setBatch(Batch batch) {
        int percentCompleted = 0;
        String tracePercent;

        BatchLoadSaveMonitor BLSMonitor = new BatchLoadSaveMonitor("Loading batch");
       
        BLSMonitor.setLocationRelativeTo(BossaNovaData.getSingleton().getApplication().getMainScreen());
        BLSMonitor.setVisible(true);

        this.batch = batch;
        if (batch != null) {
            // We force create a flow for each step
            List<Step> steps = batch.getSteps();
            if (steps != null) {
                for (int i = 0; i
                        < steps.size(); i++) {
                    try {
                        if (steps.get(i) != null) {
                            createFlow(steps.get(i), true);
                           
                            if( i * 100 / steps.size() > percentCompleted )
                            {
                                percentCompleted = i * 100 / steps.size();
                                tracePercent = percentCompleted + "% Completed";
                               
                                BLSMonitor.updateBar(percentCompleted);
                                BLSMonitor.setString(tracePercent);
                                BLSMonitor.update(BLSMonitor.getGraphics());

                            }
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }

            // We select the first step in the Batch
            BossaNovaData.getSingleton().getApplication().setSelectedStep(batch.getStep(0), true);
           
            BLSMonitor.setVisible(false);

        }
        setChangedAndNotify();
    }
View Full Code Here


  public void setAllConfiguredParameters() {
      int stepNum = getSteps().size();
      int currentStepInd = 0, percentCompleted = 0;
      String tracePercent;
     
      BatchLoadSaveMonitor BLSMonitor = new BatchLoadSaveMonitor("Saving batch");
     
      BLSMonitor.setLocationRelativeTo(BossaNovaData.getSingleton().getApplication().getMainScreen());
      BLSMonitor.setVisible(true);
           
    for (Step step : getSteps()) {
      step.applyFlowParametersToStep();
      //Bug 17645
            //BossaNovaData.getSingleton().getApplication().setSelectedStep(step, true);
      try
      {
          Thread.sleep(100);
      }
      catch (final InterruptedException e)
      {
          e.printStackTrace();
      }
      currentStepInd++;
      if( (currentStepInd * 100) / stepNum > percentCompleted)
      {
          percentCompleted = (currentStepInd * 100) / stepNum;
          tracePercent = percentCompleted + "% Completed";
         
          BLSMonitor.updateBar(percentCompleted);
          BLSMonitor.setString(tracePercent);
          BLSMonitor.update(BLSMonitor.getGraphics());
  
      }

    }
    BLSMonitor.setVisible(false);
  }
View Full Code Here

  public void setAllConfiguredParameters() {
      int stepNum = getSteps().size();
      int currentStepInd = 0, percentCompleted = 0;
      String tracePercent;
     
      BatchLoadSaveMonitor BLSMonitor = new BatchLoadSaveMonitor("Saving batch");
     
      BLSMonitor.setLocationRelativeTo(BossaNovaData.getSingleton().getApplication().getMainScreen());
      BLSMonitor.setVisible(true);
           
    for (Step step : getSteps()) {
      step.applyFlowParametersToStep();
      //Bug 17645
            //BossaNovaData.getSingleton().getApplication().setSelectedStep(step, true);
      try
      {
          Thread.sleep(100);
      }
      catch (final InterruptedException e)
      {
          e.printStackTrace();
      }
      currentStepInd++;
      if( (currentStepInd * 100) / stepNum > percentCompleted)
      {
          percentCompleted = (currentStepInd * 100) / stepNum;
          tracePercent = percentCompleted + "% Completed";
         
          BLSMonitor.updateBar(percentCompleted);
          BLSMonitor.setString(tracePercent);
          BLSMonitor.update(BLSMonitor.getGraphics());
  
      }

    }
    BLSMonitor.setVisible(false);
  }
View Full Code Here

  public void setAllConfiguredParameters() {
      int stepNum = getSteps().size();
      int currentStepInd = 0, percentCompleted = 0;
      String tracePercent;
     
      BatchLoadSaveMonitor BLSMonitor = new BatchLoadSaveMonitor("Saving batch");
     
      BLSMonitor.setLocationRelativeTo(BossaNovaData.getSingleton().getApplication().getMainScreen());
      BLSMonitor.setVisible(true);
           
    for (Step step : getSteps()) {
      step.applyFlowParametersToStep();
      //Bug 17645
      /***
            BossaNovaData.getSingleton().getApplication()
            .setSelectedStep(step, true);
            ***/
      currentStepInd++;
      if( (currentStepInd * 100) / stepNum > percentCompleted)
      {
          percentCompleted = (currentStepInd * 100) / stepNum;
          tracePercent = percentCompleted + "% Completed";
         
          BLSMonitor.updateBar(percentCompleted);
          BLSMonitor.setString(tracePercent);
          BLSMonitor.update(BLSMonitor.getGraphics());
  
      }

    }
    BLSMonitor.setVisible(false);
  }
View Full Code Here

  public void setBatch(Batch batch) {
    int percentCompleted = 0;
    String tracePercent;

    BatchLoadSaveMonitor BLSMonitor = new BatchLoadSaveMonitor(
        "Loading batch");

    BLSMonitor.setLocationRelativeTo(BossaNovaData.getSingleton()
        .getApplication().getMainScreen());
    BLSMonitor.setVisible(true);

    this.batch = batch;
    if (batch != null) {
      // We force create a flow for each step
      List<Step> steps = batch.getSteps();
      if (steps != null) {
        for (int i = 0; i < steps.size(); i++) {
          try {
            if (steps.get(i) != null) {

              // 29/04/2011 SPJZ : due to Erwin advice (cf
              // createFlow)
              createFlow(steps.get(i), batch.getBatchDirector(),
                  true);
              // END change SPJZ

              if (i * 100 / steps.size() > percentCompleted) {
                percentCompleted = i * 100 / steps.size();
                tracePercent = percentCompleted + "% Completed";

                BLSMonitor.updateBar(percentCompleted);
                BLSMonitor.setString(tracePercent);
                BLSMonitor.update(BLSMonitor.getGraphics());

              }
            }
          } catch (Exception e) {
            e.printStackTrace();
          }
        }
      }

      // We select the first step in the Batch
      BossaNovaData.getSingleton().getApplication().setSelectedStep(
          batch.getStep(0), true);

      BLSMonitor.setVisible(false);

    }
    setChangedAndNotify();
  }
View Full Code Here

    public void setBatch(Batch batch) {
        int percentCompleted = 0;
        String tracePercent;

        BatchLoadSaveMonitor BLSMonitor = new BatchLoadSaveMonitor("Loading batch");
       
        BLSMonitor.setLocationRelativeTo(BossaNovaData.getSingleton().getApplication().getMainScreen());
        BLSMonitor.setVisible(true);

        this.batch = batch;
        if (batch != null) {
            // We force create a flow for each step
            List<Step> steps = batch.getSteps();
            if (steps != null) {
                for (int i = 0; i
                        < steps.size(); i++) {
                    try {
                        if (steps.get(i) != null) {
                            createFlow(steps.get(i), true);
                           
                            if( i * 100 / steps.size() > percentCompleted )
                            {
                                percentCompleted = i * 100 / steps.size();
                                tracePercent = percentCompleted + "% Completed";
                               
                                BLSMonitor.updateBar(percentCompleted);
                                BLSMonitor.setString(tracePercent);
                                BLSMonitor.update(BLSMonitor.getGraphics());

                            }
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }

            // We select the first step in the Batch
            BossaNovaData.getSingleton().getApplication().setSelectedStep(batch.getStep(0), true);
           
            BLSMonitor.setVisible(false);

        }
        setChangedAndNotify();
    }
View Full Code Here

    public void setBatch(Batch batch) {
        int percentCompleted = 0;
        String tracePercent;

        BatchLoadSaveMonitor BLSMonitor = new BatchLoadSaveMonitor("Loading batch");
       
        BLSMonitor.setLocationRelativeTo(BossaNovaData.getSingleton().getApplication().getMainScreen());
        BLSMonitor.setVisible(true);

        this.batch = batch;
        if (batch != null) {
            // We force create a flow for each step
            List<Step> steps = batch.getSteps();
            if (steps != null) {
                for (int i = 0; i
                        < steps.size(); i++) {
                    try {
                        if (steps.get(i) != null) {
                            createFlow(steps.get(i), true);
                           
                            if( i * 100 / steps.size() > percentCompleted )
                            {
                                percentCompleted = i * 100 / steps.size();
                                tracePercent = percentCompleted + "% Completed";
                               
                                BLSMonitor.updateBar(percentCompleted);
                                BLSMonitor.setString(tracePercent);
                                BLSMonitor.update(BLSMonitor.getGraphics());

                            }
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }

            // We select the first step in the Batch
            BossaNovaData.getSingleton().getApplication().setSelectedStep(batch.getStep(0), true);
           
            BLSMonitor.setVisible(false);

        }
        setChangedAndNotify();
    }
View Full Code Here

TOP

Related Classes of fr.soleil.bossanova.gui.view.batchViewer.BatchLoadSaveMonitor

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.