當前位置: 首頁>>代碼示例>>Java>>正文


Java WizardDialog.setMinimumPageSize方法代碼示例

本文整理匯總了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();
}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:34,代碼來源:GenerateDiffFileAction.java

示例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);
  }
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:30,代碼來源:AbstractOpenWizardAction.java

示例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();	
			}
		});		
	}
 
開發者ID:subclipse,項目名稱:subclipse,代碼行數:57,代碼來源:GenerateDiffFileSynchronizeOperation.java

示例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;
	}
}
 
開發者ID:Pardus-LiderAhenk,項目名稱:lider-ahenk-installer,代碼行數:25,代碼來源:GUIHelper.java


注:本文中的org.eclipse.jface.wizard.WizardDialog.setMinimumPageSize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。