Java 类java.awt.desktop.PreferencesHandler 实例源码

项目:openjdk-jdk10    文件:_AppEventHandler.java   
synchronized void setHandler(final PreferencesHandler handler) {
    super.setHandler(handler);

    _AppMenuBarHandler.getInstance().setPreferencesMenuItemVisible(handler != null);
    _AppMenuBarHandler.getInstance().setPreferencesMenuItemEnabled(handler != null);
}
项目:openjdk-jdk10    文件:_AppEventHandler.java   
void performUsing(final PreferencesHandler handler, final _NativeEvent event) {
    handler.handlePreferences(new PreferencesEvent());
}
项目:openjdk9    文件:_AppEventHandler.java   
synchronized void setHandler(final PreferencesHandler handler) {
    super.setHandler(handler);

    _AppMenuBarHandler.getInstance().setPreferencesMenuItemVisible(handler != null);
    _AppMenuBarHandler.getInstance().setPreferencesMenuItemEnabled(handler != null);
}
项目:openjdk9    文件:_AppEventHandler.java   
void performUsing(final PreferencesHandler handler, final _NativeEvent event) {
    handler.handlePreferences(new PreferencesEvent());
}
项目:openjdk-jdk10    文件:Desktop.java   
/**
 * Installs a handler to show a custom Preferences window for your
 * application.
 * <p>
 * Setting the {@link PreferencesHandler} to {@code null} reverts it to
 * the default behavior
 *
 * @param preferencesHandler the handler to respond to the
 * {@link PreferencesHandler#handlePreferences(PreferencesEvent)}
 *
 * @throws SecurityException if a security manager exists and it
 * denies the
 * {@code RuntimePermission("canProcessApplicationEvents")} permission
 * @throws UnsupportedOperationException if the current platform
 * does not support the {@link Desktop.Action#APP_PREFERENCES} action
 * @since 9
 */
public void setPreferencesHandler(final PreferencesHandler preferencesHandler) {
    checkEventsProcessingPermission();
    checkActionSupport(Action.APP_PREFERENCES);
    peer.setPreferencesHandler(preferencesHandler);
}
项目:openjdk-jdk10    文件:DesktopPeer.java   
/**
 * Installs a handler to show a custom Preferences window for your
 * application.
 * <p>
 * Setting the {@link PreferencesHandler} to {@code null} reverts it to
 * the default behavior
 *
 * @param preferencesHandler the handler to respond to the
 * {@link java.awt.desktop.PreferencesHandler#handlePreferences(PreferencesEvent) }
 */
default void setPreferencesHandler(final PreferencesHandler preferencesHandler) {
}
项目:openjdk-jdk10    文件:Application.java   
/**
 * Installs a handler to create the Preferences menu item in your application's app menu.
 *
 * Setting the {@link PreferencesHandler} to {@code null} will remove the Preferences item from the app menu.
 *
 * @param preferencesHandler
 * @since Java for Mac OS X 10.6 Update 3
 * @since Java for Mac OS X 10.5 Update 8
 */
public void setPreferencesHandler(final PreferencesHandler preferencesHandler) {
    eventHandler.preferencesDispatcher.setHandler(preferencesHandler);
}
项目:openjdk9    文件:Desktop.java   
/**
 * Installs a handler to show a custom Preferences window for your
 * application.
 * <p>
 * Setting the {@link PreferencesHandler} to {@code null} reverts it to
 * the default behavior
 *
 * @param preferencesHandler the handler to respond to the
 * {@link PreferencesHandler#handlePreferences(PreferencesEvent)}
 *
 * @throws SecurityException if a security manager exists and it
 * denies the
 * {@code AWTPermission("showWindowWithoutWarningBanner")}
 * permission
 * @throws UnsupportedOperationException if the current platform
 * does not support the {@link Desktop.Action#APP_PREFERENCES} action
 * @since 9
 */
public void setPreferencesHandler(final PreferencesHandler preferencesHandler) {
    checkAWTPermission();
    checkActionSupport(Action.APP_PREFERENCES);
    peer.setPreferencesHandler(preferencesHandler);
}
项目:openjdk9    文件:DesktopPeer.java   
/**
 * Installs a handler to show a custom Preferences window for your
 * application.
 * <p>
 * Setting the {@link PreferencesHandler} to {@code null} reverts it to
 * the default behavior
 *
 * @param preferencesHandler the handler to respond to the
 * {@link java.awt.desktop.PreferencesHandler#handlePreferences(java.awt.PreferencesEvent) }
 */
default void setPreferencesHandler(final PreferencesHandler preferencesHandler) {
}