Reviewers: scottb,

Description:
GWT Development shell no longer cuts off the "Launch Default Browser"
and "Copy to Clipboard"
buttons when the Startup URL happens to be long. This change stacks the
"Startup URL:" and
URL dropdown above the two buttons instead of having all four live under
a single FlowLayout.

Review by: sco...@google.com

Please review this at http://gwt-code-reviews.appspot.com/758801/show

Affected files:
  M dev/core/src/com/google/gwt/dev/shell/ShellMainWindow.java


Index: dev/core/src/com/google/gwt/dev/shell/ShellMainWindow.java
===================================================================
--- dev/core/src/com/google/gwt/dev/shell/ShellMainWindow.java (revision 8518) +++ dev/core/src/com/google/gwt/dev/shell/ShellMainWindow.java (working copy)
@@ -35,6 +35,7 @@
 import java.util.Map;

 import javax.swing.BorderFactory;
+import javax.swing.BoxLayout;
 import javax.swing.JButton;
 import javax.swing.JComboBox;
 import javax.swing.JLabel;
@@ -175,16 +176,19 @@
   public ShellMainWindow(TreeLogger.Type maxLevel, File logFile) {
     super(new BorderLayout());
     JPanel launchPanel = new JPanel();
+    launchPanel.setLayout(new BoxLayout(launchPanel, BoxLayout.PAGE_AXIS));
+
+    JPanel urlPanel = new JPanel();
+    JPanel buttonPanel = new JPanel();
+
     launchPanel.setBorder(BorderFactory.createTitledBorder(
         "Launch GWT Module"));
-    launchPanel.add(new JLabel("Startup URL:"));
+    urlPanel.add(new JLabel("Startup URL:"));
     JPanel startupPanel = new JPanel();
     urlCombo = new JComboBox();
     urlCombo.addItem("Computing...");
     startupPanel.add(urlCombo);
-    launchPanel.add(startupPanel);
-    loadingMessage = new JLabel("Loading...");
-    launchPanel.add(loadingMessage);
+    urlPanel.add(startupPanel);
     defaultBrowserButton = new JButton("Launch Default Browser");
     defaultBrowserButton.setEnabled(false);
     defaultBrowserButton.setVisible(false);
@@ -193,7 +197,7 @@
         launch(new DefaultBrowserLauncher());
       }
     });
-    launchPanel.add(defaultBrowserButton);
+    buttonPanel.add(defaultBrowserButton);
     copyToClipboardButton = new JButton("Copy to Clipboard");
     copyToClipboardButton.setEnabled(false);
     copyToClipboardButton.setVisible(false);
@@ -202,10 +206,16 @@
         launch(new CopyToClipboardLauncher());
       }
     });
-    launchPanel.add(copyToClipboardButton);
+    buttonPanel.add(copyToClipboardButton);
     add(launchPanel, BorderLayout.NORTH);
     logWindow = new SwingLoggerPanel(maxLevel, logFile);
     add(logWindow);
+
+    loadingMessage = new JLabel("Loading...");
+
+    launchPanel.add(urlPanel);
+    launchPanel.add(loadingMessage);
+    launchPanel.add(buttonPanel);
   }

   /**


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to