本文整理汇总了Java中wei.mark.standout.ui.Window.onFocus方法的典型用法代码示例。如果您正苦于以下问题:Java Window.onFocus方法的具体用法?Java Window.onFocus怎么用?Java Window.onFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wei.mark.standout.ui.Window
的用法示例。
在下文中一共展示了Window.onFocus方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: focus
import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
* Request focus for the window corresponding to this id. A maximum of one
* window can have focus, and that window will receive all key events,
* including Back and Menu.
*
* @param id The id of the window.
* @return True if focus changed successfully, false if it failed.
*/
public final synchronized boolean focus(int id) {
try {
// check if that window is focusable
final Window window = getWindow(id);
if (window == null) {
throw new IllegalArgumentException("Tried to focus(" + id + ") a null window.");
}
if (!Utils.isSet(window.flags, StandOutFlags.FLAG_WINDOW_FOCUSABLE_DISABLE)) {
// remove focus from previously focused window
if (sFocusedWindow != null) {
unfocus(sFocusedWindow);
}
return window.onFocus(true);
}
} catch (Exception e) {
}
return false;
}
示例2: focus
import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
* Request focus for the window corresponding to this id. A maximum of one
* window can have focus, and that window will receive all key events,
* including Back and Menu.
*
* @param id
* The id of the window.
* @return True if focus changed successfully, false if it failed.
*/
public final synchronized boolean focus(int id) {
// check if that window is focusable
final Window window = getWindow(id);
if (window == null) {
throw new IllegalArgumentException("Tried to focus(" + id
+ ") a null window.");
}
if (!Utils.isSet(window.flags,
StandOutFlags.FLAG_WINDOW_FOCUSABLE_DISABLE)) {
// remove focus from previously focused window
if (sFocusedWindow != null) {
unfocus(sFocusedWindow);
}
return window.onFocus(true);
}
return false;
}
示例3: focus
import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
* Request focus for the window corresponding to this id. A maximum of one
* window can have focus, and that window will receive all key events,
* including Back and Menu.
*
* @param id
* The id of the window.
* @return True if focus changed successfully, false if it failed.
*/
public final synchronized boolean focus(int id) {
// check if that window is focusable
final Window window = getWindow(id);
if (window == null) {
return false;
}
if (!Utils.isSet(window.flags, StandOutFlags.FLAG_WINDOW_FOCUSABLE_DISABLE)) {
// remove focus from previously focused window
if (sFocusedWindow != null) {
unfocus(sFocusedWindow);
}
return window.onFocus(true);
}
return false;
}
示例4: focus
import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
* Request focus for the window corresponding to this id. A maximum of one
* window can have focus, and that window will receive all key events,
* including Back and Menu.
*
* @param id
* The id of the window.
* @return True if focus changed successfully, false if it failed.
*/
public final synchronized boolean focus(int id) {
try {
// check if that window is focusable
final Window window = getWindow(id);
if (window == null) {
throw new IllegalArgumentException("Tried to focus(" + id + ") a null window.");
}
if (!Utils.isSet(window.flags, StandOutFlags.FLAG_WINDOW_FOCUSABLE_DISABLE)) {
// remove focus from previously focused window
if (sFocusedWindow != null) {
unfocus(sFocusedWindow);
}
return window.onFocus(true);
}
} catch (Exception e) {
}
return false;
}
示例5: unfocus
import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
* Remove focus for the window, which could belong to another application.
* Since we don't allow windows from different applications to directly
* interact with each other, except for
* {@link #sendData(Context, Class, int, int, Bundle, Class, int)}, this
* method is private.
*
* @param window The window to unfocus.
* @return True if focus changed successfully, false if it failed.
*/
public synchronized boolean unfocus(Window window) {
if (window == null) {
throw new IllegalArgumentException("Tried to unfocus a null window.");
}
return window.onFocus(false);
}
示例6: unfocus
import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
* Remove focus for the window, which could belong to another application.
* Since we don't allow windows from different applications to directly
* interact with each other, except for
* {@link #sendData(Context, Class, int, int, Bundle, Class, int)}, this
* method is private.
*
* @param window
* The window to unfocus.
* @return True if focus changed successfully, false if it failed.
*/
public synchronized boolean unfocus(Window window) {
if (window == null) {
throw new IllegalArgumentException(
"Tried to unfocus a null window.");
}
return window.onFocus(false);
}
示例7: unfocus
import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
* Remove focus for the window, which could belong to another application.
* Since we don't allow windows from different applications to directly
* interact with each other, except for
* {@link #sendData(Context, Class, int, int, Bundle, Class, int)}, this
* method is private.
*
* @param window
* The window to unfocus.
* @return True if focus changed successfully, false if it failed.
*/
public synchronized boolean unfocus(Window window) {
if (window == null) {
throw new IllegalArgumentException("Tried to unfocus a null window.");
}
return window.onFocus(false);
}
示例8: unfocus
import wei.mark.standout.ui.Window; //导入方法依赖的package包/类
/**
* Remove focus for the window, which could belong to another application.
* Since we don't allow windows from different applications to directly
* interact with each other, except for
* {@link #sendData(android.content.Context, Class, int, int, android.os.Bundle, Class, int)}, this
* method is private.
*
* @param window
* The window to unfocus.
* @return True if focus changed successfully, false if it failed.
*/
public synchronized boolean unfocus(Window window) {
if (window == null) {
throw new IllegalArgumentException(
"Tried to unfocus a null window.");
}
return window.onFocus(false);
}