Class PreferenceDialog

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, GridBagConstants

public class PreferenceDialog extends JDialog implements GridBagConstants
Dialog that displays user preferences.
See Also:
  • Field Details

    • OK_OPTION

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

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

      public static final String PREFERENCE_KEY_TITLE_PREFIX
      See Also:
    • PREFERENCE_KEY_TITLE_DIALOG

      public static final String PREFERENCE_KEY_TITLE_DIALOG
      See Also:
    • PREFERENCE_KEY_LABEL_RENDERING_OPTIONS

      public static final String PREFERENCE_KEY_LABEL_RENDERING_OPTIONS
      See Also:
    • PREFERENCE_KEY_LABEL_ANIMATION_RATE_LIMITING

      public static final String PREFERENCE_KEY_LABEL_ANIMATION_RATE_LIMITING
      See Also:
    • PREFERENCE_KEY_LABEL_OTHER_OPTIONS

      public static final String PREFERENCE_KEY_LABEL_OTHER_OPTIONS
      See Also:
    • PREFERENCE_KEY_LABEL_ENABLE_DOUBLE_BUFFERING

      public static final String PREFERENCE_KEY_LABEL_ENABLE_DOUBLE_BUFFERING
      See Also:
    • PREFERENCE_KEY_LABEL_SHOW_RENDERING

      public static final String PREFERENCE_KEY_LABEL_SHOW_RENDERING
      See Also:
    • PREFERENCE_KEY_LABEL_AUTO_ADJUST_WINDOW

      public static final String PREFERENCE_KEY_LABEL_AUTO_ADJUST_WINDOW
      See Also:
    • PREFERENCE_KEY_LABEL_SELECTION_XOR_MODE

      public static final String PREFERENCE_KEY_LABEL_SELECTION_XOR_MODE
      See Also:
    • PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_CPU

      public static final String PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_CPU
      See Also:
    • PREFERENCE_KEY_LABEL_PERCENT

      public static final String PREFERENCE_KEY_LABEL_PERCENT
      See Also:
    • PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_FPS

      public static final String PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_FPS
      See Also:
    • PREFERENCE_KEY_LABEL_FPS

      public static final String PREFERENCE_KEY_LABEL_FPS
      See Also:
    • PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_UNLIMITED

      public static final String PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_UNLIMITED
      See Also:
    • PREFERENCE_KEY_LABEL_SHOW_DEBUG_TRACE

      public static final String PREFERENCE_KEY_LABEL_SHOW_DEBUG_TRACE
      See Also:
    • PREFERENCE_KEY_LABEL_IS_XML_PARSER_VALIDATING

      public static final String PREFERENCE_KEY_LABEL_IS_XML_PARSER_VALIDATING
      See Also:
    • PREFERENCE_KEY_LABEL_GRANT_SCRIPTS_ACCESS_TO

      public static final String PREFERENCE_KEY_LABEL_GRANT_SCRIPTS_ACCESS_TO
      See Also:
    • PREFERENCE_KEY_LABEL_LOAD_SCRIPTS

      public static final String PREFERENCE_KEY_LABEL_LOAD_SCRIPTS
      See Also:
    • PREFERENCE_KEY_LABEL_ALLOWED_SCRIPT_ORIGIN

      public static final String PREFERENCE_KEY_LABEL_ALLOWED_SCRIPT_ORIGIN
      See Also:
    • PREFERENCE_KEY_LABEL_ALLOWED_RESOURCE_ORIGIN

      public static final String PREFERENCE_KEY_LABEL_ALLOWED_RESOURCE_ORIGIN
      See Also:
    • PREFERENCE_KEY_LABEL_ENFORCE_SECURE_SCRIPTING

      public static final String PREFERENCE_KEY_LABEL_ENFORCE_SECURE_SCRIPTING
      See Also:
    • PREFERENCE_KEY_LABEL_FILE_SYSTEM

      public static final String PREFERENCE_KEY_LABEL_FILE_SYSTEM
      See Also:
    • PREFERENCE_KEY_LABEL_ALL_NETWORK

      public static final String PREFERENCE_KEY_LABEL_ALL_NETWORK
      See Also:
    • PREFERENCE_KEY_LABEL_JAVA_JAR_FILES

      public static final String PREFERENCE_KEY_LABEL_JAVA_JAR_FILES
      See Also:
    • PREFERENCE_KEY_LABEL_ECMASCRIPT

      public static final String PREFERENCE_KEY_LABEL_ECMASCRIPT
      See Also:
    • PREFERENCE_KEY_LABEL_ORIGIN_ANY

      public static final String PREFERENCE_KEY_LABEL_ORIGIN_ANY
      See Also:
    • PREFERENCE_KEY_LABEL_ORIGIN_DOCUMENT

      public static final String PREFERENCE_KEY_LABEL_ORIGIN_DOCUMENT
      See Also:
    • PREFERENCE_KEY_LABEL_ORIGIN_EMBEDDED

      public static final String PREFERENCE_KEY_LABEL_ORIGIN_EMBEDDED
      See Also:
    • PREFERENCE_KEY_LABEL_ORIGIN_NONE

      public static final String PREFERENCE_KEY_LABEL_ORIGIN_NONE
      See Also:
    • PREFERENCE_KEY_LABEL_USER_STYLESHEET

      public static final String PREFERENCE_KEY_LABEL_USER_STYLESHEET
      See Also:
    • PREFERENCE_KEY_LABEL_CSS_MEDIA_TYPES

      public static final String PREFERENCE_KEY_LABEL_CSS_MEDIA_TYPES
      See Also:
    • PREFERENCE_KEY_LABEL_ENABLE_USER_STYLESHEET

      public static final String PREFERENCE_KEY_LABEL_ENABLE_USER_STYLESHEET
      See Also:
    • PREFERENCE_KEY_LABEL_BROWSE

      public static final String PREFERENCE_KEY_LABEL_BROWSE
      See Also:
    • PREFERENCE_KEY_LABEL_ADD

      public static final String PREFERENCE_KEY_LABEL_ADD
      See Also:
    • PREFERENCE_KEY_LABEL_REMOVE

      public static final String PREFERENCE_KEY_LABEL_REMOVE
      See Also:
    • PREFERENCE_KEY_LABEL_CLEAR

      public static final String PREFERENCE_KEY_LABEL_CLEAR
      See Also:
    • PREFERENCE_KEY_LABEL_HTTP_PROXY

      public static final String PREFERENCE_KEY_LABEL_HTTP_PROXY
      See Also:
    • PREFERENCE_KEY_LABEL_HOST

      public static final String PREFERENCE_KEY_LABEL_HOST
      See Also:
    • PREFERENCE_KEY_LABEL_PORT

      public static final String PREFERENCE_KEY_LABEL_PORT
      See Also:
    • PREFERENCE_KEY_LABEL_COLON

      public static final String PREFERENCE_KEY_LABEL_COLON
      See Also:
    • PREFERENCE_KEY_BROWSE_TITLE

      public static final String PREFERENCE_KEY_BROWSE_TITLE
      See Also:
    • PREFERENCE_KEY_LANGUAGES

      public static final String PREFERENCE_KEY_LANGUAGES
      See Also:
    • PREFERENCE_KEY_IS_XML_PARSER_VALIDATING

      public static final String PREFERENCE_KEY_IS_XML_PARSER_VALIDATING
      See Also:
    • PREFERENCE_KEY_USER_STYLESHEET

      public static final String PREFERENCE_KEY_USER_STYLESHEET
      See Also:
    • PREFERENCE_KEY_USER_STYLESHEET_ENABLED

      public static final String PREFERENCE_KEY_USER_STYLESHEET_ENABLED
      See Also:
    • PREFERENCE_KEY_SHOW_RENDERING

      public static final String PREFERENCE_KEY_SHOW_RENDERING
      See Also:
    • PREFERENCE_KEY_AUTO_ADJUST_WINDOW

      public static final String PREFERENCE_KEY_AUTO_ADJUST_WINDOW
      See Also:
    • PREFERENCE_KEY_ENABLE_DOUBLE_BUFFERING

      public static final String PREFERENCE_KEY_ENABLE_DOUBLE_BUFFERING
      See Also:
    • PREFERENCE_KEY_SHOW_DEBUG_TRACE

      public static final String PREFERENCE_KEY_SHOW_DEBUG_TRACE
      See Also:
    • PREFERENCE_KEY_SELECTION_XOR_MODE

      public static final String PREFERENCE_KEY_SELECTION_XOR_MODE
      See Also:
    • PREFERENCE_KEY_PROXY_HOST

      public static final String PREFERENCE_KEY_PROXY_HOST
      See Also:
    • PREFERENCE_KEY_CSS_MEDIA

      public static final String PREFERENCE_KEY_CSS_MEDIA
      See Also:
    • PREFERENCE_KEY_DEFAULT_FONT_FAMILY

      public static final String PREFERENCE_KEY_DEFAULT_FONT_FAMILY
      See Also:
    • PREFERENCE_KEY_PROXY_PORT

      public static final String PREFERENCE_KEY_PROXY_PORT
      See Also:
    • PREFERENCE_KEY_ENFORCE_SECURE_SCRIPTING

      public static final String PREFERENCE_KEY_ENFORCE_SECURE_SCRIPTING
      See Also:
    • PREFERENCE_KEY_GRANT_SCRIPT_FILE_ACCESS

      public static final String PREFERENCE_KEY_GRANT_SCRIPT_FILE_ACCESS
      See Also:
    • PREFERENCE_KEY_GRANT_SCRIPT_NETWORK_ACCESS

      public static final String PREFERENCE_KEY_GRANT_SCRIPT_NETWORK_ACCESS
      See Also:
    • PREFERENCE_KEY_LOAD_ECMASCRIPT

      public static final String PREFERENCE_KEY_LOAD_ECMASCRIPT
      See Also:
    • PREFERENCE_KEY_LOAD_JAVA

      public static final String PREFERENCE_KEY_LOAD_JAVA
      See Also:
    • PREFERENCE_KEY_ALLOWED_SCRIPT_ORIGIN

      public static final String PREFERENCE_KEY_ALLOWED_SCRIPT_ORIGIN
      See Also:
    • PREFERENCE_KEY_ALLOWED_EXTERNAL_RESOURCE_ORIGIN

      public static final String PREFERENCE_KEY_ALLOWED_EXTERNAL_RESOURCE_ORIGIN
      See Also:
    • PREFERENCE_KEY_ANIMATION_RATE_LIMITING_MODE

      public static final String PREFERENCE_KEY_ANIMATION_RATE_LIMITING_MODE
      See Also:
    • PREFERENCE_KEY_ANIMATION_RATE_LIMITING_CPU

      public static final String PREFERENCE_KEY_ANIMATION_RATE_LIMITING_CPU
      See Also:
    • PREFERENCE_KEY_ANIMATION_RATE_LIMITING_FPS

      public static final String PREFERENCE_KEY_ANIMATION_RATE_LIMITING_FPS
      See Also:
    • LABEL_OK

      public static final String LABEL_OK
      See Also:
    • LABEL_CANCEL

      public static final String LABEL_CANCEL
      See Also:
    • model

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

      protected PreferenceDialog.JConfigurationPanel configurationPanel
      The configuration panel that holds each of the configuration pages.
    • userStylesheetEnabled

      protected JCheckBox userStylesheetEnabled
    • userStylesheetLabel

      protected JLabel userStylesheetLabel
    • userStylesheet

      protected JTextField userStylesheet
    • userStylesheetBrowse

      protected JButton userStylesheetBrowse
    • showRendering

      protected JCheckBox showRendering
    • autoAdjustWindow

      protected JCheckBox autoAdjustWindow
    • enableDoubleBuffering

      protected JCheckBox enableDoubleBuffering
    • showDebugTrace

      protected JCheckBox showDebugTrace
    • selectionXorMode

      protected JCheckBox selectionXorMode
    • isXMLParserValidating

      protected JCheckBox isXMLParserValidating
    • animationLimitUnlimited

      protected JRadioButton animationLimitUnlimited
    • animationLimitCPU

      protected JRadioButton animationLimitCPU
    • animationLimitFPS

      protected JRadioButton animationLimitFPS
    • animationLimitCPULabel

      protected JLabel animationLimitCPULabel
    • animationLimitFPSLabel

      protected JLabel animationLimitFPSLabel
    • animationLimitCPUAmount

      protected JTextField animationLimitCPUAmount
    • animationLimitFPSAmount

      protected JTextField animationLimitFPSAmount
    • enforceSecureScripting

      protected JCheckBox enforceSecureScripting
    • grantScriptFileAccess

      protected JCheckBox grantScriptFileAccess
    • grantScriptNetworkAccess

      protected JCheckBox grantScriptNetworkAccess
    • loadJava

      protected JCheckBox loadJava
    • loadEcmascript

      protected JCheckBox loadEcmascript
    • allowedScriptOrigin

      protected JComboBox allowedScriptOrigin
    • allowedResourceOrigin

      protected JComboBox allowedResourceOrigin
    • mediaList

      protected JList mediaList
    • mediaListRemoveButton

      protected JButton mediaListRemoveButton
    • mediaListClearButton

      protected JButton mediaListClearButton
    • host

      protected JTextField host
    • port

      protected JTextField port
    • languagePanel

      protected LanguageDialog.Panel languagePanel
    • mediaListModel

      protected DefaultListModel mediaListModel
    • returnCode

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

    • PreferenceDialog

      public PreferenceDialog(Frame owner, PreferenceManager model)
      Creates a new PreferenceDialog with the given model.
  • Method Details

    • 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(String id, JPanel c)
      Adds a panel to the configuration panel.
    • buildButtonsPanel

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

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

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

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

      protected 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 JPanel buildNetworkPanel()
      Builds the Network panel.
    • showDialog

      public int showDialog()
      Shows the dialog.