1 package com.quantum.wizards.sql;
3 import org.eclipse.jface.resource.ImageDescriptor;
4 import org.eclipse.jface.wizard.WizardPage;
5 import org.eclipse.swt.SWT;
6 import org.eclipse.swt.layout.GridData;
7 import org.eclipse.swt.layout.GridLayout;
8 import org.eclipse.swt.widgets.Composite;
9 import org.eclipse.swt.widgets.Label;
10 import org.eclipse.swt.widgets.Text;
15 public class ShowSQLStatementWizardPage extends WizardPage {
18 private String sqlStatement;
25 public ShowSQLStatementWizardPage(String pageName, String title,
26 ImageDescriptor titleImage) {
27 super(pageName, title, titleImage);
33 protected ShowSQLStatementWizardPage(String pageName) {
35 setTitle("Final SQL Statement");
36 setDescription("Review the final SQL Statement before executing it");
39 public void createControl(Composite parent) {
40 Composite composite = new Composite(parent, SWT.NONE);
41 composite.setLayout(new GridLayout(1, false));
42 composite.setLayoutData(new GridData(GridData.FILL_BOTH));
44 Label label = new Label(composite, SWT.NONE);
45 label.setText("SQL Statement");
47 this.text = new Text(composite, SWT.MULTI | SWT.READ_ONLY | SWT.BORDER);
48 this.text.setText(this.sqlStatement == null ? "" : this.sqlStatement);
49 this.text.setLayoutData(new GridData(GridData.FILL_BOTH));
51 setControl(composite);
53 public String getSQLStatement() {
54 return this.sqlStatement;
56 public void setSQLStatement(String sqlStatement) {
57 this.sqlStatement = sqlStatement;
58 if (this.text != null) {
59 this.text.setText(this.sqlStatement == null ? "" : this.sqlStatement);