Search in sources :

Example 1 with MessageLine

use of org.eclipse.ui.internal.MessageLine in project translationstudio8 by heartsome.

the class SelectionStatusDialog method createButtonBar.

/*
     * @see Dialog#createButtonBar(Composite)
     */
protected Control createButtonBar(Composite parent) {
    Font font = parent.getFont();
    Composite composite = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    if (!fStatusLineAboveButtons) {
        layout.numColumns = 2;
    }
    layout.marginHeight = 0;
    layout.marginLeft = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
    layout.marginWidth = 0;
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    composite.setFont(font);
    if (!fStatusLineAboveButtons && isHelpAvailable()) {
        createHelpControl(composite);
    }
    fStatusLine = new MessageLine(composite);
    fStatusLine.setAlignment(SWT.LEFT);
    GridData statusData = new GridData(GridData.FILL_HORIZONTAL);
    fStatusLine.setErrorStatus(null);
    fStatusLine.setFont(font);
    if (fStatusLineAboveButtons && isHelpAvailable()) {
        statusData.horizontalSpan = 2;
        createHelpControl(composite);
    }
    fStatusLine.setLayoutData(statusData);
    /*
		 * Create the rest of the button bar, but tell it not to
		 * create a help button (we've already created it).
		 */
    boolean helpAvailable = isHelpAvailable();
    setHelpAvailable(false);
    super.createButtonBar(composite);
    setHelpAvailable(helpAvailable);
    return composite;
}
Also used : MessageLine(org.eclipse.ui.internal.MessageLine) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) Font(org.eclipse.swt.graphics.Font)

Aggregations

Font (org.eclipse.swt.graphics.Font)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 MessageLine (org.eclipse.ui.internal.MessageLine)1