Logo Search packages:      
Sourcecode: cdk version File versions  Download package

void org::openscience::cdk::applications::jchempaint::action::ShowChemObjectProperty::actionPerformed ( ActionEvent  e  )  [inline]

Dummy method.

Parameters:
e Description of the Parameter

Reimplemented from org::openscience::cdk::applications::jchempaint::action::JCPAction.

Definition at line 55 of file ShowChemObjectProperty.java.

References org::openscience::cdk::applications::jchempaint::action::JCPAction::getSource(), org::openscience::cdk::applications::jchempaint::dialogs::TextViewDialog::setText(), and org::openscience::cdk::applications::jchempaint::action::JCPAction::type.

      {
            IChemObject object = getSource(event);
            // XXX needs fixing JFrame frame = (JFrame) jcpPanel.getFrame();
            JFrame frame = new JFrame();
            if (dialog == null)
            {
                  dialog = new TextViewDialog(frame,
                              "IChemObject Property " + type,
                              new Dimension(400, 100)
                              );
            }

            Object prop = object.getProperty(type);
            if (prop == null)
            {
                  dialog.setText("There is no " + type + " property");
            } else if (prop instanceof String)
            {
                  dialog.setText((String) prop);
            } else
            {
                  dialog.setText("The property " + type + " is not a String object");
            }

            dialog.show();
      }


Generated by  Doxygen 1.6.0   Back to index