tabbed panes for parameters and options.
authorjprocter <Jim Procter>
Thu, 9 Sep 2010 08:56:46 +0000 (08:56 +0000)
committerjprocter <Jim Procter>
Thu, 9 Sep 2010 08:56:46 +0000 (08:56 +0000)
src/jalview/gui/WsJobParameters.java

index d0e39df..5c12187 100644 (file)
@@ -49,6 +49,7 @@ import javax.swing.JPopupMenu;
 import javax.swing.JScrollPane;
 import javax.swing.JSlider;
 import javax.swing.JSplitPane;
+import javax.swing.JTabbedPane;
 import javax.swing.JTable;
 import javax.swing.JTextArea;
 import javax.swing.JTextField;
@@ -123,7 +124,7 @@ public class WsJobParameters extends JPanel implements ItemListener,
   JSplitPane settingsPanel = new JSplitPane();
 
   JSplitPane jobPanel = new JSplitPane();
-
+  JTabbedPane tabpanels=new JTabbedPane();
   JPanel jobOptions = new JPanel();
 
   JScrollPane jobOptionsPane = new JScrollPane();
@@ -223,9 +224,10 @@ public class WsJobParameters extends JPanel implements ItemListener,
             (int) (deskr.getCenterY() - 250), 480, 500));
     frame.setContentPane(this);
     // should recover defaults from user prefs.
+    //settingsPanel.setDividerLocation(0.4);
+    //jobPanel.setDividerLocation(0.5);
+    tabpanels.setSelectedComponent(jobOptionsPane);
     frame.validate();
-    settingsPanel.setDividerLocation(0.4);
-    jobPanel.setDividerLocation(0.3);
     frame.setVisible(true);
 
     if (response > 0)
@@ -348,7 +350,7 @@ public class WsJobParameters extends JPanel implements ItemListener,
     SetNamePanel.add(setNameInfo);
     SetNamePanel.add(buttonArea);
     setDetails.add(setDescrView, BorderLayout.CENTER);
-    // setDetails.setPreferredSize(new Dimension(360, 100));
+    //setDetails.setPreferredSize(new Dimension(360, 100));
     jobParameters.setBorder(new TitledBorder("Parameters"));
     jobParameters.setLayout(new BorderLayout());
     paramPane.setPreferredSize(new Dimension(360, 300));
@@ -362,17 +364,22 @@ public class WsJobParameters extends JPanel implements ItemListener,
     jobOptionsPanel.setBorder(new TitledBorder("Options"));
     jobOptionsPane.getViewport().setView(jobOptions);
     jobOptionsPanel.add(jobOptionsPane, BorderLayout.CENTER);
-    settingsPanel.setLeftComponent(jobOptionsPanel);
-    settingsPanel.setRightComponent(jobParameters);
-    settingsPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
+    //settingsPanel.setLeftComponent(jobOptionsPanel);
+    //settingsPanel.setRightComponent(jobParameters);
+    //settingsPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
 
     setLayout(new BorderLayout());
-    // setPreferredSize(new Dimension(400, 600));
-    // setSize(new Dimension(400, 600));
     jobPanel.setLeftComponent(setDetails);
-    jobPanel.setRightComponent(settingsPanel);
+    jobPanel.setRightComponent(tabpanels);
     jobPanel.setOrientation(JSplitPane.VERTICAL_SPLIT);
     add(SetNamePanel, BorderLayout.NORTH);
+    //add(jobPanel, BorderLayout.CENTER);
+    //setDescrView.setName("Description");
+    //tabpanels.add(setDescrView);
+    jobOptionsPane.setName("Options");
+    tabpanels.add(jobOptionsPane);
+    paramPane.setName("Parameters");
+    tabpanels.add(paramPane);
     add(jobPanel, BorderLayout.CENTER);
     JPanel dialogpanel = new JPanel();
     dialogpanel.add(startjob);