當前位置: 首頁>>代碼示例>>Java>>正文


Java SWT.ON_TOP屬性代碼示例

本文整理匯總了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;
}
 
開發者ID:BiglySoftware,項目名稱:BiglyBT,代碼行數:10,代碼來源:ShellFactory.java

示例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));
}
 
開發者ID:openaudible,項目名稱:openaudible,代碼行數:16,代碼來源:FakeToolTip.java

示例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;
    }
}
 
開發者ID:openaudible,項目名稱:openaudible,代碼行數:39,代碼來源:SuperTable.java

示例4: InfoPopup

public InfoPopup(Composite parent, String textToBeDisplayed) {
	super(parent.getShell(), SWT.ON_TOP, true, false, false, false, false, null,
			null);
	content = textToBeDisplayed;
}
 
開發者ID:sergueik,項目名稱:SWET,代碼行數:5,代碼來源:InfoPopup.java

示例5: shell

protected static Composite shell(Composite parent) {
	return new Shell(parent.getShell(), SWT.NO_TRIM | SWT.ON_TOP);
}
 
開發者ID:nextopcn,項目名稱:xcalendar,代碼行數:3,代碼來源:XCalendar.java

示例6: PopupShell

/**
 * Constructs an ON_TOP popup
 * @param display
 */
public PopupShell(Display display) {
  this(display,SWT.ON_TOP);
}
 
開發者ID:BiglySoftware,項目名稱:BiglyBT,代碼行數:7,代碼來源:PopupShell.java


注:本文中的org.eclipse.swt.SWT.ON_TOP屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。