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


Java SWT.MIN屬性代碼示例

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


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

示例1: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 * @param parentShell The parent windows' Shell.
 * @param classLoader The system MugglClassLoader.
 */
private void createShell(Shell parentShell, MugglClassLoader classLoader) {
	this.shell = new Shell(this.display, SWT.BORDER | SWT.CLOSE | SWT.TITLE | SWT.MIN);
	this.shell.setText(Globals.WINDOWS_TITLE + Globals.WINDOWS_TITLE_CONNECTOR + "Options");
	this.shell.setLayout(new FillLayout(SWT.VERTICAL));
	
	final Image small = new Image(shell.getDisplay(),
	        OptionsWindow.class.getResourceAsStream("/images/tray_small.png"));
	final Image large = new Image(shell.getDisplay(),
			OptionsWindow.class.getResourceAsStream("/images/tray_large.png"));
	this.shell.setImages(new Image[] { small, large });
	
	// No need to read it later, so it is not assigned to a variable.
	new OptionsComposite(this, this.shell, SWT.NONE, classLoader);

	// Compute the needed size.
	Point point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
	point.x += 2;
	point.y += 2;
	int[] posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, parentShell);
	this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:26,代碼來源:OptionsWindow.java

示例2: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 * @param parent The Composite which this Window is invoked by.
 * @param method The Method thats' parameters will be defined in this Window.
 */
private void createShell(FileSelectionComposite parent, Method method) {
	this.shell = new Shell(this.display, SWT.BORDER | SWT.CLOSE | SWT.TITLE | SWT.MIN);
	this.shell.setText(
			Globals.WINDOWS_TITLE + Globals.WINDOWS_TITLE_CONNECTOR
			+ "Method Parameters and Variable Generators for " + method.getFullNameWithParameterTypesAndNames());
	this.shell.setLayout(new FillLayout(SWT.VERTICAL));

	new MethodParametersComposite(parent, this, this.shell, this.display, SWT.NONE, method);

	// Compute the needed size.
	Point point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
	point.x += 2;
	point.y += 2;
	int[] posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, parent.getShell());
	this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:21,代碼來源:MethodParametersWindow.java

示例3: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 * @param arrayModificationHandler The ArrayModificationHandler the holds the represented array.
 * @param myDimension The dimension of a probably multidimensional array this Window represents.
 * @param dimensionsIndexes Dimension indexes of the higher-level dimensions the array represented might be a part of.
 */
private void createShell(ArrayModificationHandler arrayModificationHandler, int myDimension, int[] dimensionsIndexes) {
	this.shell = new Shell(this.display, SWT.BORDER | SWT.CLOSE | SWT.TITLE | SWT.MIN);
	this.shell.setText(Globals.WINDOWS_TITLE + Globals.WINDOWS_TITLE_CONNECTOR + "Array Entries");
	this.shell.setLayout(new FillLayout(SWT.VERTICAL));

	// Initialize the composite.
	new ArrayEntriesComposite(this, this.shell, this.display, SWT.NONE, arrayModificationHandler, myDimension, dimensionsIndexes);

	// Compute the needed size.
	Point point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
	point.x += 2;
	point.y += 2;
	int[] posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, this.parent.getShell());
	this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:21,代碼來源:ArrayEntriesWindow.java

示例4: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 * @param parentShell The parent windows' Shell.
 * @param className The name of the class to inspect.
 * @param classFile The ClassFile to inspect.
 */
private void createShell(Shell parentShell, String className, ClassFile classFile) {
	this.shell = new Shell(this.display, SWT.BORDER | SWT.CLOSE | SWT.TITLE | SWT.MIN);
	this.shell.setText(Globals.WINDOWS_TITLE + Globals.WINDOWS_TITLE_CONNECTOR + "Class File Inspection");
	this.shell.setLayout(new FillLayout(SWT.VERTICAL));

	// No need to read it later, so it is not assigned to a variable.
	new ClassInspectionComposite(this, this.shell, this.display, SWT.NONE, className, classFile);

	// Compute the needed size.
	Point point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
	point.x += 2;
	point.y += 2;
	int[] posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, parentShell);
	this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:21,代碼來源:ClassInspectionWindow.java

示例5: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 * @param classPathEntries The class path entries.
 */
private void createShell(List<String> classPathEntries) {
	this.shell = new Shell(this.display, SWT.BORDER | SWT.CLOSE | SWT.TITLE | SWT.MIN);
	this.shell.setText(Globals.WINDOWS_TITLE + Globals.WINDOWS_TITLE_CONNECTOR + "Class Path Entries");
	this.shell.setLayout(new FillLayout(SWT.VERTICAL));

	new ClassPathEntriesComposite(this, this.shell, this.display, SWT.NONE, classPathEntries);

	// Compute the needed size.
	Point point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
	point.x += 2;
	point.y += 2;
	int[] posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, this.parent.getShell());
	this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:18,代碼來源:ClassPathEntriesWindow.java

