本文整理汇总了Java中org.eclipse.jface.wizard.WizardDialog.setMinimumPageSize方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDialog.setMinimumPageSize方法的具体用法?Java WizardDialog.setMinimumPageSize怎么用?Java WizardDialog.setMinimumPageSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.wizard.WizardDialog
的用法示例。
在下文中一共展示了WizardDialog.setMinimumPageSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
/** (Non-javadoc)
* Method declared on IActionDelegate.
* @throws InterruptedException
* @throws InvocationTargetException
*/
public void execute(IAction action) throws InvocationTargetException, InterruptedException {
statusMap = new HashMap();
unaddedList = new ArrayList();
String title = Policy.bind("GenerateSVNDiff.title"); //$NON-NLS-1$
final IResource[] resources = getSelectedResources();
run(new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
modifiedResources = getModifiedResources(resources, monitor);
} catch (SVNException e) {
SVNUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
}
}
}, true, PROGRESS_BUSYCURSOR);
if (modifiedResources == null || modifiedResources.length == 0) {
MessageDialog.openInformation(getShell(), Policy.bind("GenerateSVNDiff.title"), Policy.bind("GenerateSVNDiff.noDiffsFoundMsg")); //$NON-NLS-1$ //$NON-NLS-1$
return;
}
IResource[] unaddedResources = new IResource[unaddedList.size()];
unaddedList.toArray(unaddedResources);
GenerateDiffFileWizard wizard = new GenerateDiffFileWizard(new StructuredSelection(modifiedResources), unaddedResources, statusMap);
wizard.setWindowTitle(title);
wizard.setSelectedResources(getSelectedResources());
WizardDialog dialog = new WizardDialogWithPersistedLocation(getShell(), wizard, "GenerateDiffFileWizard"); //$NON-NLS-1$
dialog.setMinimumPageSize(350, 250);
dialog.open();
}
示例2: 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);
}
}
示例3: run
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
protected void run(SVNTeamProvider provider, SyncInfoSet set, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
IResource[] resources = set.getResources();
HashMap statusMap = new HashMap();
unaddedList = new ArrayList();
for (int i = 0; i < resources.length; i++) {
ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resources[i]);
SyncInfo syncInfo = set.getSyncInfo(resources[i]);
SVNStatusKind statusKind = null;
try {
if (!svnResource.isManaged()) {
statusKind = SVNStatusKind.UNVERSIONED;
} else {
switch (SyncInfo.getChange(syncInfo.getKind())) {
case SyncInfo.ADDITION:
statusKind = SVNStatusKind.ADDED;
break;
case SyncInfo.DELETION:
statusKind = SVNStatusKind.DELETED;
break;
case SyncInfo.CONFLICTING:
statusKind = SVNStatusKind.CONFLICTED;
break;
default:
statusKind = SVNStatusKind.MODIFIED;
break;
}
}
statusMap.put(resources[i], statusKind);
if (!svnResource.isManaged() && !svnResource.isIgnored())
unaddedList.add(resources[i]);
} catch (SVNException e) {
SVNUIPlugin.log(IStatus.ERROR, e.getMessage(), e);
}
}
ArrayList dedupedList = new ArrayList();
Iterator iter = unaddedList.iterator();
while (iter.hasNext()) {
IResource resource = (IResource)iter.next();
if (!isDupe(resource)) dedupedList.add(resource);
}
IResource[] unversionedResources = new IResource[dedupedList.size()];
dedupedList.toArray(unversionedResources);
GenerateDiffFileWizard wizard = new GenerateDiffFileWizard(new StructuredSelection(resources), unversionedResources, statusMap);
wizard.setWindowTitle(Policy.bind("GenerateSVNDiff.title")); //$NON-NLS-1$
wizard.setSelectedResources(selectedResources);
// final WizardDialog dialog = new WizardDialog(getShell(), wizard);
// dialog.setMinimumPageSize(350, 250);
final WizardDialog dialog = new WizardDialogWithPersistedLocation(getShell(), wizard, "GenerateDiffFileWizard"); //$NON-NLS-1$
dialog.setMinimumPageSize(350, 250);
getShell().getDisplay().syncExec(new Runnable() {
public void run() {
dialog.open();
}
});
}
示例4: createDialog
import org.eclipse.jface.wizard.WizardDialog; //导入方法依赖的package包/类
/**
* Creates a new wizard dialog for the given wizard. And as an extra option
* to standard <strong>WizardDialog</strong> constructor, size of dialog can
* be given with a <strong>Point</point>.
*
* @param parentShell
* - the parent shell
* @param newWizard
* - the wizard this dialog is working on
* @param size
* - size of the dialog (x coordinate : width, y coordinate :
* height)
*/
public static WizardDialog createDialog(Shell parentShell, IWizard newWizard, Point size) {
if (size == null) {
return new WizardDialog(parentShell, newWizard);
} else {
WizardDialog wd = new WizardDialog(parentShell, newWizard);
// TODO setMinimumPageSize does not work.
wd.setMinimumPageSize(size);
wd.setPageSize(size);
return wd;
}
}