Beispiel #1
0
  @Override
  public void run() {
    File container;

    try {
      container = getSelectedContainer();
    } catch (IOException e) {
      ExceptionUtil.handle(e);
      return;
    }

    if (container == null) {
      return;
    }

    final PublishResourceWizard publishLibrary =
        new PublishResourceWizard(container.getAbsolutePath());
    WizardDialog dialog =
        new WizardDialog(UIUtil.getDefaultShell(), publishLibrary) {

          @Override
          protected void okPressed() {
            publishLibrary.setCopyFileRunnable(
                createCopyFileRunnable(
                    publishLibrary.getSourceFile(), publishLibrary.getTargetFile()));

            super.okPressed();
          }
        };

    dialog.setPageSize(500, 250);
    if (dialog.open() == Window.OK) {
      fireResourceChanged(publishLibrary.getTargetFile().getAbsolutePath());
    }
  }
  protected Control createDialogArea(Composite parent) {
    UIUtil.bindHelp(parent, IHelpContextIds.XTAB_SHOW_SUMMARY_FIELD_DIALOG);

    Composite dialogArea = (Composite) super.createDialogArea(parent);

    Label infoLabel = new Label(dialogArea, SWT.NONE);
    infoLabel.setText(Messages.getString("ShowSummaryFieldDialog.Label.Info")); // $NON-NLS-1$

    createSummaryFiledViewer(dialogArea);

    init();

    return dialogArea;
  }
Beispiel #3
0
  protected Control createDialogArea(Composite parent) {
    Composite area = (Composite) super.createDialogArea(parent);
    Composite container = new Composite(area, SWT.NONE);
    container.setLayoutData(new GridData(GridData.FILL_BOTH));
    container.setLayout(new GridLayout());

    this.setTitle(Messages.getString("SimpleCubeBuilder.Title.Title")); // $NON-NLS-1$
    this.setMessage(Messages.getString("SimpleCubeBuilder.Title.Message")); // $NON-NLS-1$

    createNameArea(container);
    group = getCubeGroupContent(container);
    group.setLayoutData(new GridData(GridData.FILL_BOTH));

    initDialog();

    UIUtil.bindHelp(parent, IHelpContextIds.SIMPLE_CUBE_BUILDER_ID);
    return area;
  }
  protected Control createContents(Composite parent) {
    UIUtil.bindHelp(parent, IHelpContextIds.PREFERENCE_BIRT_PREVIEW_DATA_ID);

    Composite cmpTop = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout(1, false);
    cmpTop.setLayout(layout);
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    cmpTop.setLayoutData(gd);

    createDispalyRowLimitGroup(cmpTop);

    txtMaxRowLevelMember =
        new IntegerFieldEditor(
            PREVIEW_MAX_ROW_LEVEL_MEMBER,
            Messages.getString(
                "designer.preview.preference.resultset.maxrowlevelmember.description"),
            cmpTop); //$NON-NLS-1$
    txtMaxRowLevelMember.setPage(this);
    txtMaxRowLevelMember.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);
    txtMaxRowLevelMember.setEmptyStringAllowed(false);
    txtMaxRowLevelMember.setPropertyChangeListener(
        new IPropertyChangeListener() {

          public void propertyChange(PropertyChangeEvent event) {
            if (event.getProperty().equals(FieldEditor.IS_VALID))
              setValid(txtMaxRowLevelMember.isValid());
          }
        });

    txtMaxColumnLevelMember =
        new IntegerFieldEditor(
            PREVIEW_MAX_COLUMN_LEVEL_MEMBER,
            Messages.getString(
                "designer.preview.preference.resultset.maxcolumnlevelmember.description"),
            cmpTop); //$NON-NLS-1$
    txtMaxColumnLevelMember.setPage(this);
    txtMaxColumnLevelMember.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);
    txtMaxColumnLevelMember.setEmptyStringAllowed(false);
    txtMaxColumnLevelMember.setPropertyChangeListener(
        new IPropertyChangeListener() {

          public void propertyChange(PropertyChangeEvent event) {
            if (event.getProperty().equals(FieldEditor.IS_VALID))
              setValid(txtMaxColumnLevelMember.isValid());
          }
        });

    txtMaxInMemoryCubeSize =
        new IntegerFieldEditor(
            PREVIEW_MAX_IN_MEMORY_CUBE_SIZE,
            Messages.getString(
                "designer.preview.preference.resultset.maxinmemorycubesize.description"),
            cmpTop); //$NON-NLS-1$
    txtMaxInMemoryCubeSize.setPage(this);
    txtMaxInMemoryCubeSize.setValidateStrategy(StringFieldEditor.VALIDATE_ON_KEY_STROKE);
    txtMaxInMemoryCubeSize.setEmptyStringAllowed(false);
    txtMaxInMemoryCubeSize.setPropertyChangeListener(
        new IPropertyChangeListener() {

          public void propertyChange(PropertyChangeEvent event) {
            if (event.getProperty().equals(FieldEditor.IS_VALID))
              setValid(txtMaxInMemoryCubeSize.isValid());
          }
        });

    initControlValues();

    return cmpTop;
  }