@Override
    protected void createContents(Composite topControl) {
      this.topControl = topControl;

      icon =
          SWTFactoryUtil.createLabel(
              topControl, SWT.LEFT, "", GridDataFactory.swtDefaults().create());
      icon.setImage(Dialog.getImage(Dialog.DLG_IMG_MESSAGE_INFO));

      hintText =
          SWTFactoryUtil.createLink(
              topControl, SWT.LEFT, "", GridDataFactory.fillDefaults().grab(true, false).create());
    }
示例#2
0
 protected void createContents_CheckButton(Composite topControl) {
   checkBox = SWTFactoryUtil.createButton(topControl, SWT.CHECK | SWT.NONE, labelText);
   checkBox.addSelectionListener(
       new SelectionAdapter() {
         @Override
         public void widgetSelected(SelectionEvent e) {
           setFieldValueFromControl(checkBox.getSelection());
         }
       });
 }
  @Override
  protected void createContents(Composite topControl) {
    useProjectSettingsField.createComponent(topControl, GridDataFactory.fillDefaults().create());

    String prefPageId = getWorkspacePrefPageId();
    Link link =
        createOpenPreferencesDialogLink(
            topControl, prefPageId, LABEL_ConfigureWorkspaceSettings, null);
    GridDataFactory.swtDefaults().align(SWT.END, SWT.CENTER).applyTo(link);

    SWTFactoryUtil.createLabel(
        topControl,
        SWT.SEPARATOR | SWT.HORIZONTAL,
        "",
        GridDataFactory.fillDefaults().span(2, 1).create());

    projectSettingsBlock.createComponent(
        topControl, gdFillDefaults().span(2, 1).grab(true, false).create());

    // Update projectSettingsBlock setEnabled status - because setEnabled only works after the
    // control is created.
    useProjectSettingsField.fireFieldValueChanged();
  }
示例#4
0
 protected void createContents_Button(Composite topControl) {
   button = SWTFactoryUtil.createPushButton(topControl, getButtonLabel(), null);
   button.addSelectionListener(new WidgetSelectedRunner(getButtonHandler()));
 }
 @Override
 protected Composite doCreateTopLevelControl(Composite parent) {
   return SWTFactoryUtil.createGroup(parent, WizardMessages.LangNewProject_LocationGroup_label);
 }