From cf25e4f4f7d2cb2a7847a01d7cbe52003b46bf54 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 20 Oct 2010 10:46:52 +0000 Subject: [PATCH] resolve some layout problems : JAL-685 --- src/jalview/gui/WsJobParameters.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/jalview/gui/WsJobParameters.java b/src/jalview/gui/WsJobParameters.java index 9164cc0..440a714 100644 --- a/src/jalview/gui/WsJobParameters.java +++ b/src/jalview/gui/WsJobParameters.java @@ -23,6 +23,8 @@ import java.awt.Component; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; import java.awt.GridLayout; import java.awt.Rectangle; import java.awt.event.ActionEvent; @@ -349,8 +351,9 @@ public class WsJobParameters extends JPanel implements ItemListener, setName.addItemListener(this); setName.getEditor().addActionListener(this); JPanel setNameInfo = new JPanel(new FlowLayout(FlowLayout.LEFT)); - SetNamePanel.setLayout(new GridLayout(2, 1)); - SetNamePanel.setMinimumSize(new Dimension(300, 40)); + GridBagLayout gbl = new GridBagLayout(); + SetNamePanel.setLayout(gbl); + SetNamePanel.setMinimumSize(new Dimension(300, 60)); JLabel setNameLabel = new JLabel("Current parameter set name :"); setNameLabel.setFont(new java.awt.Font("Verdana", Font.PLAIN, 10)); // setNameLabel.setHorizontalAlignment(FlowLayout.LEFT); @@ -373,7 +376,15 @@ public class WsJobParameters extends JPanel implements ItemListener, JPanel buttonArea = new JPanel(new GridLayout(1, 1)); buttonArea.add(setsavebuts); SetNamePanel.add(setNameInfo); + GridBagConstraints gbc = new GridBagConstraints(); + gbc.gridheight = 2; + gbl.setConstraints(setNameInfo, gbc); SetNamePanel.add(buttonArea); + gbc = new GridBagConstraints(); + gbc.gridx=0; + gbc.gridy=2; + gbc.gridheight = 1; + gbl.setConstraints(buttonArea, gbc); setDetails.add(setDescrView, BorderLayout.CENTER); // setDetails.setPreferredSize(new Dimension(360, 100)); jobParameters.setBorder(new TitledBorder("Parameters")); @@ -655,7 +666,9 @@ public class WsJobParameters extends JPanel implements ItemListener, jobOptions.setPreferredSize(new Dimension(PARAM_WIDTH, optSet.size() * OPTSET_HEIGHT)); - jobOptions.setLayout(new GridLayout(optSet.size(), 1)); + FlowLayout fl; + jobOptions.setLayout(fl=new FlowLayout(FlowLayout.LEFT)); + refreshParamLayout(); paramPane.validate(); revalidate(); -- 1.7.10.2