From: jprocter Date: Fri, 29 Oct 2010 13:59:21 +0000 (+0000) Subject: resolve some layout problems : JAL-685 X-Git-Tag: Release_2_6_1~21 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0517ffa0aea21aea59f9d341f53bf86067a88cc4;p=jalview.git resolve some layout problems : JAL-685 --- 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();