Author: adietish
Date: 2010-12-08 07:56:33 -0500 (Wed, 08 Dec 2010)
New Revision: 27228
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-7836] corrected tab order (bad widget creation order)
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-08
12:47:34 UTC (rev 27227)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-08
12:56:33 UTC (rev 27228)
@@ -95,8 +95,6 @@
private Text imageText;
private Text keyText;
private Combo hardware;
- private Button keyManage;
- private Button findImageButton;
private Combo realmCombo;
private ProfileComposite currPage;
private Map<String, ProfileComposite> profilePages;
@@ -324,14 +322,7 @@
Label imageLabel = new Label(container, SWT.NULL);
imageLabel.setText(WizardMessages.getString(IMAGE_LABEL));
imageText = new Text(container, SWT.BORDER | SWT.SINGLE);
-
- Label realmLabel = new Label(container, SWT.NULL);
- realmLabel.setText(WizardMessages.getString(REALM_LABEL));
-
- // createRealmsControl(container, getRealmNames(realms));
- createRealmsControl(container);
-
- findImageButton = new Button(container, SWT.NULL);
+ Button findImageButton = new Button(container, SWT.NULL);
findImageButton.setText(WizardMessages.getString(FIND_BUTTON_LABEL));
findImageButton.addSelectionListener(findListener);
@@ -339,9 +330,23 @@
archLabel.setText(WizardMessages.getString(ARCH_LABEL));
arch = new Label(container, SWT.NULL);
+ Label realmLabel = new Label(container, SWT.NULL);
+ realmLabel.setText(WizardMessages.getString(REALM_LABEL));
+ // createRealmsControl(container, getRealmNames(realms));
+ createRealmsControl(container);
+
+ Label keyLabel = new Label(container, SWT.NULL);
+ keyLabel.setText(WizardMessages.getString(KEY_LABEL));
+ keyText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ Button keyManageButton = new Button(container, SWT.NULL);
+ keyManageButton.setText(WizardMessages.getString(MANAGE_BUTTON_LABEL));
+ keyManageButton.addSelectionListener(manageListener);
+ if (cloud.getType().equals(DeltaCloud.MOCK_TYPE)) {
+ keyManageButton.setEnabled(false);
+ }
+
Label hardwareLabel = new Label(container, SWT.NULL);
hardwareLabel.setText(WizardMessages.getString(HARDWARE_LABEL));
-
hardware = new Combo(container, SWT.READ_ONLY);
hardware.setEnabled(false);
hardware.setItems(new String[] { WizardMessages.getString(LOADING_VALUE) });
@@ -362,12 +367,6 @@
dummyLabel.setLayoutData(dummyData);
dummyLabel.setVisible(false);
- keyManage = new Button(container, SWT.NULL);
- keyManage.setText(WizardMessages.getString(MANAGE_BUTTON_LABEL));
- keyManage.addSelectionListener(manageListener);
- if (cloud.getType().equals(DeltaCloud.MOCK_TYPE))
- keyManage.setEnabled(false);
-
Point p1 = nameLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);
Point p2 = nameText.computeSize(SWT.DEFAULT, SWT.DEFAULT);
Point p3 = findImageButton.computeSize(SWT.DEFAULT, SWT.DEFAULT);
@@ -388,7 +387,7 @@
int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
Point minSize1 = findImageButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- Point minSize2 = keyManage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ Point minSize2 = keyManageButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
int buttonWidth = Math.max(widthHint, minSize1.x);
buttonWidth = Math.max(buttonWidth, minSize2.x);
@@ -415,11 +414,6 @@
Control control = realmCombo;
- Label keyLabel = new Label(container, SWT.NULL);
- keyLabel.setText(WizardMessages.getString(KEY_LABEL));
-
- keyText = new Text(container, SWT.BORDER | SWT.SINGLE);
-
f = UIUtils.createFormData(realmCombo, 8 + centering + centering2, null, 0, 0, 0, null,
0);
keyLabel.setLayoutData(f);
@@ -427,9 +421,9 @@
f.width = buttonWidth;
f.top = new FormAttachment(realmCombo, 8);
f.right = new FormAttachment(realmCombo, 0, SWT.RIGHT);
- keyManage.setLayoutData(f);
+ keyManageButton.setLayoutData(f);
- f = UIUtils.createFormData(realmCombo, 8 + centering2, null, 0, hardwareLabel, 5,
keyManage, -10);
+ f = UIUtils.createFormData(realmCombo, 8 + centering2, null, 0, hardwareLabel, 5,
keyManageButton, -10);
keyText.setLayoutData(f);
control = keyText;