use of de.neemann.digital.draw.shapes.MissingShape in project Digital by hneemann.
the class InsertAction method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
if (node.isUnique()) {
VisualElement visualElement = new VisualElement(node.getName()).setPos(new Vector(10, 10)).setShapeFactory(shapeFactory);
if (getIcon() == null) {
try {
node.getDescription();
setIcon(node.getIcon(shapeFactory));
} catch (IOException ex) {
SwingUtilities.invokeLater(new ErrorMessage(Lang.get("msg_errorImportingModel_N0", node.getName())).addCause(ex));
}
}
if (visualElement.getShape() instanceof MissingShape)
return;
circuitComponent.setPartToInsert(visualElement);
insertHistory.add(this);
}
}
Aggregations