本文整理匯總了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);