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