private static final long serialVersionUID = 7123137508085454087L;
public void actionPerformed(ActionEvent event) {
IChemObject object = getSource(event);
logger.debug("Showing object properties for: ", object);
ChemObjectEditor editor = null;
if (object instanceof IPseudoAtom) {
editor = new PseudoAtomEditor();
}
else if (object instanceof IAtom) {
editor = new AtomEditor(jcpPanel.get2DHub());
}
else if (object instanceof IReaction) {
editor = new ReactionEditor();
}
else if (object instanceof IBond) {
editor = new BondEditor(jcpPanel.get2DHub(), jcpPanel.getBlacklist());
}
if (editor != null) {
editor.setChemObject((org.openscience.cdk.ChemObject)object);
ChemObjectPropertyDialog frame =
new ChemObjectPropertyDialog(JOptionPane.getFrameForComponent(editor), jcpPanel.get2DHub(),editor);
frame.pack();
frame.setVisible(true);
}