예제 #1
0
  /** Creates a new board frame with the input design file imbedded into a host cad software. */
  public static BoardFrame get_embedded_instance(
      String p_design_file_path_name,
      BoardObservers p_observers,
      IdNoGenerator p_id_no_generator,
      java.util.Locale p_locale) {
    final gui.DesignFile design_file = gui.DesignFile.get_instance(p_design_file_path_name, false);
    if (design_file == null) {
      WindowMessage.show("design file not found");
      return null;
    }
    gui.BoardFrame board_frame =
        new gui.BoardFrame(
            design_file,
            gui.BoardFrame.Option.SINGLE_FRAME,
            TestLevel.RELEASE_VERSION,
            p_observers,
            p_id_no_generator,
            p_locale,
            false);

    java.io.InputStream input_stream = design_file.get_input_stream();
    boolean read_ok = board_frame.read(input_stream, true, null);
    if (!read_ok) {
      String error_message = "Unable to read design file with pathname " + p_design_file_path_name;
      board_frame.setVisible(true); // to be able to display the status message
      board_frame.screen_messages.set_status_message(error_message);
    }
    return board_frame;
  }
 /**
  * Creates a new instance of IncompletesWindow
  *
  * @param p_board_frame a {@link gui.BoardFrame} object.
  */
 public WindowClearanceViolations(BoardFrame p_board_frame) {
   super(p_board_frame);
   this.resources =
       java.util.ResourceBundle.getBundle(
           "gui.resources.WindowClearanceViolations", p_board_frame.get_locale());
   this.setTitle(resources.getString("title"));
   this.list_empty_message.setText(resources.getString("list_empty_message"));
   p_board_frame.set_context_sensitive_help(this, "WindowObjectList_ClearanceViolations");
 }