本文整理汇总了Java中org.cef.handler.CefAppHandler类的典型用法代码示例。如果您正苦于以下问题:Java CefAppHandler类的具体用法?Java CefAppHandler怎么用?Java CefAppHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CefAppHandler类属于org.cef.handler包,在下文中一共展示了CefAppHandler类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleBeforeTerminate
import org.cef.handler.CefAppHandler; //导入依赖的package包/类
/**
* This method is invoked by the native code (currently on Mac only) in case
* of a termination event (e.g. someone pressed CMD+Q).
*/
protected final void handleBeforeTerminate() {
// Execute on the AWT event dispatching thread. Always call asynchronously
// so the call stack has a chance to unwind.
cefThreadBridge.invokeLater(new Runnable() {
@Override
public void run() {
CefAppHandler handler = (CefAppHandler) ((appHandler == null) ? this : appHandler);
if (!handler.onBeforeTerminate()) {
dispose();
}
}
});
}
示例2: handleBeforeTerminate
import org.cef.handler.CefAppHandler; //导入依赖的package包/类
/**
* This method is invoked by the native code (currently on Mac only) in case
* of a termination event (e.g. someone pressed CMD+Q). The native
* termination process is interrupted until CefApp calls continueTerminate().
*/
final protected void handleBeforeTerminate() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
CefAppHandler handler =
(CefAppHandler) ((appHandler_ == null) ? this : appHandler_);
if (!handler.onBeforeTerminate()) {
executeDefaultShutdown_ = true;
dispose();
}
}
});
}
示例3: N_Initialize
import org.cef.handler.CefAppHandler; //导入依赖的package包/类
private final native boolean N_Initialize(String pathToJavaDLL,
CefAppHandler appHandler, CefSettings settings);
示例4: addAppHandler
import org.cef.handler.CefAppHandler; //导入依赖的package包/类
public static void addAppHandler(CefAppHandler appHandler) {
appHandler_ = appHandler;
}
示例5: N_Initialize
import org.cef.handler.CefAppHandler; //导入依赖的package包/类
private final native boolean N_Initialize(String pathToJavaDLL,
CefAppHandler appHandler);
示例6: addAppHandler
import org.cef.handler.CefAppHandler; //导入依赖的package包/类
/**
* Assign an AppHandler to CefApp. The AppHandler can be used to evaluate
* application arguments, to register your own schemes and to hook into the
* shutdown sequence. See CefAppHandler for more details.
* <p>
* This method must be called before CefApp is initialized. CefApp will be
* initialized automatically if you call createClient() the first time.
*
* @param appHandler An instance of CefAppHandler.
* @throws IllegalStateException in case of CefApp is already initialized
*/
public static void addAppHandler(CefAppHandler appHandler) throws IllegalStateException {
if (getState().compareTo(CefAppState.NEW) > 0) {
throw new IllegalStateException("Must be called before CefApp is initialized");
}
CefApp.appHandler = appHandler;
}
示例7: addAppHandler
import org.cef.handler.CefAppHandler; //导入依赖的package包/类
/**
* Assign an AppHandler to CefApp. The AppHandler can be used to evaluate
* application arguments, to register your own schemes and to hook into the
* shutdown sequence. See CefAppHandler for more details.
*
* This method must be called before CefApp is initialized. CefApp will be
* initialized automatically if you call createClient() the first time.
* @param appHandler An instance of CefAppHandler.
*
* @throws IllegalStateException in case of CefApp is already initialized
*/
public static void addAppHandler(CefAppHandler appHandler)
throws IllegalStateException {
if (getState().compareTo(CefAppState.NEW) > 0)
throw new IllegalStateException("Must be called before CefApp is initialized");
appHandler_ = appHandler;
}
示例8: N_Initialize
import org.cef.handler.CefAppHandler; //导入依赖的package包/类
private final native boolean N_Initialize(String pathToJavaDLL, CefAppHandler appHandler, CefSettings settings);