Author: snjeza
Date: 2011-05-12 16:30:25 -0400 (Thu, 12 May 2011)
New Revision: 31276
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
Log:
JBIDE-8931 Searching for runtimes dialog incorrectly resizes
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java 2011-05-12
20:20:02 UTC (rev 31275)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/RuntimeUIActivator.java 2011-05-12
20:30:25 UTC (rev 31276)
@@ -167,11 +167,11 @@
| SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE);
Tree tree = viewer.getTree();
- gd = new GridData(GridData.FILL_BOTH);
+ gd = new GridData(SWT.FILL, SWT.FILL, true, true);
GC gc = new GC( composite);
FontMetrics fontMetrics = gc.getFontMetrics( );
gc.dispose( );
- gd.heightHint = Dialog.convertHeightInCharsToPixels(fontMetrics, heightHint);
+ gd.minimumHeight = Dialog.convertHeightInCharsToPixels(fontMetrics, heightHint);
tree.setLayoutData(gd);
tree.setHeaderVisible(true);
tree.setLinesVisible(true);
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java
===================================================================
---
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2011-05-12
20:20:02 UTC (rev 31275)
+++
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/dialogs/SearchRuntimePathDialog.java 2011-05-12
20:30:25 UTC (rev 31276)
@@ -96,16 +96,15 @@
getShell().setText("Searching for runtimes...");
Composite composite = new Composite(parent, SWT.NONE);
- GridData gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
gd.horizontalSpan = 2;
//gd.heightHint = convertVerticalDLUsToPixels(15);
+ gd.minimumHeight = convertVerticalDLUsToPixels(heightHint);
composite.setLayoutData(gd);
composite.setLayout(new GridLayout(1, false));
foundRuntimesLabel = new Label(composite, SWT.NONE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd = new GridData(GridData.FILL, SWT.FILL, true, false);
gd.horizontalSpan = 2;
foundRuntimesLabel.setLayoutData(gd);
foundRuntimesLabel.setFont(parent.getFont());
@@ -151,24 +150,20 @@
// label showing current task
subTaskLabel = new Label(parent, SWT.LEFT | SWT.WRAP);
- gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd = new GridData(GridData.FILL, SWT.FILL, true, false);
gd.horizontalSpan = 2;
gd.heightHint = 0;
subTaskLabel.setLayoutData(gd);
subTaskLabel.setFont(parent.getFont());
// progress indicator
progressIndicator = new ProgressIndicator(parent);
- gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
+ gd = new GridData(GridData.FILL, SWT.FILL, true, false);
gd.horizontalSpan = 2;
gd.heightHint = 0;
progressIndicator.setLayoutData(gd);
hideCreatedRuntimes = new Button(parent, SWT.CHECK);
- gd = new GridData();
- gd.horizontalAlignment = GridData.FILL;
- gd.grabExcessHorizontalSpace = true;
+ gd = new GridData(GridData.FILL, SWT.FILL, true, false);
gd.horizontalSpan = 2;
hideCreatedRuntimes.setLayoutData(gd);
hideCreatedRuntimes.setText("Hide already created runtimes");