当前位置: 首页>>代码示例>>Java>>正文


Java SWTUtil类代码示例

本文整理汇总了Java中org.eclipse.pde.internal.ui.util.SWTUtil的典型用法代码示例。如果您正苦于以下问题:Java SWTUtil类的具体用法?Java SWTUtil怎么用?Java SWTUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SWTUtil类属于org.eclipse.pde.internal.ui.util包,在下文中一共展示了SWTUtil类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createButtonContainer

import org.eclipse.pde.internal.ui.util.SWTUtil; //导入依赖的package包/类
/**
 * @param parent
 */
private void createButtonContainer( Composite parent )
{
	Composite composite = new Composite( parent, 0 );
	GridLayout layout = new GridLayout( );
	layout.marginHeight = layout.marginWidth = 0;
	composite.setLayout( layout );
	composite.setLayoutData( new GridData( 1040 ) );
	fSelectAllButton = new Button( composite, 8 );
	fSelectAllButton.setText( Messages.getString( "ReportAdvancedLauncherTab.SelectAllButtonText" ) ); //$NON-NLS-1$
	fSelectAllButton.setLayoutData( new GridData( 770 ) );
	SWTUtil.setButtonDimensionHint( fSelectAllButton );
	fDeselectButton = new Button( composite, 8 );
	fDeselectButton.setText( Messages.getString( "ReportAdvancedLauncherTab.DeselectButtonText" ) ); //$NON-NLS-1$
	fDeselectButton.setLayoutData( new GridData( 768 ) );
	SWTUtil.setButtonDimensionHint( fDeselectButton );
	fDefaultsButton = new Button( composite, 8 );
	fDefaultsButton.setText( Messages.getString( "ReportAdvancedLauncherTab.DefaultsButtonText" ) ); //$NON-NLS-1$
	fDefaultsButton.setLayoutData( new GridData( 768 ) );
	SWTUtil.setButtonDimensionHint( fDefaultsButton );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:24,代码来源:ReportAdvancedLauncherTab.java

示例2: handleMove

import org.eclipse.pde.internal.ui.util.SWTUtil; //导入依赖的package包/类
/**
 * Move the selected target to a workspace location
 */
private void handleMove() {
	MoveTargetDefinitionWizard wizard = new MoveTargetDefinitionWizard(moved_TargetDefinitions.values());
	WizardDialog dialog = new WizardDialog(getShell(), wizard);
	dialog.create();
	SWTUtil.setDialogSize(dialog, 400, 450);
	if (dialog.open() == IDialogConstants.OK_ID) {
		TableItem ti = fTableViewer.getTable().getItem(fTableViewer.getTable().getSelectionIndex());
		IPath newTargetLoc = wizard.getTargetFileLocation();
		IFile file = PDECore.getWorkspace().getRoot().getFile(newTargetLoc);
		ti.setData(DATA_KEY_MOVED_LOCATION, file.getFullPath().toString());
		IStructuredSelection selection = (IStructuredSelection) fTableViewer.getSelection();
		moved_TargetDefinitions.put((ITargetDefinition) selection.getFirstElement(), wizard.getTargetFileLocation());
		fTableViewer.refresh(true);
	}
}
 
开发者ID:jd-carroll,项目名称:target-baselines,代码行数:19,代码来源:TargetBaselinePreferencePage.java

示例3: handleInsert

import org.eclipse.pde.internal.ui.util.SWTUtil; //导入依赖的package包/类
/**
 * Handle action: insert new design pattern participant member
 */
void handleInsert() {
	final RoleNode roleNode = (RoleNode) fActiveNode;
	BusyIndicator.showWhile(fParticipantTree.getTree().getDisplay(), new Runnable() {

		@Override
		public void run() {
			RoleMemberWizard wizard = new RoleMemberWizard(getDesignPatternInstance(), roleNode);
			IWorkbench workbench = DesignPatternPlugin.getActiveWorkbenchWindow().getWorkbench();
			wizard.init(workbench, null);
			WizardDialog dialog = new WizardDialog(DesignPatternPlugin.getActiveWorkbenchShell(),
					wizard);
			dialog.create();
			SWTUtil.setDialogSize(dialog, 300, 200);
			// show member creation dialog
			if (dialog.open() == Window.OK) {
				// get code generator reference
				final MemberCodeGenerator codeGen = wizard.getCodeGenerator();
				// append new member node
				MemberNode member = new MemberNode((RoleNode) fActiveNode, codeGen.getCreatedType());
				// handle automatic code replacement
				handleAutoReplacement(codeGen);
				// show new member node
				fParticipantTree.refresh(fActiveNode);
				// select new member node
				fParticipantTree.setSelection(new StructuredSelection(member));
				// mark underlying model as dirty
				getDesignPatternInstance().setDirty(true);
				// fire model is changed
				getPage().getEditor().editorDirtyStateChanged();
			} // if
		} // func run()
	});
}
 
开发者ID:patternbox,项目名称:patternbox-eclipse,代码行数:37,代码来源:SectPatternParticipants.java


注:本文中的org.eclipse.pde.internal.ui.util.SWTUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。