本文整理匯總了Java中org.eclipse.ui.internal.MessageLine類的典型用法代碼示例。如果您正苦於以下問題:Java MessageLine類的具體用法?Java MessageLine怎麽用?Java MessageLine使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MessageLine類屬於org.eclipse.ui.internal包,在下文中一共展示了MessageLine類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createButtonBar
import org.eclipse.ui.internal.MessageLine; //導入依賴的package包/類
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;
}
示例2: createButtonBar
import org.eclipse.ui.internal.MessageLine; //導入依賴的package包/類
protected Control createButtonBar(Composite parent)
{
Composite composite = new Composite(parent, SWT.NONE);
// create a layout with spacing and margins appropriate for the font
// size.
GridLayout layout = new GridLayout();
layout.numColumns = 0; // this is incremented by createButton
layout.makeColumnsEqualWidth = true;
layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
composite.setLayout(layout);
GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_CENTER);
composite.setLayoutData(data);
composite.setFont(parent.getFont());
// Add the buttons to the button bar.
createButtonsForButtonBar(composite);
Composite statusComposite = new Composite(composite, SWT.NONE);
GridLayout statusLayout = new GridLayout();
statusLayout.numColumns = 1;
statusLayout.marginHeight = 0;
statusLayout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
statusComposite.setLayout(statusLayout);
statusComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fStatusLine = new MessageLine(statusComposite);
fStatusLine.setAlignment(SWT.LEFT);
fStatusLine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
fStatusLine.setErrorStatus(null);
applyDialogFont(statusComposite);
return composite;
}