當前位置: 首頁>>代碼示例>>Java>>正文


Java CefAppHandler類代碼示例

本文整理匯總了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();
            }
        }
    });
}
 
開發者ID:Panda-Programming-Language,項目名稱:Pandomium,代碼行數:18,代碼來源:CefApp.java

示例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();
      }
    }
  });
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:19,代碼來源:CefApp.java

示例3: N_Initialize

import org.cef.handler.CefAppHandler; //導入依賴的package包/類
private final native boolean N_Initialize(String pathToJavaDLL,
CefAppHandler appHandler, CefSettings settings);
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:3,代碼來源:CefApp.java

示例4: addAppHandler

import org.cef.handler.CefAppHandler; //導入依賴的package包/類
public static void addAppHandler(CefAppHandler appHandler) {
	appHandler_ = appHandler;
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:4,代碼來源:CefApp.java

示例5: N_Initialize

import org.cef.handler.CefAppHandler; //導入依賴的package包/類
private final native boolean N_Initialize(String pathToJavaDLL, 
CefAppHandler appHandler);
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:3,代碼來源:CefApp.java

示例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;
}
 
開發者ID:Panda-Programming-Language,項目名稱:Pandomium,代碼行數:18,代碼來源:CefApp.java

示例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;
}
 
開發者ID:viglucci,項目名稱:app-jcef-example,代碼行數:18,代碼來源:CefApp.java

示例8: N_Initialize

import org.cef.handler.CefAppHandler; //導入依賴的package包/類
private final native boolean N_Initialize(String pathToJavaDLL, CefAppHandler appHandler, CefSettings settings); 
開發者ID:Panda-Programming-Language,項目名稱:Pandomium,代碼行數:2,代碼來源:CefApp.java


注:本文中的org.cef.handler.CefAppHandler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。