本文整理汇总了Java中org.eclipse.swt.SWT.ON_TOP属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.ON_TOP属性的具体用法?Java SWT.ON_TOP怎么用?Java SWT.ON_TOP使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.ON_TOP属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fixupStyle
static private int fixupStyle(int style) {
if ((style & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL)) != 0
&& Utils.anyShellHaveStyle(SWT.ON_TOP | SWT.TITLE)) {
UIFunctionsSWT uiFunctions = UIFunctionsManagerSWT.getUIFunctionsSWT();
if (uiFunctions != null && uiFunctions.getMainShell() != null) {
style |= SWT.ON_TOP;
}
}
return style;
}
示例2: createFakeToolTip
/**
* Create the Shell and Label for the fake tooltip showing URLs
*/
private void createFakeToolTip() {
fakeToolTip = new Shell(GUI.shell, SWT.ON_TOP);
fakeToolTip.setLayout(LayoutShop.createFillLayout(2, 2));
fakeToolTip.setForeground(GUI.display
.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
fakeToolTip.setBackground(GUI.display
.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
fakeToolTipLabel = new Label(fakeToolTip, SWT.NONE);
fakeToolTipLabel.setForeground(GUI.display
.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
fakeToolTipLabel.setBackground(GUI.display
.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
}
示例3: handleEvent
@Override
public void handleEvent(Event event) {
switch (event.type) {
case SWT.Dispose:
case SWT.KeyDown:
case SWT.MouseMove: {
if (tip == null)
break;
tip.dispose();
tip = null;
label = null;
break;
}
case SWT.MouseHover: {
TableItem item = table.getItem(new Point(event.x, event.y));
if (item != null) {
if (tip != null && !tip.isDisposed())
tip.dispose();
Shell shell = table.getShell();
Display display = table.getDisplay();
tip = new Shell(shell, SWT.ON_TOP | SWT.TOOL);
tip.setLayout(new FillLayout());
label = new Label(tip, SWT.NONE);
label.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
label.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
label.setData("_TABLEITEM", item);
label.setText("tooltip " + item.getText());
label.addListener(SWT.MouseExit, labelListener);
label.addListener(SWT.MouseDown, labelListener);
Point size = tip.computeSize(SWT.DEFAULT, SWT.DEFAULT);
Rectangle rect = item.getBounds(0);
Point pt = table.toDisplay(rect.x, rect.y);
tip.setBounds(pt.x, pt.y, size.x, size.y);
tip.setVisible(true);
}
}
break;
}
}
示例4: InfoPopup
public InfoPopup(Composite parent, String textToBeDisplayed) {
super(parent.getShell(), SWT.ON_TOP, true, false, false, false, false, null,
null);
content = textToBeDisplayed;
}
示例5: shell
protected static Composite shell(Composite parent) {
return new Shell(parent.getShell(), SWT.NO_TRIM | SWT.ON_TOP);
}
示例6: PopupShell
/**
* Constructs an ON_TOP popup
* @param display
*/
public PopupShell(Display display) {
this(display,SWT.ON_TOP);
}