Revision: 5966 http://languagetool.svn.sourceforge.net/languagetool/?rev=5966&view=rev Author: dnaber Date: 2011-11-25 13:29:52 +0000 (Fri, 25 Nov 2011) Log Message: ----------- small button area cleanup: move language auto detection checkbox closer to combo box
Modified Paths: -------------- trunk/JLanguageTool/src/java/org/languagetool/gui/Main.java Modified: trunk/JLanguageTool/src/java/org/languagetool/gui/Main.java =================================================================== --- trunk/JLanguageTool/src/java/org/languagetool/gui/Main.java 2011-11-24 20:28:45 UTC (rev 5965) +++ trunk/JLanguageTool/src/java/org/languagetool/gui/Main.java 2011-11-25 13:29:52 UTC (rev 5966) @@ -108,11 +108,8 @@ resultArea.setText(HTML_FONT_START + messages.getString("resultAreaText") + HTML_FONT_END); resultArea.setEditable(false); - final JLabel label = new JLabel(messages.getString("enterText")); - final JButton button = new JButton(StringTools.getLabel(messages - .getString("checkText"))); - button - .setMnemonic(StringTools.getMnemonic(messages.getString("checkText"))); + final JButton button = new JButton(StringTools.getLabel(messages.getString("checkText"))); + button.setMnemonic(StringTools.getMnemonic(messages.getString("checkText"))); button.addActionListener(this); final JPanel panel = new JPanel(); @@ -124,22 +121,20 @@ insidePanel.setLayout(new GridBagLayout()); buttonCons.gridx = 0; buttonCons.gridy = 0; -// buttonCons.anchor = GridBagConstraints.WEST; - insidePanel.add(button, buttonCons); - buttonCons.gridx = 1; - buttonCons.gridy = 0; -// buttonCons.anchor = GridBagConstraints.WEST; + buttonCons.anchor = GridBagConstraints.WEST; insidePanel.add(new JLabel(" " + messages.getString("textLanguage") + " "), buttonCons); languageBox = new JComboBox(); populateLanguageBox(languageBox); - buttonCons.gridx = 2; + buttonCons.gridx = 1; buttonCons.gridy = 0; -// buttonCons.anchor = GridBagConstraints.WEST; insidePanel.add(languageBox, buttonCons); buttonCons.gridx = 0; buttonCons.gridy = 0; panel.add(insidePanel); - + buttonCons.gridx = 2; + buttonCons.gridy = 0; + insidePanel.add(button, buttonCons); + autoDetectBox = new JCheckBox(messages.getString("atd")); autoDetectBox.addActionListener( new ActionListener() { @Override @@ -148,14 +143,14 @@ config.setAutoDetect(autoDetectBox.isSelected()); } }); - // set whether it's checked autoDetectBox.setSelected(config.getAutoDetect()); languageBox.setEnabled(!autoDetectBox.isSelected()); - buttonCons.gridx = 0; + buttonCons.gridx = 1; buttonCons.gridy = 1; + buttonCons.gridwidth = 2; buttonCons.anchor = GridBagConstraints.WEST; - panel.add(autoDetectBox, buttonCons); + insidePanel.add(autoDetectBox, buttonCons); final Container contentPane = frame.getContentPane(); final GridBagLayout gridLayout = new GridBagLayout(); @@ -177,9 +172,7 @@ cons.gridx = 0; cons.gridy = 2; cons.weighty = 0.0f; - cons.insets = new Insets(3, 3, 3, 3); - // cons.fill = GridBagConstraints.NONE; - contentPane.add(label, cons); + cons.insets = new Insets(1, 10, 10, 1); cons.gridy = 3; contentPane.add(panel, cons); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Languagetool-cvs mailing list Languagetool-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/languagetool-cvs