public void createControl()

in plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DBPoolWizard.java [271:357]


    public void createControl(Composite parent) {
        Composite composite = createComposite(parent);

        GridData groupGridData1;
        GridData groupGridData2;
        GridData textGridData;
        GridLayout gridLayout1;
        GridLayout gridLayout2;
        Label label;

        Group group = new Group(composite, SWT.NONE);
        gridLayout1 = new GridLayout();
        gridLayout1.numColumns = 2;
        group.setLayout(gridLayout1);
        groupGridData1 = new GridData();
        groupGridData1.horizontalAlignment = GridData.FILL;
        groupGridData1.grabExcessHorizontalSpace = true;
        groupGridData1.horizontalSpan = 2;
        group.setLayoutData(groupGridData1);

        label = new Label(group, SWT.LEFT);
        label.setText(Messages.dbWizardConnector);

        text[0] = new Text(group, SWT.SINGLE | SWT.BORDER);
        textGridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL
            | GridData.VERTICAL_ALIGN_FILL);
        textGridData.grabExcessHorizontalSpace = true;
        textGridData.widthHint = 100;
        text[0].setLayoutData(textGridData);

        Group group2 = new Group(composite, SWT.NONE);
        gridLayout2 = new GridLayout();
        gridLayout2.numColumns = 2;
        group2.setLayout(gridLayout2);
        groupGridData2 = new GridData();
        groupGridData2.horizontalAlignment = GridData.FILL;
        groupGridData2.grabExcessHorizontalSpace = true;
        groupGridData2.horizontalSpan = 2;
        groupGridData2.verticalAlignment = GridData.FILL;
        group2.setLayoutData(groupGridData2);
        group2.setText(Messages.dbWizardExternalPath);

        label = new Label(group2, SWT.LEFT);
        label.setText(Messages.dbWizardGroupId);
        text[1] = new Text(group2, SWT.SINGLE | SWT.BORDER);
        text[1].setLayoutData(textGridData);

        label = new Label(group2, SWT.LEFT);
        label.setText(Messages.dbWizardArtifactId);
        text[2] = new Text(group2, SWT.SINGLE | SWT.BORDER);
        text[2].setLayoutData(textGridData);

        label = new Label(group2, SWT.LEFT);
        label.setText(Messages.dbWizardArtifactVersion);
        text[3] = new Text(group2, SWT.SINGLE | SWT.BORDER);
        text[3].setLayoutData(textGridData);

        label = new Label(group2, SWT.LEFT);
        label.setText(Messages.dbWizardArtifactType);
        text[4] = new Text(group2, SWT.SINGLE | SWT.BORDER);
        text[4].setLayoutData(textGridData);

        // if edit a pool,the info must be filled into wizard
        if (eObject != null && ExtModule.class.isInstance(eObject)) {
        ExtModule extModule = (ExtModule) eObject;
        if (extModule.getConnector() != null) {
            text[0].setText(extModule.getConnector().getValue());
        }
        if (extModule.getExternalPath() != null) {
            text[1]
                .setText(extModule.getExternalPath().getGroupId() == null ? ""
                    : extModule.getExternalPath().getGroupId());
            text[2]
                .setText(extModule.getExternalPath()
                    .getArtifactId() == null ? "" : extModule
                    .getExternalPath().getArtifactId());
            text[3]
                .setText(extModule.getExternalPath().getVersion() == null ? ""
                    : extModule.getExternalPath().getVersion());
            text[4]
                .setText(extModule.getExternalPath().getType() == null ? ""
                    : extModule.getExternalPath().getType());
        }
        }

        setControl(composite);
    }