Package mbj.robotdriver.util

Examples of mbj.robotdriver.util.SimpleErrorDialog


              Ingredient.this.linkRobotDriver.tecanChemicalLiquidClasses().addOrReplace(cLC);
              try {
                Ingredient.this.linkRobotDriver.saveTecanChemicalLiquidClasses();
              } catch (RobotDriverException e) {
                // Display a message with e.getMessage();
                SimpleErrorDialog dialog = new SimpleErrorDialog(Ingredient.this.linkRobotDriver, "Robot Driver Message",
                                         true, e.getMessage());
                dialog.pack();
                dialog.setLocationRelativeTo(Ingredient.this.linkRobotDriver);
                dialog.setVisible(true);
                // do not abort (continue)
              }
            }
          }
        }
View Full Code Here


     * And Generate the Working list in the same time
   */
  public void actionPerformed(ActionEvent arg0) {
    // FIRST we check if all went OK
    if (parentRobotDriver.thePlate().targetHolder().name().equals("")) {
      SimpleErrorDialog dialog = new SimpleErrorDialog(parentRobotDriver,"Robot Driver Message",
                                 true, "Target Holder must be Set !");
      dialog.pack();
            dialog.setLocationRelativeTo(parentRobotDriver);
            dialog.setVisible(true);
      return;
    }
    for ( Ingredient aIngredient : parentRobotDriver.usedIngredients() ) {
      if (aIngredient.chemical().pipettingInfo().liquidClass().name().equals("NONE")) {
        SimpleErrorDialog dialog = new SimpleErrorDialog(parentRobotDriver,"Robot Driver Message",
                                   true, "All The Liquid Classes must be defined !");
        dialog.pack();
              dialog.setLocationRelativeTo(parentRobotDriver);
              dialog.setVisible(true);
        return;
      }
    }
    // The input is OK
    // order the used Ingredients by LiquidClass priority then LiquidClass name
    Collections.sort(parentRobotDriver.usedIngredients(),parentRobotDriver.usedIngredients());
    // Make the Working List that means do 2 things
    // write the Aspirate and Dispense commands
    // And give to each used ingredient a Holder and a position in Holder
    PipetIngredientList thePipetIngredientList = parentRobotDriver.usedIngredients().prepareAndBuildPipetIngredientList();
    try {
      thePipetIngredientList.generateWorkingList(parentRobotDriver.tecanSettings(), parentRobotDriver.thePlate(), parentRobotDriver.tecanHolders(), parentRobotDriver.wasteHolder());
    } catch (RobotDriverException rbde) {
      SimpleErrorDialog simpleDialog = new SimpleErrorDialog(parentRobotDriver, "Robot Driver ERROR",
          true, "This Error occurred:\n" + rbde.getMessage() + " -The Working List Can Not be Generated!");
      simpleDialog.pack();
      simpleDialog.setLocationRelativeTo(parentRobotDriver);
      simpleDialog.setVisible(true);
      return;
    }
   
    // build the screen
    parentRobotDriver.getContentPane().removeAll();
View Full Code Here

  /**
   * keep the screen and display an error dialog
   */
  public void endedBAD(RobotDriverException rbde) {
    // propose a re-edit or cancel changes
    SimpleErrorDialog simpleDialog = new SimpleErrorDialog(parentRobotDriver, "Robot Driver ERROR",
        true, "This Error occurred:\n" + rbde.getMessage() + "!\n -You must Edit the file properly or Cancel\n");
    simpleDialog.pack();
    simpleDialog.setLocationRelativeTo(parentRobotDriver);
    simpleDialog.setVisible(true);
    try {
      // recover the file from the Backup
      FileUtil.copy(backupFilePath, settingsFile.getAbsolutePath());
    } catch (IOException e) {
      // If a problem occur here it is a big problem
View Full Code Here

  /**
   * keep the screen and display an error dialog
   */
  public void endedBAD(RobotDriverException rbde) {
    // propose a re-edit or cancel changes
    SimpleErrorDialog simpleDialog = new SimpleErrorDialog(parentRobotDriver, "Robot Driver ERROR",
        true, "This Error occurred:\n" + rbde.getMessage() + "!\n -You must Edit the file properly or Cancel\n");
    simpleDialog.pack();
    simpleDialog.setLocationRelativeTo(parentRobotDriver);
    simpleDialog.setVisible(true);
    try {
      // recover the file from the Backup
      FileUtil.copy(backupFilePath, liquidClassFile.getAbsolutePath());
    } catch (IOException e) {
      // If a problem occur here it is a big problem
View Full Code Here

      parentRobotDriver.pack();
      parentRobotDriver.repaint();
      buildEditPane();
    } catch (PlateFactoryException e) {
      // if Not OK
      SimpleErrorDialog simpleDialog = new SimpleErrorDialog(parentRobotDriver, "Robot Driver ERROR",
                  true, "This Error occurred:\n" + e.getMessage() + "!\n -You must Cancel and pick a proper File !\n");
      simpleDialog.pack();
      simpleDialog.setLocationRelativeTo(parentRobotDriver);
      simpleDialog.setVisible(true);
    } catch (RobotDriverException e) {
      // if Not OK
      SimpleErrorDialog simpleDialog = new SimpleErrorDialog(parentRobotDriver, "Robot Driver ERROR",
                  true, "This Error occurred:\n" + e.getMessage() + "!\n -You must Cancel and pick a proper File !\n");
      simpleDialog.pack();
      simpleDialog.setLocationRelativeTo(parentRobotDriver);
      simpleDialog.setVisible(true);
    }
  }
View Full Code Here

  /**
   * keep the screen and display an error dialog
   */
  public void endedBAD(RobotDriverException rbde) {
    // propose a re-edit or cancel changes
    SimpleErrorDialog simpleDialog = new SimpleErrorDialog(parentRobotDriver, "Robot Driver ERROR",
        true, "This Error occurred:\n" + rbde.getMessage() + "!\n -You must Edit the file properly or Cancel\n");
    simpleDialog.pack();
    simpleDialog.setLocationRelativeTo(parentRobotDriver);
    simpleDialog.setVisible(true);
    try {
      // recover the file from the Backup
      FileUtil.copy(backupFilePath, chemicalLiquidClassFile.getAbsolutePath());
    } catch (IOException e) {
      // If a problem occur here it is a big problem
View Full Code Here

  /**
   * keep the screen and display an error dialog
   */
  public void endedBAD(RobotDriverException rbde) {
    // propose a re-edit or cancel changes
    SimpleErrorDialog simpleDialog = new SimpleErrorDialog(parentRobotDriver, "Robot Driver ERROR",
        true, "This Error occurred:\n" + rbde.getMessage() + "!\n -You must Edit the file properly or Cancel\n");
    simpleDialog.pack();
    simpleDialog.setLocationRelativeTo(parentRobotDriver);
    simpleDialog.setVisible(true);
    try {
      // recover the file from the Backup
      FileUtil.copy(backupFilePath, holdersFile.getAbsolutePath());
    } catch (IOException e) {
      // If a problem occur here it is a big problem
View Full Code Here

TOP

Related Classes of mbj.robotdriver.util.SimpleErrorDialog

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.