diff options
author | Raphael Moll <ralf@android.com> | 2011-06-10 22:22:34 +0200 |
---|---|---|
committer | Raphael Moll <ralf@android.com> | 2011-06-10 22:22:34 +0200 |
commit | ce54b194adb463f60ebcb98d8904de24fed03b6b (patch) | |
tree | 1698b300ac9d63edb4927d2339142d12e9ec914a /sdkmanager/libs/sdkuilib | |
parent | b051619189b4c0be377ea080a3f1d188d3f8c073 (diff) | |
download | sdk-ce54b194adb463f60ebcb98d8904de24fed03b6b.zip sdk-ce54b194adb463f60ebcb98d8904de24fed03b6b.tar.gz sdk-ce54b194adb463f60ebcb98d8904de24fed03b6b.tar.bz2 |
Fix AVD detail not displaying correctly.
Change-Id: I4ecf1c25c9f9defe28b8896332301c15b343c056
Diffstat (limited to 'sdkmanager/libs/sdkuilib')
-rw-r--r-- | sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/widgets/AvdDetailsDialog.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/widgets/AvdDetailsDialog.java b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/widgets/AvdDetailsDialog.java index 4c0ea8c..2167248 100644 --- a/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/widgets/AvdDetailsDialog.java +++ b/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/widgets/AvdDetailsDialog.java @@ -21,6 +21,8 @@ import com.android.sdklib.IAndroidTarget; import com.android.sdklib.internal.avd.AvdInfo; import com.android.sdklib.internal.avd.AvdManager; import com.android.sdklib.internal.avd.AvdInfo.AvdStatus; +import com.android.sdkuilib.ui.GridDataBuilder; +import com.android.sdkuilib.ui.GridLayoutBuilder; import com.android.sdkuilib.ui.SwtBaseDialog; import org.eclipse.swt.SWT; @@ -40,7 +42,6 @@ import java.util.Set; final class AvdDetailsDialog extends SwtBaseDialog { private final AvdInfo mAvdInfo; - private Composite mRootComposite; public AvdDetailsDialog(Shell shell, AvdInfo avdInfo) { super(shell, SWT.APPLICATION_MODAL, "AVD details"); @@ -52,13 +53,13 @@ final class AvdDetailsDialog extends SwtBaseDialog { */ @Override protected void createContents() { - mRootComposite = new Composite(getShell(), SWT.NONE); - mRootComposite.setLayout(new GridLayout(2, false)); - mRootComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); + Shell shell = getShell(); + GridLayoutBuilder.create(shell).columns(2); + GridDataBuilder.create(shell).fill(); GridLayout gl; - Composite c = new Composite(mRootComposite, SWT.NONE); + Composite c = new Composite(shell, SWT.NONE); c.setLayout(gl = new GridLayout(2, false)); gl.marginHeight = gl.marginWidth = 0; c.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); @@ -110,11 +111,11 @@ final class AvdDetailsDialog extends SwtBaseDialog { copy.remove(AvdManager.AVD_INI_IMAGES_2); if (copy.size() > 0) { - Label l = new Label(mRootComposite, SWT.SEPARATOR | SWT.HORIZONTAL); + Label l = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL); l.setLayoutData(new GridData( GridData.FILL, GridData.CENTER, false, false, 2, 1)); - c = new Composite(mRootComposite, SWT.NONE); + c = new Composite(shell, SWT.NONE); c.setLayout(gl = new GridLayout(2, false)); gl.marginHeight = gl.marginWidth = 0; c.setLayoutData(new GridData(GridData.FILL_BOTH)); |