当前位置: 首页>>代码示例>>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;未经允许,请勿转载。