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


Java SWT.SHELL_TRIM属性代码示例

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


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

示例1: open

/**
 * Setup the Disk window and display (open) it.
 */
public void open() {
	shell = new Shell(parentShell, SWT.SHELL_TRIM);
	shell.setLayout(new FillLayout());
	shell.setImage(imageManager.get(ImageManager.ICON_DISK));
	setStandardWindowTitle();
	shell.addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent event) {
				dispose(event);
			}
		});
		
	CTabFolder tabFolder = new CTabFolder(shell, SWT.BOTTOM);
	new DiskExplorerTab(tabFolder, disks, imageManager, this);
	diskMapTabs = new DiskMapTab[disks.length];
	for (int i=0; i<disks.length; i++) {
		if (disks[i].supportsDiskMap()) {
			diskMapTabs[i] = new DiskMapTab(tabFolder, disks[i]);
		}
	}
	diskInfoTab = new DiskInfoTab(tabFolder, disks);
	tabFolder.setSelection(tabFolder.getItems()[0]);
	
	
	shell.open();
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:28,代码来源:DiskWindow.java

示例2: main

public static void main(String[] args) {
	Display display = new Display();
	Shell shell = new Shell(display, SWT.SHELL_TRIM);
	shell.setLayout(new FillLayout(SWT.VERTICAL));

	final Label label = new Label(shell, SWT.BORDER);

	final Text text = new Text(shell, SWT.BORDER);
	text.addModifyListener(new ModifyListener() {

		@Override
		public void modifyText(ModifyEvent e) {
			Image pathIcon = getPathIcon(text.getText(), false, false);
			label.setImage(pathIcon);
		}
	});

	shell.open();

	while (!shell.isDisposed()) {
		if (!display.readAndDispatch()) {
			display.sleep();
		}
	}
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:25,代码来源:ImageRepository.java

示例3: ImageCanvas

/**
 * Constructor for ImageCanvas.
 */
public ImageCanvas(Composite parent, int style, Image image, Object layoutData) {
	super(parent, style | SWT.SHELL_TRIM | SWT.NO_BACKGROUND | SWT.NO_REDRAW_RESIZE);
	this.image = image;
	setLayoutData(layoutData);
	setSize(image.getImageData().width, image.getImageData().height);
	addPaintListener(this);
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:10,代码来源:ImageCanvas.java

示例4: main

public static void main(String[] args) {
	Display display = Display.getDefault();
	Shell shell = new Shell(display, SWT.SHELL_TRIM);
	shell.open();

	MessageBoxShell messageBoxShell = new MessageBoxShell(
			"Title",
			"Test\n"
					+ "THis is a very long line that tests whether the box gets really wide which is something we don't want.\n"
					+ "A <A HREF=\"Link\">link</A> for <A HREF=\"http://moo.com\">you</a>",
			new String[] {
				"Okay",
				"Cancyyyyyy",
				"Maybe"
			}, 1);
	messageBoxShell.setRemember("test2", false,
			MessageText.getString("MessageBoxWindow.nomoreprompting"));
	messageBoxShell.setAutoCloseInMS(15000);
	messageBoxShell.setParent(shell);
	messageBoxShell.setHtml("<b>Moo</b> goes the cow<p><hr>");
	messageBoxShell.open(new UserPrompterResultListener() {

		@Override
		public void prompterClosed(int returnVal) {
			System.out.println(returnVal);
		}
	});
	while (!shell.isDisposed()) {
		if (!display.isDisposed() && !display.readAndDispatch()) {
			display.sleep();
		}
	}
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:33,代码来源:MessageBoxShell.java

示例5: ConfigFormEx

ConfigFormEx(Display parentDisplay, Shell parent) {

		utils.initializeLogger();
		logger.info("Initialized logger.");

		Map<String, String> browserOptions = new HashMap<>();
		for (String browser : new ArrayList<String>(Arrays.asList(new String[] {
				"Chrome", "Firefox", "Internet Explorer", "Edge", "Safari" }))) {
			browserOptions.put(browser, "unused");
		}
		configOptions.put("Browser", browserOptions);
		// offer templates embedded in the application jar and
		// make rest up to customer
		configData.put("Template", "Core Selenium Java (embedded)");

		configOptions.put("Template", new HashMap<String, String>());
		templates = configOptions.get("Template");
		// Scan the template directory and build the hash of template name / path
		// options.
		TemplateCache templateCache = TemplateCache.getInstance();
		templateCache.fillEmbeddedTemplateCache();
		templates.putAll(TemplateCache.getCache());
		configOptions.replace("Template", templates);

		display = (parentDisplay != null) ? parentDisplay : new Display();
		// shell = new Shell(display);
		shell = new Shell(display, SWT.CENTER | SWT.SHELL_TRIM/* | ~SWT.RESIZE */);
		if (parent != null) {
			parentShell = parent;
		}
		// http://stackoverflow.com/questions/585534/what-is-the-best-way-to-find-the-users-home-directory-in-java
		String dirPath = null;
		dirPath = osName.startsWith("windows") ? OSUtils.getDesktopPath()
				: System.getProperty("user.home");

		utils.readData(
				parent != null ? parentShell.getData("CurrentConfig").toString()
						: "{ \"Browser\": \"Chrome\", "
								+ "\"Template\": \"Core Selenium Java (embedded)\", "
								+ String.format("\"Template Directory\": \"%s\", ",
										dirPath.replace("/", "\\").replace("\\", "\\\\"))
								+ "\"Template Path\": \"\"}",
				Optional.of(configData));
		if (configData.containsKey("Template Directory")) {
			dirPath = configData.get("Template Directory");
			if (dirPath != "") {
				templates = configOptions.get("Template");
				// Scan the template directory and build the options hash with template
				// name / absolute path
				templateCache.fillTemplateDirectoryCache(new File(dirPath),
						"user defined", templates);

				configOptions.replace("Template", templates);
			}
		}
	}
 
开发者ID:sergueik,项目名称:SWET,代码行数:56,代码来源:ConfigFormEx.java


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