示例6: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 */
private void createShell() {
	this.shell = new Shell(this.display, SWT.BORDER | SWT.CLOSE | SWT.TITLE | SWT.MIN);
	this.shell.setText(Globals.WINDOWS_TITLE
			+ Globals.WINDOWS_TITLE_CONNECTOR + "Select ");
	this.shell.setLayout(new FillLayout(SWT.VERTICAL));
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:9,代碼來源:GeneratorSelectionWindow.java

示例7: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 * @param parentShell The parent windows' Shell.
 * @param classLoader The system MugglClassLoader.
 * @param classFile The classFile the initial Method belongs to.
 * @param method The initial Method.
 * @return true, if the shell could be setup properly, false otherwise.
 */
private boolean createShell(Shell parentShell, MugglClassLoader classLoader, ClassFile classFile, Method method) {
	this.shell = new Shell(this.display, SWT.BORDER | SWT.CLOSE | SWT.TITLE | SWT.MIN);
	this.shell.setText(Globals.WINDOWS_TITLE + Globals.WINDOWS_TITLE_CONNECTOR + "Step by Step Execution");
	this.shell.setLayout(new FillLayout(SWT.VERTICAL));
	try {
		// Compute and set the needed size. As there might be a MessageBox displayed, this has to be done now!
		Point point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		point.x += 2;
		point.y += 2;
		int[] posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, parentShell);
		this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);

		// Show the composite.
		this.stepByStepExecutionComposite = new StepByStepExecutionComposite(this, this.shell, this.display, SWT.NONE, classLoader, classFile, method);

		// Compute and set the needed size.
		point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		point.x += 2;
		point.y += 2;
		posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, parentShell);
		this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);
		return true;
	} catch (GUIException e) {
		// Only one (user-caused) exception will not be displayed for the user. In all other cases generate a message box to inform him what has happened.
		if (!e.getMessage().contains("Do not show this window!")) {
			StaticGuiSupport.showMessageBox(parentShell, "Error", "The step by step execution window could not be loaded.\n\nThe root cause is:\n" + e.getMessage(), SWT.OK | SWT.ICON_ERROR);
		}
		doExit();
		return false;
	}
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:39,代碼來源:StepByStepExecutionWindow.java

示例8: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 *
 * @throws IllegalStateException If the parent shell is unusable (null or disposed).
 */
private void createShell() {
	// Lock the parent shell for this operation.
	if (this.parentShell != null) {
		synchronized (this.parentShell) {
			if (this.parentShell.isDisposed()) {
				throw new IllegalStateException("The parent shell is unusable.");
			}

			// Continue building this shell.
			this.shell = new Shell(this.display, SWT.BORDER | SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.RESIZE);
			this.shell.setText(Globals.WINDOWS_TITLE + Globals.WINDOWS_TITLE_CONNECTOR + "Log...");
			this.shell.setLayout(new FillLayout(SWT.VERTICAL));

			// No need to read it later, so it is not assigned to a variable.
			new LogComposite(this, this.shell, this.display, SWT.NONE);

			// Compute the needed size.
			Point point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
			point.x += 2;
			point.y += 2;
			int[] posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, this.parentShell);
			this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);
		}
	} else {
		throw new IllegalStateException("The parent shell is unusable.");
	}
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:32,代碼來源:LogWindow.java

示例9: createShell

/**
 * Create the Shell, setting up any elements that are not set up by the main Composite.
 * @param parentShell The parent windows' Shell.
 * @param classLoader The system MugglClassLoader.
 * @param classFile The classFile the initial Method belongs to.
 * @param method The initial Method.
 * @return true, if the shell could be setup properly, false otherwise.
 */
private boolean createShell(Shell parentShell, MugglClassLoader classLoader, ClassFile classFile, Method method) {
	this.shell = new Shell(this.display, SWT.BORDER | SWT.CLOSE | SWT.TITLE | SWT.MIN);
	this.shell.setText(Globals.WINDOWS_TITLE + Globals.WINDOWS_TITLE_CONNECTOR + "Execution of " + method.getFullName());
	this.shell.setLayout(new FillLayout(SWT.VERTICAL));

	final Image small = new Image(shell.getDisplay(),
			ExecutionWindow.class.getResourceAsStream("/images/tray_small.png"));
	final Image large = new Image(shell.getDisplay(),
			ExecutionWindow.class.getResourceAsStream("/images/tray_large.png"));
	this.shell.setImages(new Image[] { small, large });
	
	/*
	 * Listen for close events.
	 */
	this.shell.addListener(SWT.Close, new Listener() {
		public void handleEvent(Event event) {
	    	/*
			 * Make sure the execution is aborted right now. Children windows might still be
			 * opened and will inhibit running the finally block of the show-method.Make sure
			 * the execution is aborted right now. Children windows might still be opened and
			 * will
			 */
	    	if (ExecutionWindow.this.executionComposite != null)
	    		ExecutionWindow.this.executionComposite.abortExecution();

	    	// Close the window.
	        doExit();
	      }
	    });

	try {
		// Compute and set the needed size. As there might be a MessageBox displayed, this has to be done now!
		Point point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		point.x += 2;
		point.y += 2;
		int[] posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, parentShell);
		this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);

		// Show the composite.
		this.executionComposite = new ExecutionComposite(this, this.shell, this.display, SWT.NONE, classLoader, classFile, method);

		// Compute and set the needed size.
		point = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		point.x += 2;
		point.y += 2;
		posXY = StaticGuiSupport.getCenteredPosition(point.x, point.y, parentShell);
		this.shell.setBounds(posXY[0], posXY[1], point.x, point.y);
		return true;
	} catch (GUIException e) {
		// Only one (user-caused) exception will not be displayed for the user. In all other cases generate a message box to inform him what has happened.
		if (!e.getMessage().contains("Do not show this window!")) {
			StaticGuiSupport.showMessageBox(parentShell, "Error", "The step by step execution window could not be loaded.\n\nThe root cause is:\n" + e.getMessage(), SWT.OK | SWT.ICON_ERROR);
		}
		doExit();
		return false;
	}
}
 
開發者ID:wwu-pi,項目名稱:tap17-muggl-javaee,代碼行數:65,代碼來源:ExecutionWindow.java

示例10: calcState

private int calcState(Shell shell) {
	return shell.getMinimized() ? SWT.MIN : shell.getMaximized() ? SWT.MAX : SWT.NONE;
}
 
開發者ID:BiglySoftware,項目名稱:BiglyBT,代碼行數:3,代碼來源:Utils.java


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