Package fr.soleil.bossanova.model

Examples of fr.soleil.bossanova.model.Batch


    // --------------------------------------------------------------------------
    // BATCH CONSTRUCTION
    // --------------------------------------------------------------------------
    @Override
    public void cleanAll() {
        this.batch = new Batch();
        application.setSelectedStep(null, false);
        setChangedAndNotify();
    }
View Full Code Here


  // --------------------------------------------------------------------------
  // CONSTRUCTOR
  // --------------------------------------------------------------------------
  public BossaNovaSequencerImpl() {
    super();
    batch = new Batch();
    executionListeners = new ArrayList<ExecutionListener>();
  }
View Full Code Here

  // --------------------------------------------------------------------------
  // BATCH CONSTRUCTION
  // --------------------------------------------------------------------------
  @Override
  public void cleanAll() {
    this.batch = new Batch();
    BossaNovaData.getSingleton().getApplication().setSelectedStep(0, null);
    setChangedAndNotify();
  }
View Full Code Here

    sequencer = sequencerToLink;
  }

  public static Batch saveBatchAs(File destination) throws IOException {
    currentBatchFile = destination;
    Batch result = sequencer.getBatch();
    result.setAllConfiguredParameters();
    FileWriter writer = null;
    try {
      writer = new FileWriter(destination);
      xmlStreamer.toXML(result, writer);
    } finally {
View Full Code Here

  public static void loadBatch(File file) throws IOException {
    currentBatchFile = file;
    FileReader reader = null;
    try {
      reader = new FileReader(file);
      Batch batch = (Batch) xmlStreamer.fromXML(reader);
      sequencer.setBatch(batch);
      // DBA Need to create director when loading a batch
      sequencer.createBatchDirector();
    } catch (IOException ioe) {
      Logger.getLogger("BatchManager").error(ioe.getMessage(), ioe);
View Full Code Here

  public static Batch readBatchFile(File file) throws IOException {
    FileReader reader = null;

    try {
      reader = new FileReader(file);
      Batch batch = (Batch) xmlStreamer.fromXML(reader);
      return batch;
    } catch (IOException e) {
      Logger.getLogger("BatchManager").error(e.getMessage(), e);
      throw e;
    } finally {
View Full Code Here

      JTable table = BossaNovaData.getSingleton().getApplication().getMainScreen().getBatchViewerPanel().getTable();     
      String defaultPath = BossanovaUserPref.getPref(BossanovaUserPref.BATCH_DIRECTORY, System.getProperty("user.home"));
      JFileChooser fileChooser = new JFileChooser(defaultPath);
      fileChooser.showOpenDialog(BossaNovaData.getSingleton().getApplication().getMainScreen());
      File selectedFile = fileChooser.getSelectedFile();
      Batch batch = null;
      if (selectedFile != null) {
        batch = BatchManager.readBatchFile(selectedFile);
        int index = table.getSelectedRow();
       
        // if no step were selected we import the batch in the end of the current batch
        // if the current batch is empty we import the batch content in the current batch in the begin
        if(index < 0 || index == table.getRowCount())
        {
          index = table.getRowCount() - 1;
        }
       
        if (batch.getSteps()!=null && batch.getSteps().size()>0) {
          sequencer.insertStepsAt(batch.getSteps(),index+1);
            // We select the new step.
          if(batch.getSteps().size() > 0)
            BossaNovaData.getSingleton().getApplication().setSelectedStep(batch.getStep(0), false);
           
           
            table.getSelectionModel().setSelectionInterval(index+1, index+1);
           
            StateMachine.getInstance().transitionTo(StateMachine.MODEL_OPEN);           
View Full Code Here

    // --------------------------------------------------------------------------
    // CONSTRUCTOR
    // --------------------------------------------------------------------------
    public BossaNovaSequencerImpl(/*Bossanova2 application*/) {
        super();
        batch = new Batch();
        executionListeners = new ArrayList<ExecutionListener>();
        originalDirectors = new HashMap<Step, Director>();
        //this.application = application;
    }
View Full Code Here

    // --------------------------------------------------------------------------
    // BATCH CONSTRUCTION
    // --------------------------------------------------------------------------
    @Override
    public void cleanAll() {
        this.batch = new Batch();
        BossaNovaData.getSingleton().getApplication().setSelectedStep(null, false);
        setChangedAndNotify();
    }
View Full Code Here

  // --------------------------------------------------------------------------
  // CONSTRUCTOR
  // --------------------------------------------------------------------------
  public BossaNovaSequencerImpl(/* Bossanova2 application */) {
    super();
    batch = new Batch();
    executionListeners = new ArrayList<ExecutionListener>();
    originalDirectors = new HashMap<Step, Director>();
    // this.application = application;
  }
View Full Code Here

TOP

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

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.