4
* $Date: 2007-04-16 10:40:19 +0200 (Mon, 16 Apr 2007) $
7
* Copyright (C) 1997-2007 The JChemPaint project
9
* Contact: jchempaint-devel@lists.sourceforge.net
11
* This program is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU Lesser General Public License
13
* as published by the Free Software Foundation; either version 2.1
14
* of the License, or (at your option) any later version.
15
* All we ask is that proper credit is given for our work, which includes
16
* - but is not limited to - adding the above copyright notice to the beginning
17
* of your source code files, and to any copyright notice that you may distribute
18
* with programs based on this work.
20
* This program is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
* GNU Lesser General Public License for more details.
25
* You should have received a copy of the GNU Lesser General Public License
26
* along with this program; if not, write to the Free Software
27
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
29
package org.openscience.cdk.applications.jchempaint.action;
31
import java.awt.Dimension;
32
import java.awt.event.ActionEvent;
34
import javax.swing.JFrame;
36
import org.openscience.cdk.applications.jchempaint.InsertTextPanel;
42
* @cdk.module jchempaint
45
public class InsertSmilesAction extends JCPAction
48
private static final long serialVersionUID = -7583781404068411100L;
50
public void actionPerformed(ActionEvent e)
52
logger.debug("Gonna show the InsertFromSmiles dialog...");
53
JFrame frame=new JFrame("Insert SMILES/InChI/CAS");
54
frame.add(new InsertTextPanel(jcpPanel, frame));
55
frame.setVisible(true);
56
frame.setSize(new Dimension(jcpPanel.getWidth(),50));
57
frame.setPreferredSize(new Dimension(jcpPanel.getWidth(),50));
58
logger.debug("Should be visible now!...");