Example usage for org.eclipse.jface.dialogs IMessageProvider INFORMATION

List of usage examples for org.eclipse.jface.dialogs IMessageProvider INFORMATION

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IMessageProvider INFORMATION.

Prototype

int INFORMATION

To view the source code for org.eclipse.jface.dialogs IMessageProvider INFORMATION.

Click Source Link

Document

Constant for an info message (value 1).

Usage

From source file:com.ibm.xsp.extlib.designer.tooling.palette.calendarview.CvwViewPage.java

License:Open Source License

@Override
public void createControl(Composite parent) {
    setTitle(PAGE_TITLE);//from  www . j av  a2  s  . c om
    setMessage(INITIAL_MSG, IMessageProvider.INFORMATION);
    _panelData = ((CalendarViewDropWizard) this.getWizard()).getPanelData();

    // Create the main panel
    DCPanel _mainPanel = new DCPanel(parent, SWT.NONE);
    _mainPanel.setLayout(SWTLayoutUtils.createLayoutDefaultSpacing(1));
    GridData data = new GridData(GridData.FILL_HORIZONTAL);
    _mainPanel.setLayoutData(data);

    // Initialise the data for the dynamic panel
    initData(_mainPanel);

    // Create the "Choose View" panel
    new ComplexPanelComposite(_mainPanel, SWT.NONE, "http://www.ibm.com/xsp/coreex/wizard/panels",
            "chooseCalendarView", // $NON-NLS-1$ $NON-NLS-2$
            _panelData).setLayoutData(GridDataFactory.copyData(data));
    SWTUtils.setBackgroundColor(_mainPanel, parent.getBackground(), true);

    setControl(_mainPanel);
    setPageComplete(true);
}

From source file:com.ibm.xsp.extlib.designer.tooling.palette.singlepageapp.WizardStartPage.java

License:Open Source License

@Override
public void refreshData() {
    super.refreshData();
    setTitle("Application Pages"); // $NLX-WizardStartPage.ApplicationPages-1$
    setMessage(getStepTxt() + "Configure the Application Pages for this Single Page Application.",
            IMessageProvider.INFORMATION); // $NLX-WizardStartPage.ConfiguretheApplicationPagesforth-1$
}

From source file:com.ibm.xsp.extlib.designer.tooling.palette.singlepageapp.WizardSubPageDataSource.java

License:Open Source License

@Override
public void refreshData() {
    super.refreshData();
    setMessage(getStepTxt() + MessageFormat
            .format("Configure the Data Source for the \"{0}\" Application Page.", pageData.name),
            IMessageProvider.INFORMATION); // $NLX-WizardSubPageDataSource.ConfiguretheDataSourceforthe0Appl-1$
}

From source file:com.ibm.xsp.extlib.designer.tooling.palette.singlepageapp.WizardSubPageDataView.java

License:Open Source License

@Override
public void refreshData() {
    super.refreshData();
    setMessage(getStepTxt() + MessageFormat
            .format("Configure the View Control for the \"{0}\" Application Page.", pageData.name),
            IMessageProvider.INFORMATION); // $NLX-WizardSubPageDataView.ConfiguretheViewControlforthe0App-1$

    // Column names are in the first array
    // Column titles in the second
    String[][] columns = ((WizardSubPageDataSource) pageData.wizardPage[1]).getViewColumns();
    if (columns == null) {
        colNames = null;/* ww w  . j a  v  a  2s. com*/
        summaryCombo.removeAll();
    } else {
        if (colNames != columns[0]) {
            // View has changed - Reload the combo and select the first item
            colNames = columns[0];
            summaryCombo.setItems(columns[1]);
            summaryCombo.select(0);
        }
    }

    targetCombo.refresh();
}

From source file:com.ibm.xsp.extlib.designer.tooling.palette.singlepageapp.WizardSubPageFormTable.java

License:Open Source License

@Override
public void refreshData() {
    super.refreshData();
    setMessage(getStepTxt()/*from w  w w  . j  ava2  s .c  o m*/
            + MessageFormat.format("Configure the Fields for the \"{0}\" Application Page", pageData.name),
            IMessageProvider.INFORMATION); // $NLX-WizardSubPageFormTable.ConfiguretheFieldsforthe0Applicat-1$
    fieldList = ((WizardSubPageDataSource) pageData.wizardPage[1]).getFormFields();
    setupTableContents(0);
    refreshButtonState();
}

From source file:com.ibm.xsp.extlib.designer.tooling.palette.singlepageapp.WizardSubPageMain.java

License:Open Source License

@Override
public void refreshData() {
    super.refreshData();
    backCombo.refresh();/*  w  w w  . j av  a 2 s.  co  m*/
    setMessage(getStepTxt() + MessageFormat.format("Configure the \"{0}\" Application Page.", pageData.name),
            IMessageProvider.INFORMATION); // $NLX-WizardSubPageMain.Configurethe0ApplicationPage-1$
}

From source file:com.ibm.xsp.extlib.designer.tooling.palette.singlepageapp.WizardSubPageNav.java

License:Open Source License

@Override
public void refreshData() {
    super.refreshData();
    setMessage(/*w  w w  .  j a va 2s .  c o  m*/
            getStepTxt() + MessageFormat.format(
                    "Configure the Application Navigator for the \"{0}\" Application Page.", pageData.name),
            IMessageProvider.INFORMATION); // $NLX-WizardSubPageNav.ConfiguretheApplicationNavigatorf-1$
    tableViewer.setInput(targetList.toArray());
}

