本文整理了Java中org.eclipse.swt.browser.Browser.setFocus()
方法的一些代码示例,展示了Browser.setFocus()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Browser.setFocus()
方法的具体详情如下:
包路径:org.eclipse.swt.browser.Browser
类名称:Browser
方法名:setFocus
暂无
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void
setFocus()
{
browser.setFocus();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro
@Override
public void setFocus() {
browser.setFocus();
}
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
public void setFocus() {
if (browser != null)
browser.setFocus();
}
代码示例来源:origin: winterstein/Eclipse-Markdown-Editor-Plugin
/**
* Passing the focus request to the viewer's control.
*/
@Override
public void setFocus() {
if (viewer==null) return;
viewer.setFocus();
update();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
/**
* Grabs input focus
*/
public void focus() {
if (locationBar != null) locationBar.setFocus();
else if (browser != null) browser.setFocus();
else parent.setFocus();
}
代码示例来源:origin: openaudible/openaudible
/**
* Grabs input focus
*/
public void focus() {
if (locationBar != null)
locationBar.setFocus();
else if (browser != null)
browser.setFocus();
else
parent.setFocus();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
int /*long*/ gtk_event (int /*long*/ handle, int /*long*/ gdkEvent, int /*long*/ pointer) {
GdkEvent event = new GdkEvent ();
OS.memmove (event, gdkEvent, GdkEvent.sizeof);
if (event.type == OS.GDK_BUTTON_PRESS) {
if (!hasFocus) browser.setFocus ();
}
/*
* Stop the propagation of events that are not consumed by Mozilla, before
* they reach the parent embedder. These event have already been received.
*/
if (pointer == STOP_PROPOGATE) return 1;
return 0;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
long /*int*/ gtk_event (long /*int*/ handle, long /*int*/ gdkEvent, long /*int*/ pointer) {
GdkEvent event = new GdkEvent ();
OS.memmove (event, gdkEvent, GdkEvent.sizeof);
if (event.type == OS.GDK_BUTTON_PRESS) {
if (!hasFocus) browser.setFocus ();
}
/*
* Stop the propagation of events that are not consumed by Mozilla, before
* they reach the parent embedder. These event have already been received.
*/
if (pointer == STOP_PROPOGATE) return 1;
return 0;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
int /*long*/ gtk_event (int /*long*/ handle, int /*long*/ gdkEvent, int /*long*/ pointer) {
GdkEvent event = new GdkEvent ();
OS.memmove (event, gdkEvent, GdkEvent.sizeof);
if (event.type == OS.GDK_BUTTON_PRESS) {
if (!hasFocus) browser.setFocus ();
}
/*
* Stop the propagation of events that are not consumed by Mozilla, before
* they reach the parent embedder. These event have already been received.
*/
if (pointer == STOP_PROPOGATE) return 1;
return 0;
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
void handleFocus () {
if (hasFocus) return;
hasFocus = true;
((Mozilla)browser.webBrowser).Activate ();
browser.setFocus ();
listener = new Listener () {
public void handleEvent (Event event) {
if (event.widget == browser) return;
if (event.type != SWT.Dispose) {
((Mozilla)browser.webBrowser).Deactivate ();
hasFocus = false;
}
eventShell.getDisplay ().removeFilter (SWT.FocusIn, this);
eventShell.removeListener (SWT.Deactivate, this);
eventShell.removeListener (SWT.Dispose, this);
eventShell = null;
listener = null;
}
};
eventShell = browser.getShell ();
eventShell.getDisplay ().addFilter (SWT.FocusIn, listener);
eventShell.addListener (SWT.Deactivate, listener);
eventShell.addListener (SWT.Dispose, listener);
}
内容来源于网络,如有侵权,请联系作者删除!