Package org.openscience.jchempaint.dialog.editor

Examples of org.openscience.jchempaint.dialog.editor.ChemObjectEditor


      if((jcpPanel.get2DHub().getRGroupHandler()==null)) {
        JOptionPane.showMessageDialog(jcpPanel, GT.get("Please define an R-group (root and substituent) first."));
        return;
      }
      jcpPanel.get2DHub().getRGroupHandler().cleanUpRGroup(jcpPanel.get2DHub().getChemModel().getMoleculeSet());
      ChemObjectEditor editor = new RGroupEditor(hub);
      editor.setChemObject((org.openscience.cdk.ChemObject)hub.getRGroupHandler().getrGroupQuery());
      ChemObjectPropertyDialog frame = new ChemObjectPropertyDialog(JOptionPane.getFrameForComponent(editor), jcpPanel.get2DHub(),editor);
      frame.pack();
      frame.setVisible(true);
      jcpPanel.get2DHub().updateView();
    }
View Full Code Here


  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);
    }
View Full Code Here

  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);
  }
View Full Code Here

TOP

Related Classes of org.openscience.jchempaint.dialog.editor.ChemObjectEditor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.