Author: kono
Date: 2008-09-24 16:10:44 -0700 (Wed, 24 Sep 2008)
New Revision: 14956
Added:
csplugins/trunk/ucsd/kono/PythonEnginePlugin/src/edu/ucsd/bioeng/idekerlab/pythonengine/ui/
csplugins/trunk/ucsd/kono/PythonEnginePlugin/src/edu/ucsd/bioeng/idekerlab/pythonengine/ui/PythonConsole.java
Log:
Initial checkin for Python plugin code.
Added:
csplugins/trunk/ucsd/kono/PythonEnginePlugin/src/edu/ucsd/bioeng/idekerlab/pythonengine/ui/PythonConsole.java
===================================================================
---
csplugins/trunk/ucsd/kono/PythonEnginePlugin/src/edu/ucsd/bioeng/idekerlab/pythonengine/ui/PythonConsole.java
2008-09-24 23:10:27 UTC (rev 14955)
+++
csplugins/trunk/ucsd/kono/PythonEnginePlugin/src/edu/ucsd/bioeng/idekerlab/pythonengine/ui/PythonConsole.java
2008-09-24 23:10:44 UTC (rev 14956)
@@ -0,0 +1,164 @@
+/*
+ Copyright (c) 2006, 2007, The Cytoscape Consortium (www.cytoscape.org)
+
+ The Cytoscape Consortium is:
+ - Institute for Systems Biology
+ - University of California San Diego
+ - Memorial Sloan-Kettering Cancer Center
+ - Institut Pasteur
+ - Agilent Technologies
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
+ documentation provided hereunder is on an "as is" basis, and the
+ Institute for Systems Biology and the Whitehead Institute
+ have no obligations to provide maintenance, support,
+ updates, enhancements or modifications. In no event shall the
+ Institute for Systems Biology and the Whitehead Institute
+ be liable to any party for direct, indirect, special,
+ incidental or consequential damages, including lost profits, arising
+ out of the use of this software and its documentation, even if the
+ Institute for Systems Biology and the Whitehead Institute
+ have been advised of the possibility of such damage. See
+ the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+*/
+package edu.ucsd.bioeng.idekerlab.pythonengine.ui;
+
+import edu.ucsd.bioeng.idekerlab.pythonengine.PythonEnginePlugin;
+
+import java.awt.BorderLayout;
+
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+
+import com.artenum.jyconsole.JyConsole;
+
+
+/*
+ * PythonConsole.java
+ *
+ * Created on 2008/09/23, 14:42
+ */
+
+/**
+ *
+ * @author kono
+ */
+public class PythonConsole extends javax.swing.JFrame {
+ /** Creates new form PythonConsole */
+ private static final JyConsole console = new JyConsole();
+ private static final PythonConsole pyConsole = new PythonConsole();
+ private static JFrame f;
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public static JFrame getConsoleFrame() {
+
+ if (f == null) {
+ f = new JFrame("Python Console for Cytoscape");
+ f.setSize(700, 500);
+ f.getContentPane().add(console, BorderLayout.CENTER);
+ f.getContentPane().add(titlePanel, BorderLayout.NORTH);
+ f.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
+ }
+
+ return f;
+ }
+
+ public static JyConsole getConsole() {
+ return console;
+ }
+
+
+ private PythonConsole() {
+ initComponents();
+ }
+
+ /** This method is called from within the constructor to
+ * initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">
+ private void initComponents() {
+ this.setTitle("Python Console for Cytoscape");
+ this.setDefaultCloseOperation(HIDE_ON_CLOSE);
+
+ titlePanel = new javax.swing.JPanel();
+ pythonIcon = new javax.swing.JLabel();
+ plusLabel = new javax.swing.JLabel();
+ cytoscapeIcon = new javax.swing.JLabel();
+ titleLabel = new javax.swing.JLabel();
+ //consolePanel = new javax.swing.JPanel();
+
+ //JyConsole jyConsole = new JyConsole();
+ //jyConsole.add(jyConsole, BorderLayout.CENTER);
+ //this.getContentPane().add(jyConsole, BorderLayout.CENTER);
+
+
//setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+ titlePanel.setBackground(new java.awt.Color(255, 255, 255));
+
+ pythonIcon.setBackground(new java.awt.Color(255, 255, 255));
+ pythonIcon.setIcon(new
javax.swing.ImageIcon(PythonEnginePlugin.class.getResource("/images/python.png")));
// NOI18N
+
+ plusLabel.setFont(new java.awt.Font("SansSerif", 1, 24)); //
NOI18N
+ plusLabel.setText("+");
+
+ cytoscapeIcon.setBackground(new java.awt.Color(255, 255, 255));
+ cytoscapeIcon.setIcon(new
javax.swing.ImageIcon(PythonEnginePlugin.class.getResource("/images/icon48.png")));
// NOI18N
+
+ titleLabel.setFont(new java.awt.Font("SansSerif", 1, 18)); //
NOI18N
+ titleLabel.setText("Python Console for Cytoscape");
+
+ org.jdesktop.layout.GroupLayout titlePanelLayout = new
org.jdesktop.layout.GroupLayout(titlePanel);
+ titlePanel.setLayout(titlePanelLayout);
+
titlePanelLayout.setHorizontalGroup(titlePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+
.add(titlePanelLayout.createSequentialGroup()
+
.addContainerGap()
+
.add(pythonIcon)
+
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+
.add(plusLabel)
+
.add(18, 18, 18)
+
.add(cytoscapeIcon)
+
.add(18, 18, 18)
+
.add(titleLabel)
+
.addContainerGap(51,
+
Short.MAX_VALUE)));
+
titlePanelLayout.setVerticalGroup(titlePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+
.add(titlePanelLayout.createSequentialGroup()
+
.addContainerGap()
+
.add(titlePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
+
.add(pythonIcon)
+
.add(plusLabel)
+
.add(cytoscapeIcon)
+
.add(titleLabel))
+
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
+
Short.MAX_VALUE)));
+
+ pack();
+ } // </editor-fold>
+
+ // Variables declaration - do not modify
+ //private javax.swing.JPanel jyConsole;
+ private javax.swing.JLabel cytoscapeIcon;
+ private javax.swing.JLabel plusLabel;
+ private javax.swing.JLabel pythonIcon;
+ private javax.swing.JLabel titleLabel;
+ private static javax.swing.JPanel titlePanel;
+
+ // End of variables declaration
+}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en
-~----------~----~----~----~------~----~------~--~---