本文整理汇总了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();
}
}
}
示例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();
}
}
}
示例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();
}
}
}
示例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();
}
}
}
示例5: Preferences
public Preferences(Shell parent) {
super(parent);
int style = SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL
| getDefaultOrientation();
style &= ~SWT.CLOSE;
setShellStyle(style);
}
示例6: FindReplaceDialog
public FindReplaceDialog(Shell parent, StyledText text) {
super(parent, SWT.DIALOG_TRIM);
this.text = text;
}
示例7: AboutDialog
public AboutDialog(Shell arg0) {
super(arg0, SWT.DIALOG_TRIM | SWT.RESIZE);
}
示例8: SkinnedDialog
public SkinnedDialog(String skinFile, String shellSkinObjectID) {
this(skinFile, shellSkinObjectID, SWT.DIALOG_TRIM | SWT.RESIZE);
}
示例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();
}
示例10: AboutDlg
public AboutDlg(Shell parentShell) {
super(parentShell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
parentShell.setText("О приложении");
}