From 46ca91c8b2a49f1d2f80b6823ade9f1c29c4121c Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 9 Sep 2010 08:56:46 +0000 Subject: [PATCH] tabbed panes for parameters and options. --- src/jalview/gui/WsJobParameters.java | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/jalview/gui/WsJobParameters.java b/src/jalview/gui/WsJobParameters.java index d0e39df..5c12187 100644 --- a/src/jalview/gui/WsJobParameters.java +++ b/src/jalview/gui/WsJobParameters.java @@ -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); -- 1.7.10.2