本文整理匯總了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;
}
}