Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkmoore2010-04-23 20:38:12 +0000
committerkmoore2010-04-23 20:38:12 +0000
commitaea36d39cbf2cc394edc64f684378db799f33083 (patch)
tree092dd222c48f8c6f7c49f4fde1b83486e5dc0800 /jpa/plugins
parent3ff57063e5711028a98d674a83781d1265c349df (diff)
downloadwebtools.dali-aea36d39cbf2cc394edc64f684378db799f33083.tar.gz
webtools.dali-aea36d39cbf2cc394edc64f684378db799f33083.tar.xz
webtools.dali-aea36d39cbf2cc394edc64f684378db799f33083.zip
tweaking the mapping file wizard layout
Diffstat (limited to 'jpa/plugins')
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/orm/MappingFileWizardPage.java29
1 files changed, 22 insertions, 7 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/orm/MappingFileWizardPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/orm/MappingFileWizardPage.java
index 5521dd7369..7ad77b4cd3 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/orm/MappingFileWizardPage.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/orm/MappingFileWizardPage.java
@@ -104,7 +104,6 @@ public class MappingFileWizardPage extends DataModelWizardPage
GridData data = new GridData();
data.verticalAlignment = GridData.FILL;
data.horizontalAlignment = GridData.FILL;
- data.widthHint = 300;
composite.setLayoutData(data);
this.projectNameLabel = new Label(composite, SWT.NONE);
@@ -114,8 +113,8 @@ public class MappingFileWizardPage extends DataModelWizardPage
this.projectNameCombo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
data.horizontalSpan = 1;
+ data.grabExcessHorizontalSpace = true;
this.projectNameCombo.setLayoutData(data);
this.synchHelper.synchCombo(this.projectNameCombo, PROJECT_NAME, null);
new Label(composite, SWT.NONE);
@@ -127,14 +126,14 @@ public class MappingFileWizardPage extends DataModelWizardPage
this.sourceFolderText = new Text(composite, SWT.BORDER);
data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
data.horizontalSpan = 1;
+ data.grabExcessHorizontalSpace = true;
this.sourceFolderText.setLayoutData(data);
this.synchHelper.synchText(this.sourceFolderText, SOURCE_FOLDER, null);
Button sourceFolderButton = new Button(composite, SWT.PUSH);
sourceFolderButton.setText(JptUiMessages.General_browse);
- data = new GridData(GridData.FILL_HORIZONTAL);
+ data = new GridData();
data.horizontalSpan = 1;
sourceFolderButton.addSelectionListener(
new SelectionListener() {
@@ -147,15 +146,22 @@ public class MappingFileWizardPage extends DataModelWizardPage
}
});
+ Label separator = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
+ data = new GridData(SWT.FILL, SWT.BEGINNING, true, false, 3, 1);
+ data.verticalIndent = 5;
+ separator.setLayoutData(data);
+
this.filePathLabel = new Label(composite, SWT.NONE);
this.filePathLabel.setText(JptUiMessages.MappingFileWizardPage_filePathLabel);
data = new GridData();
+ data.verticalIndent = 5;
this.filePathLabel.setLayoutData(data);
this.filePathText = new Text(composite, SWT.BORDER);
data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
data.horizontalSpan = 1;
+ data.verticalIndent = 5;
+ data.grabExcessHorizontalSpace = true;
this.filePathText.setLayoutData(data);
this.synchHelper.synchText(this.filePathText, FILE_PATH, null);
new Label(composite, SWT.NONE);
@@ -167,8 +173,8 @@ public class MappingFileWizardPage extends DataModelWizardPage
this.accessCombo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
data.horizontalSpan = 1;
+ data.grabExcessHorizontalSpace = true;
this.accessCombo.setLayoutData(data);
this.synchHelper.synchCombo(this.accessCombo, DEFAULT_ACCESS, null);
new Label(composite, SWT.NONE);
@@ -177,18 +183,27 @@ public class MappingFileWizardPage extends DataModelWizardPage
this.addToPersistenceUnitButton.setText(JptUiMessages.MappingFileWizardPage_addToPersistenceUnitButton);
data = new GridData(GridData.FILL_HORIZONTAL);
data.horizontalSpan = 3;
+ data.verticalIndent = 10;
this.addToPersistenceUnitButton.setLayoutData(data);
this.synchHelper.synchCheckbox(this.addToPersistenceUnitButton, ADD_TO_PERSISTENCE_UNIT, null);
this.persistenceUnitLabel = new Label(composite, SWT.NONE);
this.persistenceUnitLabel.setText(JptUiMessages.MappingFileWizardPage_persistenceUnitLabel);
data = new GridData();
+ data.horizontalIndent = 10;
this.persistenceUnitLabel.setLayoutData(data);
+ this.persistenceUnitLabel.setEnabled(false);
+ this.addToPersistenceUnitButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ persistenceUnitLabel.setEnabled(addToPersistenceUnitButton.getSelection());
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {/*not called*/}
+ });
this.persistenceUnitCombo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
data.horizontalSpan = 1;
+ data.grabExcessHorizontalSpace = true;
this.persistenceUnitCombo.setLayoutData(data);
this.synchHelper.synchCombo(this.persistenceUnitCombo, PERSISTENCE_UNIT, null);

Back to the top