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();