当前位置: 首页>>代码示例>>Java>>正文


Java Window.onFocus方法代码示例

本文整理汇总了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;
}
 
开发者ID:tuyendt6,项目名称:WindowsNoteMaster,代码行数:30,代码来源:StandOutWindow.java

示例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;
}
 
开发者ID:fatangare,项目名称:LogcatViewer,代码行数:30,代码来源:StandOutWindow.java

示例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;
}
 
开发者ID:MohammadAdib,项目名称:Roundr,代码行数:28,代码来源:StandOutWindow.java

示例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;
}
 
开发者ID:tmatz,项目名称:FloatingStickies-custom,代码行数:31,代码来源:StandOutWindow.java

示例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);
}
 
开发者ID:tuyendt6,项目名称:WindowsNoteMaster,代码行数:17,代码来源:StandOutWindow.java

示例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);
}
 
开发者ID:fatangare,项目名称:LogcatViewer,代码行数:19,代码来源:StandOutWindow.java

示例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);
}
 
开发者ID:MohammadAdib,项目名称:Roundr,代码行数:18,代码来源:StandOutWindow.java

示例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);
}
 
开发者ID:sakchhams,项目名称:widgets,代码行数:19,代码来源:StandOutWindow.java


注:本文中的wei.mark.standout.ui.Window.onFocus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。