private static final long serialVersionUID = 8489495722307245626L;
public void actionPerformed(ActionEvent event) {
IChemObject object = getSource(event);
logger.debug("Showing object properties for: ", object);
ChemObjectEditor editor = new AtomContainerEditor();
IAtomContainer relevantContainer = null;
if(object instanceof IAtom)
relevantContainer = ChemModelManipulator.getRelevantAtomContainer(jcpPanel.getChemModel(),(IAtom)object);
if(object instanceof IBond)
relevantContainer = ChemModelManipulator.getRelevantAtomContainer(jcpPanel.getChemModel(),(IBond)object);
editor.setChemObject(relevantContainer);
ChemObjectPropertyDialog frame =
new ChemObjectPropertyDialog(JOptionPane.getFrameForComponent(editor), jcpPanel.get2DHub(), editor);
frame.pack();
frame.setVisible(true);
}