Examples of BoardImporter


Examples of org.openpnp.gui.importer.BoardImporter

        if (getSelectedBoardLocation() == null) {
              MessageBoxes.errorBox(getTopLevelAncestor(), "Import Failed", "Please select a board in the Jobs tab to import into.");
            return;
        }
       
        BoardImporter boardImporter;
          try {
              boardImporter = boardImporterClass.newInstance();
          }
          catch (Exception e) {
              MessageBoxes.errorBox(getTopLevelAncestor(), "Import Failed", e);
              return;
          }
         
        try {
            Board importedBoard = boardImporter.importBoard((Frame) getTopLevelAncestor());
            Board existingBoard = getSelectedBoardLocation().getBoard();
            for (Placement placement : importedBoard.getPlacements()) {
                existingBoard.addPlacement(placement);
            }
            placementsTableModel.fireTableDataChanged();
View Full Code Here

Examples of org.openpnp.gui.importer.BoardImporter

     * Register a BoardImporter with the system, causing it to gain a menu
     * location in the File->Import menu.
     * @param importer
     */
    public void registerBoardImporter(final Class<? extends BoardImporter> boardImporterClass) {
        final BoardImporter boardImporter;
        try {
            boardImporter = boardImporterClass.newInstance();
        }
        catch (Exception e) {
            throw new Error(e);
        }
        JMenuItem menuItem = new JMenuItem(new AbstractAction() {
            {
                putValue(NAME, boardImporter.getImporterName());
                putValue(SHORT_DESCRIPTION, boardImporter.getImporterDescription());
            }
           
            @Override
            public void actionPerformed(ActionEvent e) {
                jobPanel.importBoard(boardImporterClass);
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.