当前位置: 首页>>代码示例>>Java>>正文


Java SWT.TITLE属性代码示例

本文整理汇总了Java中org.eclipse.swt.SWT.TITLE属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.TITLE属性的具体用法?Java SWT.TITLE怎么用?Java SWT.TITLE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.swt.SWT的用法示例。


在下文中一共展示了SWT.TITLE属性的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: open

public void open(DeviceTemplateClosedListener l) {
	this.listener = l;
	skinnedDialog = new SkinnedDialog("skin3_dlg_deviceadd_mfchooser",
			"shell", SWT.TITLE | SWT.BORDER);

	skinnedDialog.addCloseListener(new SkinnedDialogClosedListener() {
		@Override
		public void skinDialogClosed(SkinnedDialog dialog) {
			if (listener != null) {
				listener.deviceTemplateChooserClosed(selectedDeviceTemplate);
			}
		}
	});

	SWTSkin skin = skinnedDialog.getSkin();
	SWTSkinObject so= skin.getSkinObject("list");
	if (so instanceof SWTSkinObjectContainer) {
		SWTSkinObjectContainer soList = (SWTSkinObjectContainer) so;

		createDeviceTemplateList2(soList);
	}

	skinnedDialog.open();
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:24,代码来源:DeviceTemplateChooser.java

示例2: 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

示例3: 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

示例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: getShellStyle

@Override
protected int getShellStyle() {
	return SWT.TITLE | SWT.BORDER | SWT.RESIZE | SWT.APPLICATION_MODAL;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:4,代码来源:EditorFrameworkDialog.java

示例10: getShellStyle

@Override
protected int getShellStyle() {
	return SWT.RESIZE | SWT.TITLE | SWT.APPLICATION_MODAL;
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:4,代码来源:ProjectChooseTestCasesDialog.java

示例11: 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

示例12: open

public void open(ClosedListener l) {
	this.listener = l;
	skinnedDialog = new SkinnedDialog("skin3_dlg_deviceadd_mfchooser",
			"shell", SWT.TITLE | SWT.BORDER);

	skinnedDialog.addCloseListener(new SkinnedDialogClosedListener() {
		@Override
		public void skinDialogClosed(SkinnedDialog dialog) {
			if (listener != null) {
				listener.MfChooserClosed(chosenMF);
			}
		}
	});

	SWTSkin skin = skinnedDialog.getSkin();
	SWTSkinObject so= skin.getSkinObject("list");
	if (so instanceof SWTSkinObjectContainer) {
		SWTSkinObjectContainer soList = (SWTSkinObjectContainer) so;

		Composite parent = soList.getComposite();

		Canvas centerCanvas = new Canvas(parent, SWT.NONE);
		FormData fd = Utils.getFilledFormData();
		fd.bottom = null;
		fd.height = 0;
		centerCanvas.setLayoutData(fd);


		Composite area = new Composite(parent, SWT.NONE);
		RowLayout rowLayout = new RowLayout(SWT.VERTICAL);
		rowLayout.fill = true;
		Utils.setLayout(area, rowLayout);
		fd = Utils.getFilledFormData();
		fd.left = new FormAttachment(centerCanvas, 50, SWT.CENTER);
		fd.right = null;
		area.setLayoutData(fd);

		Listener btnListener = new Listener() {
			@Override
			public void handleEvent(Event event) {
				chosenMF = (DeviceManufacturer) event.widget.getData("mf");
				skinnedDialog.close();
			}
		};

		DeviceManager deviceManager = DeviceManagerFactory.getSingleton();
		DeviceManufacturer[] mfs = deviceManager.getDeviceManufacturers(Device.DT_MEDIA_RENDERER);
		for (DeviceManufacturer mf : mfs) {
			DeviceTemplate[] deviceTemplates = mf.getDeviceTemplates();
			boolean hasNonAuto = false;
			for (DeviceTemplate deviceTemplate : deviceTemplates) {
				if (!deviceTemplate.isAuto()) {
					hasNonAuto = true;
					break;
				}
			}
			if (!hasNonAuto) {
				continue;
			}
			Button button = new Button(area, SWT.PUSH);
			button.setText(mf.getName());
			button.setData("mf", mf);
			button.addListener(SWT.MouseUp, btnListener);
		}
	}

	skinnedDialog.getShell().pack();
	skinnedDialog.open();
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:69,代码来源:ManufacturerChooser.java

示例13: open

public void open(final Shell parent, Display... parentDisplay) {
	if (TipDayEx.index == -1) {
		TipDayEx.index = new Random().nextInt(this.tips.size());
	}
	this.shell = new Shell(parent,
			SWT.SYSTEM_MODAL | SWT.TITLE | SWT.BORDER | SWT.CLOSE | SWT.RESIZE);
	this.shell.setText("Tip of the day");
	this.shell.setLayout(new GridLayout(2, false));

	this.shell.addListener(SWT.Traverse, new Listener() {
		@Override
		public void handleEvent(final Event event) {
			switch (event.detail) {
			case SWT.TRAVERSE_ESCAPE:
				TipDayEx.this.shell.dispose();
				event.detail = SWT.TRAVERSE_NONE;
				event.doit = false;
				break;
			}
		}
	});
	buildLeftColumn();
	buildTip();
	buildButtons();

	this.shell.setDefaultButton(this.buttonClose);
	this.shell.pack();
	this.shell.open();

	if (parentDisplay != null) {
		display = parentDisplay[0];
	} else {

		display = this.shell.getDisplay();
	}
	Monitor primary = display.getPrimaryMonitor();
	Rectangle bounds = primary.getBounds();
	Rectangle rect = shell.getBounds();

	int x = bounds.x + (bounds.width - rect.width) / 2;
	int y = bounds.y + (bounds.height - rect.height) / 2;

	shell.setLocation(x, y);

	while (!this.shell.isDisposed()) {
		if (!display.readAndDispatch()) {
			display.sleep();
		}
	}
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:50,代码来源:TipDayEx.java

示例14: ProgressBarDialog

public ProgressBarDialog(Shell parentShell) {
	shell = new Shell(parentShell, SWT.TITLE | SWT.MODELESS | SWT.CENTER);
	shell.setSize(520, 400);
       shell.setText("Running LSDiff...");
       createDialogArea(shell);
}
 
开发者ID:aserg-ufmg,项目名称:RefDiff,代码行数:6,代码来源:ProgressBarDialog.java


注:本文中的org.eclipse.swt.SWT.TITLE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。