Class PreferenceDialog

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, GridBagConstants

    public class PreferenceDialog
    extends javax.swing.JDialog
    implements GridBagConstants
    Dialog that displays user preferences.
    See Also:
    Serialized Form
    • Field Detail

      • OK_OPTION

        public static final int OK_OPTION
        The return value if 'OK' is chosen.
        See Also:
        Constant Field Values
      • CANCEL_OPTION

        public static final int CANCEL_OPTION
        The return value if 'Cancel' is chosen.
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_TITLE_PREFIX

        public static final java.lang.String PREFERENCE_KEY_TITLE_PREFIX
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_TITLE_DIALOG

        public static final java.lang.String PREFERENCE_KEY_TITLE_DIALOG
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_RENDERING_OPTIONS

        public static final java.lang.String PREFERENCE_KEY_LABEL_RENDERING_OPTIONS
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ANIMATION_RATE_LIMITING

        public static final java.lang.String PREFERENCE_KEY_LABEL_ANIMATION_RATE_LIMITING
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_OTHER_OPTIONS

        public static final java.lang.String PREFERENCE_KEY_LABEL_OTHER_OPTIONS
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ENABLE_DOUBLE_BUFFERING

        public static final java.lang.String PREFERENCE_KEY_LABEL_ENABLE_DOUBLE_BUFFERING
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_SHOW_RENDERING

        public static final java.lang.String PREFERENCE_KEY_LABEL_SHOW_RENDERING
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_AUTO_ADJUST_WINDOW

        public static final java.lang.String PREFERENCE_KEY_LABEL_AUTO_ADJUST_WINDOW
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_SELECTION_XOR_MODE

        public static final java.lang.String PREFERENCE_KEY_LABEL_SELECTION_XOR_MODE
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_CPU

        public static final java.lang.String PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_CPU
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_PERCENT

        public static final java.lang.String PREFERENCE_KEY_LABEL_PERCENT
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_FPS

        public static final java.lang.String PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_FPS
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_FPS

        public static final java.lang.String PREFERENCE_KEY_LABEL_FPS
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_UNLIMITED

        public static final java.lang.String PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_UNLIMITED
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_SHOW_DEBUG_TRACE

        public static final java.lang.String PREFERENCE_KEY_LABEL_SHOW_DEBUG_TRACE
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_IS_XML_PARSER_VALIDATING

        public static final java.lang.String PREFERENCE_KEY_LABEL_IS_XML_PARSER_VALIDATING
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_GRANT_SCRIPTS_ACCESS_TO

        public static final java.lang.String PREFERENCE_KEY_LABEL_GRANT_SCRIPTS_ACCESS_TO
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_LOAD_SCRIPTS

        public static final java.lang.String PREFERENCE_KEY_LABEL_LOAD_SCRIPTS
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ALLOWED_SCRIPT_ORIGIN

        public static final java.lang.String PREFERENCE_KEY_LABEL_ALLOWED_SCRIPT_ORIGIN
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ALLOWED_RESOURCE_ORIGIN

        public static final java.lang.String PREFERENCE_KEY_LABEL_ALLOWED_RESOURCE_ORIGIN
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ENFORCE_SECURE_SCRIPTING

        public static final java.lang.String PREFERENCE_KEY_LABEL_ENFORCE_SECURE_SCRIPTING
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_FILE_SYSTEM

        public static final java.lang.String PREFERENCE_KEY_LABEL_FILE_SYSTEM
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ALL_NETWORK

        public static final java.lang.String PREFERENCE_KEY_LABEL_ALL_NETWORK
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_JAVA_JAR_FILES

        public static final java.lang.String PREFERENCE_KEY_LABEL_JAVA_JAR_FILES
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ECMASCRIPT

        public static final java.lang.String PREFERENCE_KEY_LABEL_ECMASCRIPT
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ORIGIN_ANY

        public static final java.lang.String PREFERENCE_KEY_LABEL_ORIGIN_ANY
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ORIGIN_DOCUMENT

        public static final java.lang.String PREFERENCE_KEY_LABEL_ORIGIN_DOCUMENT
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ORIGIN_EMBEDDED

        public static final java.lang.String PREFERENCE_KEY_LABEL_ORIGIN_EMBEDDED
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ORIGIN_NONE

        public static final java.lang.String PREFERENCE_KEY_LABEL_ORIGIN_NONE
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_USER_STYLESHEET

        public static final java.lang.String PREFERENCE_KEY_LABEL_USER_STYLESHEET
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_CSS_MEDIA_TYPES

        public static final java.lang.String PREFERENCE_KEY_LABEL_CSS_MEDIA_TYPES
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ENABLE_USER_STYLESHEET

        public static final java.lang.String PREFERENCE_KEY_LABEL_ENABLE_USER_STYLESHEET
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_BROWSE

        public static final java.lang.String PREFERENCE_KEY_LABEL_BROWSE
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_ADD

        public static final java.lang.String PREFERENCE_KEY_LABEL_ADD
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_REMOVE

        public static final java.lang.String PREFERENCE_KEY_LABEL_REMOVE
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_CLEAR

        public static final java.lang.String PREFERENCE_KEY_LABEL_CLEAR
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_HTTP_PROXY

        public static final java.lang.String PREFERENCE_KEY_LABEL_HTTP_PROXY
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_HOST

        public static final java.lang.String PREFERENCE_KEY_LABEL_HOST
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_PORT

        public static final java.lang.String PREFERENCE_KEY_LABEL_PORT
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LABEL_COLON

        public static final java.lang.String PREFERENCE_KEY_LABEL_COLON
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_BROWSE_TITLE

        public static final java.lang.String PREFERENCE_KEY_BROWSE_TITLE
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LANGUAGES

        public static final java.lang.String PREFERENCE_KEY_LANGUAGES
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_IS_XML_PARSER_VALIDATING

        public static final java.lang.String PREFERENCE_KEY_IS_XML_PARSER_VALIDATING
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_USER_STYLESHEET

        public static final java.lang.String PREFERENCE_KEY_USER_STYLESHEET
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_USER_STYLESHEET_ENABLED

        public static final java.lang.String PREFERENCE_KEY_USER_STYLESHEET_ENABLED
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_SHOW_RENDERING

        public static final java.lang.String PREFERENCE_KEY_SHOW_RENDERING
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_AUTO_ADJUST_WINDOW

        public static final java.lang.String PREFERENCE_KEY_AUTO_ADJUST_WINDOW
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_ENABLE_DOUBLE_BUFFERING

        public static final java.lang.String PREFERENCE_KEY_ENABLE_DOUBLE_BUFFERING
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_SHOW_DEBUG_TRACE

        public static final java.lang.String PREFERENCE_KEY_SHOW_DEBUG_TRACE
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_SELECTION_XOR_MODE

        public static final java.lang.String PREFERENCE_KEY_SELECTION_XOR_MODE
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_PROXY_HOST

        public static final java.lang.String PREFERENCE_KEY_PROXY_HOST
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_CSS_MEDIA

        public static final java.lang.String PREFERENCE_KEY_CSS_MEDIA
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_DEFAULT_FONT_FAMILY

        public static final java.lang.String PREFERENCE_KEY_DEFAULT_FONT_FAMILY
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_PROXY_PORT

        public static final java.lang.String PREFERENCE_KEY_PROXY_PORT
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_ENFORCE_SECURE_SCRIPTING

        public static final java.lang.String PREFERENCE_KEY_ENFORCE_SECURE_SCRIPTING
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_GRANT_SCRIPT_FILE_ACCESS

        public static final java.lang.String PREFERENCE_KEY_GRANT_SCRIPT_FILE_ACCESS
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_GRANT_SCRIPT_NETWORK_ACCESS

        public static final java.lang.String PREFERENCE_KEY_GRANT_SCRIPT_NETWORK_ACCESS
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LOAD_ECMASCRIPT

        public static final java.lang.String PREFERENCE_KEY_LOAD_ECMASCRIPT
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_LOAD_JAVA

        public static final java.lang.String PREFERENCE_KEY_LOAD_JAVA
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_ALLOWED_SCRIPT_ORIGIN

        public static final java.lang.String PREFERENCE_KEY_ALLOWED_SCRIPT_ORIGIN
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_ALLOWED_EXTERNAL_RESOURCE_ORIGIN

        public static final java.lang.String PREFERENCE_KEY_ALLOWED_EXTERNAL_RESOURCE_ORIGIN
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_ANIMATION_RATE_LIMITING_MODE

        public static final java.lang.String PREFERENCE_KEY_ANIMATION_RATE_LIMITING_MODE
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_ANIMATION_RATE_LIMITING_CPU

        public static final java.lang.String PREFERENCE_KEY_ANIMATION_RATE_LIMITING_CPU
        See Also:
        Constant Field Values
      • PREFERENCE_KEY_ANIMATION_RATE_LIMITING_FPS

        public static final java.lang.String PREFERENCE_KEY_ANIMATION_RATE_LIMITING_FPS
        See Also:
        Constant Field Values
      • model

        protected PreferenceManager model
        PreferenceManager used to store and retrieve preferences
      • userStylesheetEnabled

        protected javax.swing.JCheckBox userStylesheetEnabled
      • userStylesheetLabel

        protected javax.swing.JLabel userStylesheetLabel
      • userStylesheet

        protected javax.swing.JTextField userStylesheet
      • userStylesheetBrowse

        protected javax.swing.JButton userStylesheetBrowse
      • showRendering

        protected javax.swing.JCheckBox showRendering
      • autoAdjustWindow

        protected javax.swing.JCheckBox autoAdjustWindow
      • enableDoubleBuffering

        protected javax.swing.JCheckBox enableDoubleBuffering
      • showDebugTrace

        protected javax.swing.JCheckBox showDebugTrace
      • selectionXorMode

        protected javax.swing.JCheckBox selectionXorMode
      • isXMLParserValidating

        protected javax.swing.JCheckBox isXMLParserValidating
      • animationLimitUnlimited

        protected javax.swing.JRadioButton animationLimitUnlimited
      • animationLimitCPU

        protected javax.swing.JRadioButton animationLimitCPU
      • animationLimitFPS

        protected javax.swing.JRadioButton animationLimitFPS
      • animationLimitCPULabel

        protected javax.swing.JLabel animationLimitCPULabel
      • animationLimitFPSLabel

        protected javax.swing.JLabel animationLimitFPSLabel
      • animationLimitCPUAmount

        protected javax.swing.JTextField animationLimitCPUAmount
      • animationLimitFPSAmount

        protected javax.swing.JTextField animationLimitFPSAmount
      • enforceSecureScripting

        protected javax.swing.JCheckBox enforceSecureScripting
      • grantScriptFileAccess

        protected javax.swing.JCheckBox grantScriptFileAccess
      • grantScriptNetworkAccess

        protected javax.swing.JCheckBox grantScriptNetworkAccess
      • loadJava

        protected javax.swing.JCheckBox loadJava
      • loadEcmascript

        protected javax.swing.JCheckBox loadEcmascript
      • allowedScriptOrigin

        protected javax.swing.JComboBox allowedScriptOrigin
      • allowedResourceOrigin

        protected javax.swing.JComboBox allowedResourceOrigin
      • mediaList

        protected javax.swing.JList mediaList
      • mediaListRemoveButton

        protected javax.swing.JButton mediaListRemoveButton
      • mediaListClearButton

        protected javax.swing.JButton mediaListClearButton
      • host

        protected javax.swing.JTextField host
      • port

        protected javax.swing.JTextField port
      • mediaListModel

        protected javax.swing.DefaultListModel mediaListModel
      • returnCode

        protected int returnCode
        Code indicating whether the dialog was okayed or cancelled.
    • Constructor Detail

      • PreferenceDialog

        public PreferenceDialog​(java.awt.Frame owner,
                                PreferenceManager model)
        Creates a new PreferenceDialog with the given model.
    • Method Detail

      • isMetalSteel

        protected static boolean isMetalSteel()
        Returns whether the current LAF is Metal Steel.
      • getPreferenceManager

        public PreferenceManager getPreferenceManager()
        Returns the preference manager used by this dialog.
      • initializeGUI

        protected void initializeGUI()
        Initializes the GUI components with the values from the model.
      • savePreferences

        protected void savePreferences()
        Stores the current settings in the PreferenceManager model.
      • buildGUI

        protected void buildGUI()
        Builds the UI for this dialog.
      • addConfigPanel

        protected void addConfigPanel​(java.lang.String id,
                                      javax.swing.JPanel c)
        Adds a panel to the configuration panel.
      • buildButtonsPanel

        protected javax.swing.JPanel buildButtonsPanel()
        Creates the OK/Cancel button panel.
      • buildGeneralPanel

        protected javax.swing.JPanel buildGeneralPanel()
        Builds the General panel.
      • buildSecurityPanel

        protected javax.swing.JPanel buildSecurityPanel()
        Builds the Security panel.
      • buildLanguagePanel

        protected javax.swing.JPanel buildLanguagePanel()
        Builds the Language panel.
      • buildStylesheetPanel

        protected javax.swing.JPanel buildStylesheetPanel()
        Builds the Stylesheet panel.
      • updateMediaListButtons

        protected void updateMediaListButtons()
        Updates the disabled state of the buttons next to the media type list.
      • buildNetworkPanel

        protected javax.swing.JPanel buildNetworkPanel()
        Builds the Network panel.
      • showDialog

        public int showDialog()
        Shows the dialog.