本文整理匯總了Java中org.eclipse.jface.dialogs.DialogMessageArea類的典型用法代碼示例。如果您正苦於以下問題:Java DialogMessageArea類的具體用法?Java DialogMessageArea怎麽用?Java DialogMessageArea使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DialogMessageArea類屬於org.eclipse.jface.dialogs包,在下文中一共展示了DialogMessageArea類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createTitleArea
import org.eclipse.jface.dialogs.DialogMessageArea; //導入依賴的package包/類
/**
* Create TitleArea
*
* @param parent
* @return
*/
public Composite createTitleArea( Composite parent )
{
Composite messageComposite = new Composite( parent, SWT.NONE );
GridData data = new GridData( GridData.FILL_BOTH );
messageComposite.setLayoutData( data );
FormLayout messageLayout = new FormLayout( );
messageComposite.setLayout( messageLayout );
messageArea = new DialogMessageArea( );
messageArea.createContents( messageComposite );
titleImage = new Label( messageComposite, SWT.LEFT );
FormData imageData = new FormData( );
imageData.right = new FormAttachment( 100 );
imageData.top = new FormAttachment( 0 );
imageData.bottom = new FormAttachment( 100 );
titleImage.setLayoutData( imageData );
FormData messageData = new FormData( );
messageData.left = new FormAttachment( 0, 0 );
messageData.right = new FormAttachment( titleImage, 100 );
messageData.bottom = new FormAttachment( titleImage, 0, SWT.BOTTOM );
messageData.top = new FormAttachment( 0, 0 );
messageArea.setTitleLayoutData( messageData );
messageArea.setMessageLayoutData( messageData );
return messageComposite;
}