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


Java WizardDialog.setPageSize方法代碼示例

本文整理匯總了Java中org.eclipse.jface.wizard.WizardDialog.setPageSize方法的典型用法代碼示例。如果您正苦於以下問題:Java WizardDialog.setPageSize方法的具體用法?Java WizardDialog.setPageSize怎麽用?Java WizardDialog.setPageSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.wizard.WizardDialog的用法示例。


在下文中一共展示了WizardDialog.setPageSize方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createCriteriasFromSelection

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
public void createCriteriasFromSelection(Document dom) throws EngineException {
	String className = "com.twinsoft.convertigo.beans.core.Criteria";
	
	// Retrieve selected criterias xpath
	String criteriaXpath = xpathEvaluator.getSelectionXpath();

	// Retrieve parent ScreenClass
	HtmlScreenClass parentObject = getParentHtmlScreenClass();

	NewObjectWizard newObjectWizard = new NewObjectWizard(parentObject, className, criteriaXpath, dom);
	WizardDialog wzdlg = new WizardDialog(Display.getCurrent().getActiveShell(), newObjectWizard);
	wzdlg.setPageSize(850, 650);
	wzdlg.open();
	if (wzdlg.getReturnCode() != Window.CANCEL) {
		Criteria criteria = (Criteria)newObjectWizard.newBean;

		// Reload parent ScreenClass in Tree
		fireObjectChanged(new CompositeEvent(parentObject));

		// Set selection on last created criteria (will expand tree to new criteria)
		if (criteria != null) fireObjectSelected(new CompositeEvent(criteria));

		// Set back selection on parent ScreenClass
		fireObjectSelected(new CompositeEvent(parentObject));
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:27,代碼來源:HtmlConnectorDesignComposite.java

示例2: run

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
public void run() {
	Display display = Display.getDefault();
	Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);		
	
	Shell shell = getParentShell();
	shell.setCursor(waitCursor);
	
       try {
   		TreeObject parentTreeObject = null;
   		DatabaseObject databaseObject = null;
   		ProjectExplorerView explorerView = getProjectExplorerView();
   		if (explorerView != null) {
   			parentTreeObject = explorerView.getFirstSelectedTreeObject();
   			
   			if (parentTreeObject instanceof ObjectsFolderTreeObject) {
   				parentTreeObject = ((ObjectsFolderTreeObject) parentTreeObject).getParent();
   				databaseObject  = (DatabaseObject) parentTreeObject.getObject();
   			}
   			else {
   				databaseObject = (DatabaseObject) parentTreeObject.getObject();
   			}
   			
   			NewObjectWizard newObjectWizard = new NewObjectWizard(databaseObject, databaseObjectClassName);
       		WizardDialog wzdlg = new WizardDialog(shell, newObjectWizard);
       		wzdlg.setPageSize(850, 650);
       		wzdlg.open();
       		int result = wzdlg.getReturnCode();
       		if ((result != Window.CANCEL) && (newObjectWizard.newBean != null)) {
       			postCreate(parentTreeObject, newObjectWizard.newBean);
       		}
   		}
       }
       catch (Throwable e) {
       	ConvertigoPlugin.logException(e, "Unable to create a new database object '"+ databaseObjectClassName +"'!");
       }
       finally {
		shell.setCursor(null);
		waitCursor.dispose();
       }
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:41,代碼來源:DatabaseObjectCreateAction.java

示例3: run

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
public void run() {
	Display display = Display.getDefault();
	Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);		
	
	Shell shell = getParentShell();
	shell.setCursor(waitCursor);
	
       try {
   		TreeObject parentTreeObject = null;
   		DatabaseObject databaseObject = null;
   		ProjectExplorerView explorerView = getProjectExplorerView();
   		if (explorerView != null) {
   			parentTreeObject = explorerView.getFirstSelectedTreeObject();
   			
   			if (parentTreeObject instanceof ObjectsFolderTreeObject) {
   				parentTreeObject = ((ObjectsFolderTreeObject) parentTreeObject).getParent();
   				databaseObject  = (DatabaseObject) parentTreeObject.getObject();
   			}
   			else {
   				databaseObject = (DatabaseObject) parentTreeObject.getObject();
   			}
   			
   			ComponentObjectWizard newObjectWizard = new ComponentObjectWizard(databaseObject, databaseObjectClassName);
       		WizardDialog wzdlg = new WizardDialog(shell, newObjectWizard);
       		wzdlg.setPageSize(850, 650);
       		wzdlg.open();
       		int result = wzdlg.getReturnCode();
       		if ((result != Window.CANCEL) && (newObjectWizard.newBean != null)) {
       			postCreate(parentTreeObject, newObjectWizard.newBean);
       		}
   		}
       }
       catch (Throwable e) {
       	ConvertigoPlugin.logException(e, "Unable to create a new database object '"+ databaseObjectClassName +"'!");
       }
       finally {
		shell.setCursor(null);
		waitCursor.dispose();
       }
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:41,代碼來源:MobileComponentCreateAction.java

示例4: run

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
public void run() {
	Display display = Display.getDefault();
	Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);		
	
	Shell shell = getParentShell();
	shell.setCursor(waitCursor);
	
       try {
   		ProjectExplorerView explorerView = getProjectExplorerView();
   		if (explorerView != null) {
   			ProjectTreeObject projectTreeObject = (ProjectTreeObject)explorerView.getFirstSelectedTreeObject();
   			if (projectTreeObject != null) {
   	        	CustomAdditionsWizard caz = new CustomAdditionsWizard(projectTreeObject.getName());
   	    		WizardDialog wzdlg = new WizardDialog(shell, caz);
   	    		wzdlg.setPageSize(450, 250);
   	    		wzdlg.open();
   			}
   		}
       }
       catch (Throwable e) {
       	ConvertigoPlugin.logException(e, "Unable to add customized file!");
       }
       finally {
		shell.setCursor(null);
		waitCursor.dispose();
       }
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:28,代碼來源:CustomAdditionsAction.java

示例5: createExtractionRuleFromSelection

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
public void createExtractionRuleFromSelection(Document dom) throws EngineException {
	String className = "com.twinsoft.convertigo.beans.core.ExtractionRule";
	
	// Retrieve selected extraction rule xpath
	String extractionrulesXpath = xpathEvaluator.getSelectionXpath();

	// Retrieve parent ScreenClass
	HtmlScreenClass parentObject = getParentHtmlScreenClass();

	// Add extraction rule to screen class
	NewObjectWizard newObjectWizard = new NewObjectWizard(parentObject, className, extractionrulesXpath, dom);
	WizardDialog wzdlg = new WizardDialog(Display.getCurrent().getActiveShell(), newObjectWizard);
	wzdlg.setPageSize(850, 650);
	wzdlg.open();
	if (wzdlg.getReturnCode() != Window.CANCEL) {
		HtmlExtractionRule extractionrule = (HtmlExtractionRule)newObjectWizard.newBean;
		
		// Reload parent ScreenClass in Tree
		fireObjectChanged(new CompositeEvent(parentObject));

		// Set selection on new extraction rule (will expand tree to new extraction rule)
		if (extractionrule != null) fireObjectSelected(new CompositeEvent(extractionrule));

		// Set back selection on parent ScreenClass
		fireObjectSelected(new CompositeEvent(parentObject));		
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:28,代碼來源:HtmlConnectorDesignComposite.java

示例6: createStatementFromSelection

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
public void createStatementFromSelection() {
	String className = "com.twinsoft.convertigo.beans.core.Statement";
	
	// Retrieve selected statement xpath
	String statementXpath = xpathEvaluator.getSelectionXpath();

	// Retrieve parent Statement
	Statement parentObject = getParentStatement();
	if (parentObject == null) {
		ConvertigoPlugin.errorMessageBox("Unable to create a new statement.\nThe selected handler belongs to a different HTML connector.");
		return;
	}
	
	// Add statement to parent statement
	NewObjectWizard newObjectWizard = new NewObjectWizard(parentObject, className, statementXpath, null);
	WizardDialog wzdlg = new WizardDialog(Display.getCurrent().getActiveShell(), newObjectWizard);
	wzdlg.setPageSize(850, 650);
	wzdlg.open();
	if (wzdlg.getReturnCode() != Window.CANCEL) {
		Statement statement = (Statement)newObjectWizard.newBean;
		
		// Reload parent statement in Tree
		fireObjectChanged(new CompositeEvent(parentObject));

		// Set selection on new statement (will expand tree to new statement)
		if (statement != null) fireObjectSelected(new CompositeEvent(statement));

		// Set back selection on parent statement
		fireObjectSelected(new CompositeEvent(parentObject));
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:32,代碼來源:HtmlConnectorDesignComposite.java

示例7: createScreenClassFromSelection

import org.eclipse.jface.wizard.WizardDialog; //導入方法依賴的package包/類
public void createScreenClassFromSelection() throws EngineException {
	String className = "com.twinsoft.convertigo.beans.core.ScreenClass";
	
	// Retrieve selected criteria xpath
	String criteriaXpath = xpathEvaluator.getSelectionXpath();

	// Retrieve parent ScreenClass
	HtmlScreenClass parentObject = getParentHtmlScreenClass();
	
	NewObjectWizard newObjectWizard = new NewObjectWizard(parentObject, className);
	WizardDialog wzdlg = new WizardDialog(Display.getCurrent().getActiveShell(), newObjectWizard);
	wzdlg.setPageSize(850, 650);
	wzdlg.open();
	if (wzdlg.getReturnCode() != Window.CANCEL) {
		HtmlScreenClass htmlScreenClass = (HtmlScreenClass)newObjectWizard.newBean;
		if (htmlScreenClass != null) {
			String screenClassName = htmlScreenClass.getName();
			
			// Add criteria to screen class
			createCriteria(htmlScreenClass, criteriaXpath);
			
			// Set detected ScreenClass to newly created one
			if (htmlConnector.isLearning()) {
				detectedScreenClass = htmlScreenClass;
				ConvertigoPlugin.logDebug2("(HtmlConnectorDesignComposite) Detected screen class is set to newly created one named '"+ screenClassName +"'");
			}
			else {
				ConvertigoPlugin.logDebug2("(HtmlConnectorDesignComposite) New screen class named '"+ screenClassName +"' has been added");
			}

			// Reload parent ScreenClass in Tree
			fireObjectChanged(new CompositeEvent(parentObject));

			// Set selection on newly created screenclass
			fireObjectSelected(new CompositeEvent(htmlScreenClass));

			// Highlight new detected ScreenClass in Tree
			if (htmlConnector.isLearning())
				Engine.theApp.fireObjectDetected(new EngineEvent(htmlScreenClass));

			//TODO:toolScreenclass.setEnabled(false);
		}
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:45,代碼來源:HtmlConnectorDesignComposite.java

示例8: 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.setPageSize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。