本文整理了Java中org.eclipse.swt.widgets.Shell.moveAbove()
方法的一些代码示例,展示了Shell.moveAbove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.moveAbove()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:moveAbove
暂无
代码示例来源:origin: BiglySoftware/BiglyBT
protected void
showPanel()
{
manually_hidden = false;
if ( !shell_opened ){
shell_opened = true;
shell.open();
}
if ( !shell.isVisible()){
shell.setVisible(true);
}
shell.moveAbove(null);
}
代码示例来源:origin: org.xworker/xworker_swt
public static void html_edit_content1(ActionContext actionContext){
String path = (String) actionContext.get("path");
ActionContainer actions = (ActionContainer) actionContext.get("actions");
//取编辑器内容的值
String content = path;
String[] sizes = content.split(":");
int width = Integer.parseInt(sizes[1]) + 20;
if(width > 420){
width = 420;
}
ActionContext ac = actions.getActionContext();
Shell shell = (Shell) ac.get("shell");
shell.setSize(420, Integer.parseInt(sizes[0]) + 3);
//设置位置,避免和鼠标重叠以及避免显示在屏幕之外
SwtUtils.setShellRelateLocation(shell, shell.getDisplay().getCursorLocation(), new Point(20,20));
//显示在最上层,可能是swt的bug,某个版本之后它会再主窗体之后从而显示不出来了,问题可能已经结局:2013-07-10
shell.moveAbove(shell.getParent());
shell.setVisible(true);
//shell.setActive();
//shell.open();
//shell.forceActive();
//browser.setFocus();
//browser.setData("query", content);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
shell.moveAbove(null);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
shell.moveAbove(null);
代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt
public void handleEvent(Event event) {
// Ensure that this event is for a MApplication
if (!(event.getProperty(UIEvents.EventTags.ELEMENT) instanceof MApplication))
return;
MWindow win = (MWindow) event
.getProperty(UIEvents.EventTags.NEW_VALUE);
if ((win == null) || !win.getTags().contains("topLevel")) //$NON-NLS-1$
return;
win.setToBeRendered(true);
if (!(win.getRenderer() == WBWRenderer.this))
return;
Shell shell = (Shell) win.getWidget();
if (shell.getMinimized()) {
shell.setMinimized(false);
}
shell.setActive();
shell.moveAbove(null);
}
};
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt
@Inject
@Optional
private void subscribeTopicSelectedElementChanged(
@UIEventTopic(UIEvents.ElementContainer.TOPIC_SELECTEDELEMENT) Event event) {
// Ensure that this event is for a MApplication
if (!(event.getProperty(UIEvents.EventTags.ELEMENT) instanceof MApplication)) {
return;
}
MWindow win = (MWindow) event.getProperty(UIEvents.EventTags.NEW_VALUE);
if ((win == null) || !win.getTags().contains("topLevel")) { //$NON-NLS-1$
return;
}
win.setToBeRendered(true);
if (!(win.getRenderer() == WBWRenderer.this)) {
return;
}
Shell shell = (Shell) win.getWidget();
if (shell.getMinimized()) {
shell.setMinimized(false);
}
shell.setActive();
shell.moveAbove(null);
}
代码示例来源:origin: stackoverflow.com
private static void bringupDialog(WindowState state) {
final Shell workbenchShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
//bring up the application to front
workbenchShell.setVisible( true );
workbenchShell.setMinimized( false );
workbenchShell.redraw();
//focus on dialog
workbenchShell.setActive();
workbenchShell.forceActive();
workbenchShell.setFocus();
workbenchShell.forceFocus();
workbenchShell.moveAbove( null );
workbenchShell.redraw();
Shell shell = instance.getShell(); // desired window shell
shell.setActive();
shell.forceActive();
shell.setFocus();
shell.forceFocus();
shell.moveAbove( null );
shell.redraw();
}
代码示例来源:origin: BiglySoftware/BiglyBT
shell.moveAbove( null );
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
windowShell.moveAbove(null);
}));
mi.setSelection(window == workbenchWindow);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
private void activate() {
if (editorRef != null) {
IEditorPart editor = editorRef.getEditor(true);
WorkbenchPage p = (WorkbenchPage) editor.getEditorSite()
.getPage();
Shell s = p.getWorkbenchWindow().getShell();
if (s.getMinimized()) {
s.setMinimized(false);
}
s.moveAbove(null);
p.getWorkbenchWindow().setActivePage(p);
p.activate(editor);
} else {
IWorkbenchPage p = window.getActivePage();
if (p != null) {
try {
p.openEditor(input, desc.getId(), true);
} catch (PartInitException e) {
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!