From source file:com.ibm.xsp.extlib.designer.tooling.palette.view.GenericViewDropDialog.java

License:Open Source License

@Override
protected void fillClientArea(Composite parent) {
    if (parent.getLayout() instanceof GridLayout) {
        ((GridLayout) parent.getLayout()).marginWidth = 7;
        ((GridLayout) parent.getLayout()).marginHeight = 0;
    }//from  w  w w .  j  ava 2s.  c o m

    _mainPanel = new DCPanel(parent, SWT.NONE);
    GridLayout layout = SWTLayoutUtils.createLayoutDefaultSpacing(1);
    _mainPanel.setLayout(layout);
    GridData data = SWTLayoutUtils.createGDFill();
    data.horizontalSpan = 2;
    _mainPanel.setLayoutData(data);

    viewDataNode = initData(_mainPanel);
    if (viewDataNode != null) {
        viewDataNode.addDataNodeListener(dataNodeAdapter);
    }

    Composite pickerParent = new Composite(_mainPanel, SWT.NONE);
    pickerParent.setLayout(SWTLayoutUtils.createLayoutNoMarginDefaultSpacing(2));
    pickerParent.setLayoutData(SWTLayoutUtils.createGDFillHorizontal());
    new Label(pickerParent, SWT.NONE).setText("&Show data from:"); // $NLX-AddViewControlDialog.Showdatafrom-1$
    picker = new LookupComboBox(pickerParent, SWT.DROP_DOWN | SWT.READ_ONLY, "datasource.id"); // $NON-NLS-1$

    picker.setLayoutData(SWTLayoutUtils.createGDFillHorizontal());
    picker.setFirstBlankLine(false);
    picker.setEditableLabels(false);
    picker.setLookup(_dataSources);

    dynamicComposite = new ComplexPanelComposite(_mainPanel, SWT.NONE);
    dynamicComposite.setLayoutData(GridDataFactory.copyData(data));
    dynamicComposite.updatePanelData(realData);

    picker.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent event) {
            super.widgetSelected(event);
            updateUI();
            dynamicComposite.getDisplay().asyncExec(new Runnable() {

                public void run() {
                    if (dynamicComposite.isDisposed()) {
                        return;
                    }
                    dynamicComposite.pack();
                    dynamicComposite.layout();
                    Composite parent = dynamicComposite.getParent();
                    Composite prevParent = parent;
                    while (parent != null && !parent.isDisposed()) {
                        try {
                            if (parent instanceof ScrolledComposite) {
                                ((ScrolledComposite) parent)
                                        .setMinSize(prevParent.computeSize(SWT.DEFAULT, SWT.DEFAULT));
                                break;
                            }
                            if (parent.isDisposed()) {
                                return;
                            }
                            parent.pack();
                            parent.layout();
                        } catch (Throwable t) {
                            if (ExtLibToolingLogger.EXT_LIB_TOOLING_LOGGER.isErrorEnabled()) {
                                ExtLibToolingLogger.EXT_LIB_TOOLING_LOGGER.errorp(this, "widgetSelected", t,
                                        "Error encountered when refreshing UI"); // $NON-NLS-1$ $NLE-DataViewDataPanel.ErrorencounteredwhenrefeshingUI-2$
                            }
                        }
                        prevParent = parent;
                        parent = parent.getParent();
                    }
                }
            });
        }
    });
    picker.select(0);
    updateUI();
    setMessage(
            "Select the kind of data (the data source) to show in the view. You can also select the data source later in the Data properties for this view control.", // $NLX-AddViewControlDialog.Selectthekindofdatathedatasourcet-1$
            IMessageProvider.INFORMATION);

    Composite columns = new Composite(_mainPanel, SWT.NONE);
    columns.setLayout(SWTLayoutUtils.createLayoutNoMarginDefaultSpacing(2));
    Label l = new Label(columns, SWT.NONE);
    l.setText("");
    SWTUtils.setBackgroundColor(parent, parent.getBackground(), true);
    parent.layout(true);
    parent.pack();
}

From source file:com.ibm.xsp.extlib.designer.tooling.utils.AbstractWizardPage.java

License:Open Source License

@Override
public void createControl(Composite parent) {
    _wiz = (AbstractWizard) getWizard();
    setTitle(getPageTitle());/*from   ww w  . jav a 2 s  .  com*/
    setMessage(StringUtil.format(getPageMsg(), "\n"), IMessageProvider.INFORMATION); // $NON-NLS-1$
    setImageDescriptor(_wiz._image);
    setPageComplete(false);
}

From source file:com.iw.plugins.spindle.ui.preferences.AbstractPreferencePage.java

License:Open Source License

private void applyToStatusLine(DialogPage page, IStatus status) {
    String message = status.getMessage();
    switch (status.getSeverity()) {
    case IStatus.OK:
        page.setMessage(message, IMessageProvider.NONE);
        page.setErrorMessage(null);//from  w ww . j  a  va2  s .co m
        break;
    case IStatus.WARNING:
        page.setMessage(message, IMessageProvider.WARNING);
        page.setErrorMessage(null);
        break;
    case IStatus.INFO:
        page.setMessage(message, IMessageProvider.INFORMATION);
        page.setErrorMessage(null);
        break;
    default:
        if (message.length() == 0) {
            message = null;
        }
        page.setMessage(null);
        page.setErrorMessage(message);
        break;
    }
}