Skip to content

Commit

Permalink
TEIIDDES-1432: Fix resizing of text in the SOAP WSDL wizard
Browse files Browse the repository at this point in the history
* Sorts out the grid data of the procedure group to correctly allow the
  text descriptions to wrap when the wizard dialog is resized.
  • Loading branch information
Paul Richardson committed Jan 30, 2013
1 parent 8eade35 commit 37a7edc
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
Expand Down Expand Up @@ -100,9 +101,10 @@ public void createControl(Composite theParent) {
// Includes a radio button and description for
// 1) Generate Default Procedures and
// 2) Customize Request & Response
Group group = WidgetFactory.createGroup(pnlMain, Messages.ProcedureGenerationOptions, SWT.NONE | SWT.BORDER, 1);
group.setLayout(new GridLayout(1, false));
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Group group = WidgetFactory.createGroup(pnlMain,
Messages.ProcedureGenerationOptions,
GridData.HORIZONTAL_ALIGN_FILL,
1);

generateCustomProceduresButton = WidgetFactory.createRadioButton(group, Messages.CustomProcedures, true);
generateCustomProceduresButton.addSelectionListener(new SelectionListener() {
Expand All @@ -120,10 +122,12 @@ public void widgetDefaultSelected(SelectionEvent e) {
Text customProceduresHelpText = new Text(group, SWT.WRAP | SWT.READ_ONLY);
customProceduresHelpText.setBackground(WidgetUtil.getReadOnlyBackgroundColor());
customProceduresHelpText.setForeground(WidgetUtil.getDarkBlueColor());
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 40;
customProceduresHelpText.setLayoutData(gd);
customProceduresHelpText.setText(Messages.OptionDefineCustomProcures);
GridDataFactory.swtDefaults()
.hint(400, SWT.DEFAULT)
.align(SWT.FILL,SWT.FILL)
.grab(true, true)
.applyTo(customProceduresHelpText);

generateDefaultProceduresButton = WidgetFactory.createRadioButton(group, Messages.DefaultProcedures, false);
generateDefaultProceduresButton.addSelectionListener(new SelectionListener() {
Expand All @@ -141,10 +145,12 @@ public void widgetDefaultSelected(SelectionEvent e) {
Text defaultProceduresHelpText = new Text(group, SWT.WRAP | SWT.READ_ONLY);
defaultProceduresHelpText.setBackground(WidgetUtil.getReadOnlyBackgroundColor());
defaultProceduresHelpText.setForeground(WidgetUtil.getDarkBlueColor());
gd = new GridData(GridData.FILL_VERTICAL);
gd.heightHint = 40;
defaultProceduresHelpText.setLayoutData(gd);
defaultProceduresHelpText.setText(Messages.OptionDefineDefaultProcedures);
GridDataFactory.swtDefaults()
.hint(400, SWT.DEFAULT)
.align(SWT.FILL,SWT.FILL)
.grab(true, true)
.applyTo(defaultProceduresHelpText);
}
}

Expand Down

0 comments on commit 37a7edc

Please sign in to comment.