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


Java WizardDialog.create方法代码示例

本文整理汇总了Java中org.eclipse.jface.wizard.WizardDialog.create方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDialog.create方法的具体用法?Java WizardDialog.create怎么用?Java WizardDialog.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.wizard.WizardDialog的用法示例。


在下文中一共展示了WizardDialog.create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public void execute() {
	if (newChart == null) {
		JRDesignComponentElement clone = (JRDesignComponentElement) oldChart
				.clone();
		SpiderChartComponent scc = (SpiderChartComponent) clone
				.getComponent();
		// TODO SHOULD TAKE THIS ONE FROM EDITOR

		ChartWizard wizard = new ChartWizard(new MSpiderChart(null, clone,
				-1), (JRDesignElementDataset) scc.getDataset());
		wizard.init(jConfig);
		wizard.setExpressionContext(ModelUtils.getElementExpressionContext(oldChart,originalNode));
		WizardDialog dialog = new WizardDialog(Display.getDefault()
				.getActiveShell(), wizard);
		dialog.create();
		if (dialog.open() == Dialog.OK) {
			this.newChart = (JRDesignComponentElement) wizard.getChart()
					.getValue();
		} else
			return;
	}
	switchCharts(oldChart, newChart);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:25,代码来源:EditSpiderChartCommand.java

示例2: execute

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public void execute() {
	if (newChart == null) {
		JRDesignChart clone = (JRDesignChart) oldChart.clone();

		ChartWizard wizard = new ChartWizard(new MChart(null, clone, -1),
				(JRDesignElementDataset) clone.getDataset(), true);
		wizard.init(jConfig);
		wizard.setExpressionContext(ModelUtils.getElementExpressionContext(oldChart, originalNode));
		WizardDialog dialog = new WizardDialog(Display.getDefault()
				.getActiveShell(), wizard);
		dialog.create();
		if (dialog.open() == Dialog.OK) {
			this.newChart = (JRDesignChart) wizard.getChart().getValue();
		} else
			return;
	}
	switchCharts(oldChart, newChart);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:20,代码来源:EditChartCommand.java

示例3: run

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public void run() {
  WizardDialog dialog = new WizardDialog(null, new Wizard() {
    private HadoopLocationWizard page = new HadoopLocationWizard();

    @Override
    public void addPages() {
      super.addPages();
      setWindowTitle("New Hadoop location...");
      addPage(page);
    }

    @Override
    public boolean performFinish() {
      page.performFinish();
      return true;
    }

  });

  dialog.create();
  dialog.setBlockOnOpen(true);
  dialog.open();

  super.run();
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:27,代码来源:NewLocationAction.java

示例4: run

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public void run() {
	ANode rootElement = HandlersUtil.getRootElement();
	if (rootElement != null) {
		JasperDesign design = rootElement.getJasperDesign();
		JasperReportsConfiguration config = rootElement.getJasperConfiguration();
		ANode servers = HandlersUtil.getServers();
		if (servers != null && servers.getChildren().size() > 0) {
			// Create a fake root to show only the server connection in the list
			Publish2ServerWizard wizard = new Publish2ServerWizard(design, config, 1);
			WizardDialog dialogToOpen = new WizardDialog(UIUtils.getShell(), wizard);
			dialogToOpen.create();
			dialogToOpen.open();
		} else
			MessageDialog.openWarning(UIUtils.getShell(), Messages.UploadReportCheatAction_no_server_title, Messages.UploadReportCheatAction_no_server_warning);
	} else
		MessageDialog.openWarning(UIUtils.getShell(), Messages.UploadReportCheatAction_warning_title, Messages.UploadReportCheatAction_warning_message);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:19,代码来源:UploadReportCheatAction.java

示例5: doExecute

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
protected void doExecute(LoadMetadataRepositoryJob job) {
    if (hasNoRepos) {
        MessageDialog.openInformation(null, "Update Yamcs Studio", "Could not check for updates since no repository is configured");
        return;
    }

    UpdateOperation operation = getProvisioningUI().getUpdateOperation(null, null);
    // check for updates
    operation.resolveModal(null);
    if (getProvisioningUI().getPolicy().continueWorkingWithOperation(operation, getShell())) {
        if (UpdateSingleIUWizard.validFor(operation)) {
            // Special case for only updating a single root
            UpdateSingleIUWizard wizard = new UpdateSingleIUWizard(getProvisioningUI(), operation);
            WizardDialog dialog = new WizardDialog(getShell(), wizard);
            dialog.create();
            dialog.open();
        } else {
            // Open the normal version of the update wizard
            getProvisioningUI().openUpdateWizard(false, operation, job);
        }
    }
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:24,代码来源:UpdateHandler.java

示例6: getLocalResource

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
protected MResource getLocalResource(MResource res, ResourceDescriptor runit, ANode pnode) {
	AddResourceWizard wizard = new AddResourceWizard(res, true);
	wizard.setMondrianOnly(true);
	WizardDialog dialog = new WizardDialog(UIUtils.getShell(), wizard);
	dialog.create();
	if (dialog.open() != Dialog.OK)
		return null;
	MResource r = wizard.getResource();
	ResourceDescriptor ref = r.getValue();
	ref.setIsNew(true);
	ref.setIsReference(false);
	ref.setParentFolder(runit.getParentFolder() + "/" + runit.getName() + "_files"); //$NON-NLS-1$
	ref.setDirty(true);
	return r;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:SelectorMondrianConnection.java

示例7: run

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
public void run(IAction action) {
	IQueryDescriptorHandle handle= null;
	if (fSelection.getFirstElement() instanceof IQueryDescriptorHandle) {
		handle= (IQueryDescriptorHandle)fSelection.getFirstElement();
	}
	if (handle == null) {
		return;
	}


	CopyWorkItemsFromQueryWizard wizard= new CopyWorkItemsFromQueryWizard();
	wizard.init(fPart.getSite().getWorkbenchWindow().getWorkbench(), new StructuredSelection(handle));
	WizardDialog dialog= new WizardDialog(fPart.getSite().getShell(), wizard);
	dialog.create();
	dialog.open();
}
 
开发者ID:sandy081,项目名称:Copy-Work-Items,代码行数:17,代码来源:CopyWorkItemsFromQuery.java

示例8: createObject

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
private void createObject() {
	if (jrField == null) {
		jrField = MSortField.createJRSortField(jrDataSet);
		SortFieldWizard wizard = new SortFieldWizard();
		wizard.init(jrDataSet, jrField);
		WizardDialog dialog = new WizardDialog(UIUtils.getShell(), wizard);
		dialog.create();
		if (dialog.open() != Dialog.OK) {
			jrField = null;
			return;
		}
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:14,代码来源:CreateSortFieldCommand.java

示例9: openDialogBox

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
protected Object openDialogBox(Control cellEditorWindow) {
	TabStopsEditor wizard = new TabStopsEditor();
	wizard.setValue((List<TabStop>) getValue());
	WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
	dialog.create();
	if (dialog.open() == Dialog.OK) {
		return wizard.getValue();
	}
	return null;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:12,代码来源:TabStopsCellEditor.java

示例10: main

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
public static void main(final String[] args) {
	final Display display = new Display();
	final Shell shell = new Shell(display);
	final JDataStoreWizard wizard = new JDataStoreWizard(".shp");
	final WizardDialog dialog = new WizardDialog(shell, wizard);
	dialog.create();
	dialog.open();
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:9,代码来源:JDataStoreWizard.java

示例11: openDialogBox

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
protected Object openDialogBox(Control cellEditorWindow) {
	SubreportPropertyEditor wizard = new SubreportPropertyEditor();
	wizard.setValue((JRSubreportParameter[]) getValue(), msubreport);
	WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
	dialog.create();
	if (dialog.open() == Dialog.OK) {
		return wizard.getValue();
	}
	return null;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:12,代码来源:SubreportPropertiesCellEditor.java

示例12: execute

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
	TxtUMLVisualizeWizard wizard = new TxtUMLVisualizeWizard();
	WizardDialog wizardDialog = new WizardDialog(null, wizard);
	wizardDialog.create();

	VisualizeTxtUMLPage page = ((VisualizeTxtUMLPage) wizardDialog.getSelectedPage());

	// get selected files
	ISelection selection = HandlerUtil.getCurrentSelection(event);
	IStructuredSelection strSelection = (IStructuredSelection) selection;

	List<ICompilationUnit> selectedCompilationUnits = new ArrayList<>();
	Stream.of(strSelection.toArray()).forEach(s -> selectedCompilationUnits
			.add((ICompilationUnit) ((IAdaptable) s).getAdapter(ICompilationUnit.class)));
	try {
		List<IType> types = new ArrayList<>();
		for (ICompilationUnit cu : selectedCompilationUnits) {
			types.addAll(Arrays.asList(cu.getTypes()));
		}
		page.selectElementsInDiagramTree(types.toArray(), false);
		page.setExpandedLayouts(types);
	} catch (JavaModelException ex) {
	}

	wizardDialog.open();
	return null;
}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:29,代码来源:TxtUMLVisualizeSelectedDiagramsHandler.java

示例13: run

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public void run() {
	StructuredSelection selection = (StructuredSelection) treeViewer.getSelection();

	ExportMetadataWizard wizard = new ExportMetadataWizard(selection);
	WizardDialog dialog = new WizardDialog(UIUtils.getShell(), wizard);
	dialog.create();
	if (dialog.open() == Dialog.OK) {

	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:12,代码来源:ExportMetadataAction.java

示例14: run

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
public void run() {
  Shell localShell = getShell();
  if (!doCreateProjectFirstOnEmptyWorkspace(localShell)) {
    return;
  }

  try {
    INewWizard wizard = createWizard();
    wizard.init(PlatformUI.getWorkbench(), getSelection());

    WizardDialog dialog = new WizardDialog(localShell, wizard);
    IPixelConverter converter =
        PixelConverterFactory.createPixelConverter(JFaceResources.getDialogFont());
    dialog.setMinimumPageSize(converter.convertWidthInCharsToPixels(70),
        converter.convertHeightInCharsToPixels(20));
    dialog.create();
    int res = dialog.open();
    if (res == Window.OK && wizard instanceof NewElementWizard) {
      createdElement = ((NewElementWizard) wizard).getCreatedElement();
    }

    notifyResult(res == Window.OK);
  } catch (CoreException e) {
    String title = NewWizardMessages.AbstractOpenWizardAction_createerror_title;
    String message = NewWizardMessages.AbstractOpenWizardAction_createerror_message;
    ExceptionHandler.handle(e, localShell, title, message);
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:30,代码来源:AbstractOpenWizardAction.java

示例15: openDialogBox

import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
@Override
protected Object openDialogBox(Control cellEditorWindow) {
	ParameterEditor wizard = new ParameterEditor();
	wizard.setValue((ParameterDTO) getValue());
	wizard.setExpressionContext(expContext);
	WizardDialog dialog = new WizardDialog(cellEditorWindow.getShell(), wizard);
	dialog.create();
	if (dialog.open() == Dialog.OK) {
		return wizard.getValue();
	}
	return null;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:13,代码来源:ParameterCellEditor.java


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