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