本文整理汇总了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);
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
}
}
示例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;
}
示例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();
}
示例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;
}
}
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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) {
}
}
示例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);
}
}
示例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;
}