summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxwu2013-05-24 01:10:59 (EDT)
committer mwu2013-05-24 01:10:59 (EDT)
commita8bc27738c349b39ed650e550c768d1b8ef9f9ec (patch)
tree5d862e813c556b6097e4334e36809a56f9fe237f
parent9c46d70b86c468a56ac7624a417711ba2233a318 (diff)
downloadorg.eclipse.datatools.enablement.oda-a8bc27738c349b39ed650e550c768d1b8ef9f9ec.zip
org.eclipse.datatools.enablement.oda-a8bc27738c349b39ed650e550c768d1b8ef9f9ec.tar.gz
org.eclipse.datatools.enablement.oda-a8bc27738c349b39ed650e550c768d1b8ef9f9ec.tar.bz2
Fix bugzilla bug [408917] - Scroll bar doesn't appear in web service
data set.
-rw-r--r--plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/OperationPage.java19
-rw-r--r--plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPParametersPage.java22
-rw-r--r--plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPRequestPage.java21
-rw-r--r--plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPResponsePage.java19
4 files changed, 70 insertions, 11 deletions
diff --git a/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/OperationPage.java b/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/OperationPage.java
index def5ccf..dfddfe4 100644
--- a/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/OperationPage.java
+++ b/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/OperationPage.java
@@ -36,11 +36,13 @@ import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -93,8 +95,16 @@ public class OperationPage extends DataSetWizardPage
public void createPageCustomControl( Composite parent )
{
initialImages( );
- setControl( createPageControl( parent ) );
+
+ ScrolledComposite sComposite = new ScrolledComposite( parent, SWT.H_SCROLL | SWT.V_SCROLL );
+ sComposite.setLayout( new GridLayout( ) );
+ sComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+ sComposite.setMinWidth( 600 );
+ sComposite.setExpandHorizontal( true );
+
+ Control control = createPageControl( sComposite );
initializeControl( );
+
int x = java.awt.Toolkit.getDefaultToolkit( ).getScreenSize( ).width
- 800;
int y = java.awt.Toolkit.getDefaultToolkit( ).getScreenSize( ).height
@@ -107,6 +117,13 @@ public class OperationPage extends DataSetWizardPage
{
parent.getShell( ).setLocation( x / 2, y / 2 );
}
+
+ Point size = control.computeSize( SWT.DEFAULT, SWT.DEFAULT );
+ control.setSize( size.x, size.y );
+
+ sComposite.setContent( control );
+ setControl( sComposite );
+
WSUIUtil.setSystemHelp( getControl( ), IHelpConstants.CONEXT_ID_WS_OPERATION );
}
diff --git a/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPParametersPage.java b/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPParametersPage.java
index dedd21f..14f2b43 100644
--- a/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPParametersPage.java
+++ b/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPParametersPage.java
@@ -39,9 +39,11 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -96,20 +98,31 @@ public class SOAPParametersPage extends DataSetWizardPage
*/
private Control createPageControl( Composite parent )
{
- Composite composite = new Composite( parent, SWT.NONE );
+ ScrolledComposite sComposite = new ScrolledComposite( parent, SWT.H_SCROLL | SWT.V_SCROLL );
+ sComposite.setLayout( new GridLayout( ) );
+ sComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+ sComposite.setMinWidth( 600 );
+ sComposite.setExpandHorizontal( true );
+
+ Composite composite = new Composite( sComposite, SWT.NONE );
GridLayout layout = new GridLayout( 1, false );
layout.verticalSpacing = 20;
composite.setLayout( layout );
- GridData layoutData = new GridData( GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_FILL );
+ GridData layoutData = new GridData( GridData.FILL_BOTH );
composite.setLayoutData( layoutData );
setupParametersComposite( composite );
setupSelectionButtons( composite );
+ Point size = composite.computeSize( SWT.DEFAULT, SWT.DEFAULT );
+ composite.setSize( size.x, size.y );
+
+ sComposite.setContent( composite );
+ setControl( sComposite );
+
modelChanged = true;
- return composite;
+ return sComposite;
}
private void setupParametersComposite( Composite parent )
@@ -190,6 +203,7 @@ public class SOAPParametersPage extends DataSetWizardPage
TableLayout tableLayout = new TableLayout( );
table.setLayout( tableLayout );
GridData layouData = new GridData( GridData.FILL_BOTH );
+ layouData.heightHint = 400;
table.setLayoutData( layouData );
table.setHeaderVisible( true );
diff --git a/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPRequestPage.java b/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPRequestPage.java
index a3d6974..a0d2e31 100644
--- a/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPRequestPage.java
+++ b/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPRequestPage.java
@@ -38,6 +38,7 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.MouseAdapter;
@@ -102,11 +103,16 @@ public class SOAPRequestPage extends DataSetWizardPage
*/
private Control createPageControl( Composite parent )
{
- Composite composite = new Composite( parent, SWT.NONE );
+ ScrolledComposite sComposite = new ScrolledComposite( parent, SWT.H_SCROLL | SWT.V_SCROLL );
+ sComposite.setLayout( new GridLayout( ) );
+ sComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+ sComposite.setMinWidth( 600 );
+ sComposite.setExpandHorizontal( true );
+
+ Composite composite = new Composite( sComposite, SWT.NONE );
GridLayout layout = new GridLayout( 2, false );
composite.setLayout( layout );
- GridData layoutData = new GridData( GridData.HORIZONTAL_ALIGN_FILL
- | GridData.VERTICAL_ALIGN_FILL );
+ GridData layoutData = new GridData( GridData.FILL_BOTH );
composite.setLayoutData( layoutData );
Label prompt = new Label( composite, SWT.NONE );
@@ -118,13 +124,20 @@ public class SOAPRequestPage extends DataSetWizardPage
setupQueryTextComposite( composite );
setupButtonComposite( composite );
- return composite;
+ Point size = composite.computeSize( SWT.DEFAULT, SWT.DEFAULT );
+ composite.setSize( size.x, size.y );
+
+ sComposite.setContent( composite );
+ setControl( sComposite );
+
+ return sComposite;
}
private void setupQueryTextComposite( Composite parent )
{
queryText = new Text( parent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.LEFT_TO_RIGHT );
GridData layoutData = new GridData( GridData.FILL_BOTH );
+ layoutData.heightHint = 400;
queryText.setLayoutData( layoutData );
queryText.addModifyListener( new ModifyListener( ){
diff --git a/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPResponsePage.java b/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPResponsePage.java
index 41bcf81..b1d7ebf 100644
--- a/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPResponsePage.java
+++ b/plugins/org.eclipse.datatools.enablement.oda.ws.ui/src/org/eclipse/datatools/enablement/oda/ws/ui/wizards/SOAPResponsePage.java
@@ -23,10 +23,12 @@ import org.eclipse.datatools.enablement.oda.ws.util.WSUtil;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -82,7 +84,14 @@ public class SOAPResponsePage extends DataSetWizardPage
private Control createPageControl( Composite parent )
{
- Composite composite = new Composite( parent, SWT.NONE );
+ ScrolledComposite sComposite = new ScrolledComposite( parent,
+ SWT.H_SCROLL | SWT.V_SCROLL );
+ sComposite.setLayout( new GridLayout( ) );
+ sComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+ sComposite.setMinWidth( 600 );
+ sComposite.setExpandHorizontal( true );
+
+ Composite composite = new Composite( sComposite, SWT.NONE );
GridLayout layout = new GridLayout( 1, false );
layout.verticalSpacing = 20;
composite.setLayout( layout );
@@ -94,7 +103,13 @@ public class SOAPResponsePage extends DataSetWizardPage
setupXSDGroup( composite );
setupXMLGroup( composite );
- return composite;
+ Point size = composite.computeSize( SWT.DEFAULT, SWT.DEFAULT );
+ composite.setSize( size.x, size.y );
+
+ sComposite.setContent( composite );
+ setControl( sComposite );
+
+ return sComposite;
}
private void setupXSDGroup( Composite parent )