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


Java SWT.DIALOG_TRIM属性代码示例

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


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

示例1: main

/**
 * Test
 *
 * @param args
 */
public static void main(String[] args) {
	final Display display = Display.getDefault();

	Shell shell = new Shell(display, SWT.DIALOG_TRIM);
	shell.setLayout(new FillLayout());
	Button btn = new Button(shell, SWT.PUSH);
	btn.addListener(SWT.Selection, new Listener() {
		@Override
		public void handleEvent(Event event) {
			test(display);
		}
	});
	shell.open();

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

示例2: main

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

	Composite c = new Composite(shell, SWT.BORDER);
	c.setLayout(new FillLayout());
	c.addPaintListener(new PaintListener() {
		@Override
		public void paintControl(PaintEvent e) {
			e.gc.drawLine(0, 0, 100, 50);
		}
	});

	Label lbl = new Label(c, SWT.NONE);
	lbl.setText("text");

	shell.open();

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

示例3: main

public static void main(String[] args) {
	Display display = new Display();
	Shell shell = new Shell(display, SWT.DIALOG_TRIM);
	shell.setSize(800, 600);

	new SimpleBrowserWindow(shell, "http://google.com", 0.8, 0.5, true, false);

	shell.open();

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

示例4: main

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

	new BrowserWindow(shell, "http://google.com", 500, 200, true, false);

	shell.pack();
	shell.open();

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

示例5: Preferences

public Preferences(Shell parent) {
    super(parent);
    int style = SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL
            | getDefaultOrientation();
    style &= ~SWT.CLOSE;

    setShellStyle(style);

}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:9,代码来源:Preferences.java

示例6: FindReplaceDialog

public FindReplaceDialog(Shell parent, StyledText text) {
	super(parent, SWT.DIALOG_TRIM);
	this.text = text;
}
 
开发者ID:juanerasmoe,项目名称:pmTrans,代码行数:4,代码来源:FindReplaceDialog.java

示例7: AboutDialog

public AboutDialog(Shell arg0) {
	super(arg0, SWT.DIALOG_TRIM | SWT.RESIZE);
}
 
开发者ID:juanerasmoe,项目名称:pmTrans,代码行数:3,代码来源:AboutDialog.java

示例8: SkinnedDialog

public SkinnedDialog(String skinFile, String shellSkinObjectID) {
	this(skinFile, shellSkinObjectID, SWT.DIALOG_TRIM | SWT.RESIZE);
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:3,代码来源:SkinnedDialog.java

示例9: _open

protected void _open(UserPrompterResultListener l) {
	if (l != null) {
 		synchronized (resultListeners) {
 			resultListeners.add(l);
 		}
	}
	dlg = new SkinnedDialog(dialogTempate, "shell", SWT.DIALOG_TRIM) {
		@Override
		protected void setSkin(SWTSkin skin) {
			super.setSkin(skin);

			//skin.DEBUGLAYOUT = true;

			VuzeMessageBox.this.skin = skin;
			synchronized (listRBs) {
				for (rbInfo rb : listRBs) {
					addResourceBundle(rb.cla, rb.path, rb.name);
				}
				listRBs.clear();
			}

		}
	};

	dlg.setTitle(title);
	dlg.addCloseListener(this);

	SWTSkinObjectText soTopTitle = (SWTSkinObjectText) skin.getSkinObject("top-title");
	if (soTopTitle != null) {
		soTopTitle.setText(subtitle == null ? title : subtitle);
	}

	SWTSkinObjectText soText = (SWTSkinObjectText) skin.getSkinObject("middle-title");
	if (soText != null) {
		soText.setText(text);
	}

	if (iconResource != null) {
 		SWTSkinObjectImage soTopLogo = (SWTSkinObjectImage) dlg.getSkin().getSkinObject("top-logo");
 		if (soTopLogo != null) {
 			soTopLogo.setImageByID(iconResource, null);
 		}
	}

	if (textIconResource != null) {
 		SWTSkinObjectImage soIcon = (SWTSkinObjectImage) dlg.getSkin().getSkinObject("text-icon");
 		if (soIcon != null) {
 			soIcon.setImageByID(textIconResource, null);
 		}
	}

	if (iconResource == null && textIconResource == null && soTopTitle != null && soText != null) {
		soTopTitle.setStyle(soText.getStyle() & ~(SWT.RIGHT | SWT.CENTER));
	}

	SWTSkinObjectContainer soBottomArea = (SWTSkinObjectContainer) skin.getSkinObject("bottom-area");
	if (soBottomArea != null) {
		if (buttonsArea.getButtonCount() == 0) {
			soBottomArea.setVisible(false);
		} else {
			buttonsArea.swt_createButtons(soBottomArea.getComposite());
		}
	}

	if (vuzeMessageBoxListener != null) {
		soExtra = (SWTSkinObjectContainer) skin.getSkinObject("middle-extra");
		try {
			vuzeMessageBoxListener.shellReady(dlg.getShell(), soExtra);
		} catch (Exception e) {
			Debug.out(e);
		}
	}

	if (closed) {
		return;
	}
	dlg.open();
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:78,代码来源:VuzeMessageBox.java

示例10: AboutDlg

public AboutDlg(Shell parentShell) {
    super(parentShell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
    parentShell.setText("О приложении");
}
 
开发者ID:technology16,项目名称:pgsqlblocks,代码行数:4,代码来源:AboutDlg.java


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