本文整理了Java中org.eclipse.swt.widgets.Button.toDisplay()
方法的一些代码示例,展示了Button.toDisplay()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.toDisplay()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:toDisplay
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.tips.ui
private void showActionMenu() {
Rectangle rect = fMultiActionButton.getBounds();
Point pt = new Point(rect.x - 1, rect.y + rect.height);
pt = fMultiActionButton.toDisplay(pt);
fActionMenu.setLocation(pt.x, pt.y);
fActionMenu.setVisible(true);
}
代码示例来源:origin: stefanhaustein/flowgrid
@Override
public void widgetSelected(SelectionEvent e) {
Menu menu = new Menu(flowgrid.shell());
operationEditor.fillMenuImpl(menu);
menu.setLocation(moreButton.toDisplay(0, moreButton.getSize().y));
menu.setVisible(true);
}
代码示例来源:origin: org.xworker/xworker_swt
public void openMenu() {
//触发MenuDetect事件
Event event = new Event();
event.widget = this;
this.notifyListeners(SWT.MenuDetect, event);
Menu menu = getMenu();
if(menu == null || menu.isDisposed() || event.doit == false) {
event.doit = false;
return;
}
Button button = (Button) event.widget;
Rectangle rect = button.getBounds();
Point p = button.toDisplay(rect.x, rect.y + rect.height);
menu.setLocation(p.x-rect.x, p.y-rect.y);
menu.setVisible(true);
}
内容来源于网络,如有侵权,请联系作者删除!