Author: ruschein
Date: 2010-02-16 16:22:50 -0800 (Tue, 16 Feb 2010)
New Revision: 19344
Modified:
csplugins/trunk/ucsd/mes/MCODE3/src/csplugins/mcode/internal/action/MCODEMainPanelAction.java
Log:
Now scroll bars are dynamically appear as needed in the parameter pane.
Modified:
csplugins/trunk/ucsd/mes/MCODE3/src/csplugins/mcode/internal/action/MCODEMainPanelAction.java
===================================================================
---
csplugins/trunk/ucsd/mes/MCODE3/src/csplugins/mcode/internal/action/MCODEMainPanelAction.java
2010-02-17 00:18:02 UTC (rev 19343)
+++
csplugins/trunk/ucsd/mes/MCODE3/src/csplugins/mcode/internal/action/MCODEMainPanelAction.java
2010-02-17 00:22:50 UTC (rev 19344)
@@ -1,9 +1,11 @@
package csplugins.mcode.internal.action;
+import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
+import javax.swing.JScrollPane;
import javax.swing.SwingConstants;
import csplugins.mcode.internal.ui.MCODEMainPanel;
@@ -53,26 +55,27 @@
* finding parameters are modified
*/
public class MCODEMainPanelAction implements ActionListener {
- MCODEMainPanel mainPanel;
+ JScrollPane scrollPane;
- public MCODEMainPanelAction() {
- mainPanel = new MCODEMainPanel();
- }
+ public MCODEMainPanelAction() {
+ }
- /**
- * This method is called when the user wants to start MCODE.
- *
- * @param event Menu Item Selected.
- */
- public void actionPerformed(ActionEvent event) {
+ /**
+ * This method is called when the user wants to start MCODE.
+ *
+ * @param event Menu Item Selected.
+ */
+ public void actionPerformed(ActionEvent event) {
//display MCODEMainPanel in left cytopanel
final CytoPanel cytoPanel =
Cytoscape.getDesktop().getCytoPanel(SwingConstants.WEST);
- int index = cytoPanel.indexOfComponent(mainPanel);
+ int index = cytoPanel.indexOfComponent(scrollPane);
if ( index <= 0 ) {
- cytoPanel.add("MCODE PlugIn", mainPanel);
- index = cytoPanel.indexOfComponent(mainPanel);
+ final MCODEMainPanel mainPanel = new MCODEMainPanel();
+ scrollPane = new JScrollPane(mainPanel);
+ cytoPanel.add("MCODE PlugIn", scrollPane);
+ index = cytoPanel.indexOfComponent(scrollPane);
}
// if adding the cytopanel somehow fails...
--
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.