org.apache.batik.apps.svgbrowser

Class PreferenceDialog

public class PreferenceDialog extends JDialog implements GridBagConstants

Dialog that displays user preferences.
Nested Class Summary
protected classPreferenceDialog.JConfigurationPanel
A paged panel for configuration windows.
Field Summary
protected JComboBoxallowedResourceOrigin
protected JComboBoxallowedScriptOrigin
protected JRadioButtonanimationLimitCPU
protected JTextFieldanimationLimitCPUAmount
protected JLabelanimationLimitCPULabel
protected JRadioButtonanimationLimitFPS
protected JTextFieldanimationLimitFPSAmount
protected JLabelanimationLimitFPSLabel
protected JRadioButtonanimationLimitUnlimited
protected JCheckBoxautoAdjustWindow
protected PreferenceDialog.JConfigurationPanelconfigurationPanel
The configuration panel that holds each of the configuration pages.
static intCANCEL_OPTION
The return value if 'Cancel' is chosen.
protected JCheckBoxenableDoubleBuffering
protected JCheckBoxenforceSecureScripting
protected JCheckBoxgrantScriptFileAccess
protected JCheckBoxgrantScriptNetworkAccess
protected JTextFieldhost
protected JCheckBoxisXMLParserValidating
protected LanguageDialog.PanellanguagePanel
protected JCheckBoxloadEcmascript
protected JCheckBoxloadJava
static StringLABEL_CANCEL
static StringLABEL_OK
protected JListmediaList
protected JButtonmediaListClearButton
protected DefaultListModelmediaListModel
protected JButtonmediaListRemoveButton
protected PreferenceManagermodel
PreferenceManager used to store and retrieve preferences
static intOK_OPTION
The return value if 'OK' is chosen.
protected JTextFieldport
static StringPREFERENCE_KEY_ALLOWED_EXTERNAL_RESOURCE_ORIGIN
static StringPREFERENCE_KEY_ALLOWED_SCRIPT_ORIGIN
static StringPREFERENCE_KEY_ANIMATION_RATE_LIMITING_CPU
static StringPREFERENCE_KEY_ANIMATION_RATE_LIMITING_FPS
static StringPREFERENCE_KEY_ANIMATION_RATE_LIMITING_MODE
static StringPREFERENCE_KEY_AUTO_ADJUST_WINDOW
static StringPREFERENCE_KEY_BROWSE_TITLE
static StringPREFERENCE_KEY_CSS_MEDIA
static StringPREFERENCE_KEY_DEFAULT_FONT_FAMILY
static StringPREFERENCE_KEY_ENABLE_DOUBLE_BUFFERING
static StringPREFERENCE_KEY_ENFORCE_SECURE_SCRIPTING
static StringPREFERENCE_KEY_GRANT_SCRIPT_FILE_ACCESS
static StringPREFERENCE_KEY_GRANT_SCRIPT_NETWORK_ACCESS
static StringPREFERENCE_KEY_IS_XML_PARSER_VALIDATING
static StringPREFERENCE_KEY_LABEL_ADD
static StringPREFERENCE_KEY_LABEL_ALLOWED_RESOURCE_ORIGIN
static StringPREFERENCE_KEY_LABEL_ALLOWED_SCRIPT_ORIGIN
static StringPREFERENCE_KEY_LABEL_ALL_NETWORK
static StringPREFERENCE_KEY_LABEL_ANIMATION_LIMIT_CPU
static StringPREFERENCE_KEY_LABEL_ANIMATION_LIMIT_FPS
static StringPREFERENCE_KEY_LABEL_ANIMATION_LIMIT_UNLIMITED
static StringPREFERENCE_KEY_LABEL_ANIMATION_RATE_LIMITING
static StringPREFERENCE_KEY_LABEL_AUTO_ADJUST_WINDOW
static StringPREFERENCE_KEY_LABEL_BROWSE
static StringPREFERENCE_KEY_LABEL_CLEAR
static StringPREFERENCE_KEY_LABEL_COLON
static StringPREFERENCE_KEY_LABEL_CSS_MEDIA_TYPES
static StringPREFERENCE_KEY_LABEL_ECMASCRIPT
static StringPREFERENCE_KEY_LABEL_ENABLE_DOUBLE_BUFFERING
static StringPREFERENCE_KEY_LABEL_ENABLE_USER_STYLESHEET
static StringPREFERENCE_KEY_LABEL_ENFORCE_SECURE_SCRIPTING
static StringPREFERENCE_KEY_LABEL_FILE_SYSTEM
static StringPREFERENCE_KEY_LABEL_FPS
static StringPREFERENCE_KEY_LABEL_GRANT_SCRIPTS_ACCESS_TO
static StringPREFERENCE_KEY_LABEL_HOST
static StringPREFERENCE_KEY_LABEL_HTTP_PROXY
static StringPREFERENCE_KEY_LABEL_IS_XML_PARSER_VALIDATING
static StringPREFERENCE_KEY_LABEL_JAVA_JAR_FILES
static StringPREFERENCE_KEY_LABEL_LOAD_SCRIPTS
static StringPREFERENCE_KEY_LABEL_ORIGIN_ANY
static StringPREFERENCE_KEY_LABEL_ORIGIN_DOCUMENT
static StringPREFERENCE_KEY_LABEL_ORIGIN_EMBEDDED
static StringPREFERENCE_KEY_LABEL_ORIGIN_NONE
static StringPREFERENCE_KEY_LABEL_OTHER_OPTIONS
static StringPREFERENCE_KEY_LABEL_PERCENT
static StringPREFERENCE_KEY_LABEL_PORT
static StringPREFERENCE_KEY_LABEL_REMOVE
static StringPREFERENCE_KEY_LABEL_RENDERING_OPTIONS
static StringPREFERENCE_KEY_LABEL_SELECTION_XOR_MODE
static StringPREFERENCE_KEY_LABEL_SHOW_DEBUG_TRACE
static StringPREFERENCE_KEY_LABEL_SHOW_RENDERING
static StringPREFERENCE_KEY_LABEL_USER_STYLESHEET
static StringPREFERENCE_KEY_LANGUAGES
static StringPREFERENCE_KEY_LOAD_ECMASCRIPT
static StringPREFERENCE_KEY_LOAD_JAVA
static StringPREFERENCE_KEY_PROXY_HOST
static StringPREFERENCE_KEY_PROXY_PORT
static StringPREFERENCE_KEY_SELECTION_XOR_MODE
static StringPREFERENCE_KEY_SHOW_DEBUG_TRACE
static StringPREFERENCE_KEY_SHOW_RENDERING
static StringPREFERENCE_KEY_TITLE_DIALOG
static StringPREFERENCE_KEY_TITLE_PREFIX
static StringPREFERENCE_KEY_USER_STYLESHEET
static StringPREFERENCE_KEY_USER_STYLESHEET_ENABLED
protected intreturnCode
Code indicating whether the dialog was okayed or cancelled.
protected JCheckBoxselectionXorMode
protected JCheckBoxshowDebugTrace
protected JCheckBoxshowRendering
protected JTextFielduserStylesheet
protected JButtonuserStylesheetBrowse
protected JCheckBoxuserStylesheetEnabled
protected JLabeluserStylesheetLabel
Constructor Summary
PreferenceDialog(Frame owner, PreferenceManager model)
Creates a new PreferenceDialog with the given model.
Method Summary
protected voidaddConfigPanel(String id, JPanel c)
Adds a panel to the configuration panel.
protected JPanelbuildButtonsPanel()
Creates the OK/Cancel button panel.
protected JPanelbuildGeneralPanel()
Builds the General panel.
protected voidbuildGUI()
Builds the UI for this dialog.
protected JPanelbuildLanguagePanel()
Builds the Language panel.
protected JPanelbuildNetworkPanel()
Builds the Network panel.
protected JPanelbuildSecurityPanel()
Builds the Security panel.
protected JPanelbuildStylesheetPanel()
Builds the Stylesheet panel.
PreferenceManagergetPreferenceManager()
Returns the preference manager used by this dialog.
protected voidinitializeGUI()
Initializes the GUI components with the values from the model.
protected static booleanisMetalSteel()
Returns whether the current LAF is Metal Steel.
protected voidsavePreferences()
Stores the current settings in the PreferenceManager model.
intshowDialog()
Shows the dialog.
protected voidupdateMediaListButtons()
Updates the disabled state of the buttons next to the media type list.

Field Detail

allowedResourceOrigin

protected JComboBox allowedResourceOrigin

allowedScriptOrigin

protected JComboBox allowedScriptOrigin

animationLimitCPU

protected JRadioButton animationLimitCPU

animationLimitCPUAmount

protected JTextField animationLimitCPUAmount

animationLimitCPULabel

protected JLabel animationLimitCPULabel

animationLimitFPS

protected JRadioButton animationLimitFPS

animationLimitFPSAmount

protected JTextField animationLimitFPSAmount

animationLimitFPSLabel

protected JLabel animationLimitFPSLabel

animationLimitUnlimited

protected JRadioButton animationLimitUnlimited

autoAdjustWindow

protected JCheckBox autoAdjustWindow

configurationPanel

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

CANCEL_OPTION

public static final int CANCEL_OPTION
The return value if 'Cancel' is chosen.

enableDoubleBuffering

protected JCheckBox enableDoubleBuffering

enforceSecureScripting

protected JCheckBox enforceSecureScripting

grantScriptFileAccess

protected JCheckBox grantScriptFileAccess

grantScriptNetworkAccess

protected JCheckBox grantScriptNetworkAccess

host

protected JTextField host

isXMLParserValidating

protected JCheckBox isXMLParserValidating

languagePanel

protected LanguageDialog.Panel languagePanel

loadEcmascript

protected JCheckBox loadEcmascript

loadJava

protected JCheckBox loadJava

LABEL_CANCEL

public static final String LABEL_CANCEL

LABEL_OK

public static final String LABEL_OK

mediaList

protected JList mediaList

mediaListClearButton

protected JButton mediaListClearButton

mediaListModel

protected DefaultListModel mediaListModel

mediaListRemoveButton

protected JButton mediaListRemoveButton

model

protected PreferenceManager model
PreferenceManager used to store and retrieve preferences

OK_OPTION

public static final int OK_OPTION
The return value if 'OK' is chosen.

port

protected JTextField port

PREFERENCE_KEY_ALLOWED_EXTERNAL_RESOURCE_ORIGIN

public static final String PREFERENCE_KEY_ALLOWED_EXTERNAL_RESOURCE_ORIGIN

PREFERENCE_KEY_ALLOWED_SCRIPT_ORIGIN

public static final String PREFERENCE_KEY_ALLOWED_SCRIPT_ORIGIN

PREFERENCE_KEY_ANIMATION_RATE_LIMITING_CPU

public static final String PREFERENCE_KEY_ANIMATION_RATE_LIMITING_CPU

PREFERENCE_KEY_ANIMATION_RATE_LIMITING_FPS

public static final String PREFERENCE_KEY_ANIMATION_RATE_LIMITING_FPS

PREFERENCE_KEY_ANIMATION_RATE_LIMITING_MODE

public static final String PREFERENCE_KEY_ANIMATION_RATE_LIMITING_MODE

PREFERENCE_KEY_AUTO_ADJUST_WINDOW

public static final String PREFERENCE_KEY_AUTO_ADJUST_WINDOW

PREFERENCE_KEY_BROWSE_TITLE

public static final String PREFERENCE_KEY_BROWSE_TITLE

PREFERENCE_KEY_CSS_MEDIA

public static final String PREFERENCE_KEY_CSS_MEDIA

PREFERENCE_KEY_DEFAULT_FONT_FAMILY

public static final String PREFERENCE_KEY_DEFAULT_FONT_FAMILY

PREFERENCE_KEY_ENABLE_DOUBLE_BUFFERING

public static final String PREFERENCE_KEY_ENABLE_DOUBLE_BUFFERING

PREFERENCE_KEY_ENFORCE_SECURE_SCRIPTING

public static final String PREFERENCE_KEY_ENFORCE_SECURE_SCRIPTING

PREFERENCE_KEY_GRANT_SCRIPT_FILE_ACCESS

public static final String PREFERENCE_KEY_GRANT_SCRIPT_FILE_ACCESS

PREFERENCE_KEY_GRANT_SCRIPT_NETWORK_ACCESS

public static final String PREFERENCE_KEY_GRANT_SCRIPT_NETWORK_ACCESS

PREFERENCE_KEY_IS_XML_PARSER_VALIDATING

public static final String PREFERENCE_KEY_IS_XML_PARSER_VALIDATING

PREFERENCE_KEY_LABEL_ADD

public static final String PREFERENCE_KEY_LABEL_ADD

PREFERENCE_KEY_LABEL_ALLOWED_RESOURCE_ORIGIN

public static final String PREFERENCE_KEY_LABEL_ALLOWED_RESOURCE_ORIGIN

PREFERENCE_KEY_LABEL_ALLOWED_SCRIPT_ORIGIN

public static final String PREFERENCE_KEY_LABEL_ALLOWED_SCRIPT_ORIGIN

PREFERENCE_KEY_LABEL_ALL_NETWORK

public static final String PREFERENCE_KEY_LABEL_ALL_NETWORK

PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_CPU

public static final String PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_CPU

PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_FPS

public static final String PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_FPS

PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_UNLIMITED

public static final String PREFERENCE_KEY_LABEL_ANIMATION_LIMIT_UNLIMITED

PREFERENCE_KEY_LABEL_ANIMATION_RATE_LIMITING

public static final String PREFERENCE_KEY_LABEL_ANIMATION_RATE_LIMITING

PREFERENCE_KEY_LABEL_AUTO_ADJUST_WINDOW

public static final String PREFERENCE_KEY_LABEL_AUTO_ADJUST_WINDOW

PREFERENCE_KEY_LABEL_BROWSE

public static final String PREFERENCE_KEY_LABEL_BROWSE

PREFERENCE_KEY_LABEL_CLEAR

public static final String PREFERENCE_KEY_LABEL_CLEAR

PREFERENCE_KEY_LABEL_COLON

public static final String PREFERENCE_KEY_LABEL_COLON

PREFERENCE_KEY_LABEL_CSS_MEDIA_TYPES

public static final String PREFERENCE_KEY_LABEL_CSS_MEDIA_TYPES

PREFERENCE_KEY_LABEL_ECMASCRIPT

public static final String PREFERENCE_KEY_LABEL_ECMASCRIPT

PREFERENCE_KEY_LABEL_ENABLE_DOUBLE_BUFFERING

public static final String PREFERENCE_KEY_LABEL_ENABLE_DOUBLE_BUFFERING

PREFERENCE_KEY_LABEL_ENABLE_USER_STYLESHEET

public static final String PREFERENCE_KEY_LABEL_ENABLE_USER_STYLESHEET

PREFERENCE_KEY_LABEL_ENFORCE_SECURE_SCRIPTING

public static final String PREFERENCE_KEY_LABEL_ENFORCE_SECURE_SCRIPTING

PREFERENCE_KEY_LABEL_FILE_SYSTEM

public static final String PREFERENCE_KEY_LABEL_FILE_SYSTEM

PREFERENCE_KEY_LABEL_FPS

public static final String PREFERENCE_KEY_LABEL_FPS

PREFERENCE_KEY_LABEL_GRANT_SCRIPTS_ACCESS_TO

public static final String PREFERENCE_KEY_LABEL_GRANT_SCRIPTS_ACCESS_TO

PREFERENCE_KEY_LABEL_HOST

public static final String PREFERENCE_KEY_LABEL_HOST

PREFERENCE_KEY_LABEL_HTTP_PROXY

public static final String PREFERENCE_KEY_LABEL_HTTP_PROXY

PREFERENCE_KEY_LABEL_IS_XML_PARSER_VALIDATING

public static final String PREFERENCE_KEY_LABEL_IS_XML_PARSER_VALIDATING

PREFERENCE_KEY_LABEL_JAVA_JAR_FILES

public static final String PREFERENCE_KEY_LABEL_JAVA_JAR_FILES

PREFERENCE_KEY_LABEL_LOAD_SCRIPTS

public static final String PREFERENCE_KEY_LABEL_LOAD_SCRIPTS

PREFERENCE_KEY_LABEL_ORIGIN_ANY

public static final String PREFERENCE_KEY_LABEL_ORIGIN_ANY

PREFERENCE_KEY_LABEL_ORIGIN_DOCUMENT

public static final String PREFERENCE_KEY_LABEL_ORIGIN_DOCUMENT

PREFERENCE_KEY_LABEL_ORIGIN_EMBEDDED

public static final String PREFERENCE_KEY_LABEL_ORIGIN_EMBEDDED

PREFERENCE_KEY_LABEL_ORIGIN_NONE

public static final String PREFERENCE_KEY_LABEL_ORIGIN_NONE

PREFERENCE_KEY_LABEL_OTHER_OPTIONS

public static final String PREFERENCE_KEY_LABEL_OTHER_OPTIONS

PREFERENCE_KEY_LABEL_PERCENT

public static final String PREFERENCE_KEY_LABEL_PERCENT

PREFERENCE_KEY_LABEL_PORT

public static final String PREFERENCE_KEY_LABEL_PORT

PREFERENCE_KEY_LABEL_REMOVE

public static final String PREFERENCE_KEY_LABEL_REMOVE

PREFERENCE_KEY_LABEL_RENDERING_OPTIONS

public static final String PREFERENCE_KEY_LABEL_RENDERING_OPTIONS

PREFERENCE_KEY_LABEL_SELECTION_XOR_MODE

public static final String PREFERENCE_KEY_LABEL_SELECTION_XOR_MODE

PREFERENCE_KEY_LABEL_SHOW_DEBUG_TRACE

public static final String PREFERENCE_KEY_LABEL_SHOW_DEBUG_TRACE

PREFERENCE_KEY_LABEL_SHOW_RENDERING

public static final String PREFERENCE_KEY_LABEL_SHOW_RENDERING

PREFERENCE_KEY_LABEL_USER_STYLESHEET

public static final String PREFERENCE_KEY_LABEL_USER_STYLESHEET

PREFERENCE_KEY_LANGUAGES

public static final String PREFERENCE_KEY_LANGUAGES

PREFERENCE_KEY_LOAD_ECMASCRIPT

public static final String PREFERENCE_KEY_LOAD_ECMASCRIPT

PREFERENCE_KEY_LOAD_JAVA

public static final String PREFERENCE_KEY_LOAD_JAVA

PREFERENCE_KEY_PROXY_HOST

public static final String PREFERENCE_KEY_PROXY_HOST

PREFERENCE_KEY_PROXY_PORT

public static final String PREFERENCE_KEY_PROXY_PORT

PREFERENCE_KEY_SELECTION_XOR_MODE

public static final String PREFERENCE_KEY_SELECTION_XOR_MODE

PREFERENCE_KEY_SHOW_DEBUG_TRACE

public static final String PREFERENCE_KEY_SHOW_DEBUG_TRACE

PREFERENCE_KEY_SHOW_RENDERING

public static final String PREFERENCE_KEY_SHOW_RENDERING

PREFERENCE_KEY_TITLE_DIALOG

public static final String PREFERENCE_KEY_TITLE_DIALOG

PREFERENCE_KEY_TITLE_PREFIX

public static final String PREFERENCE_KEY_TITLE_PREFIX

PREFERENCE_KEY_USER_STYLESHEET

public static final String PREFERENCE_KEY_USER_STYLESHEET

PREFERENCE_KEY_USER_STYLESHEET_ENABLED

public static final String PREFERENCE_KEY_USER_STYLESHEET_ENABLED

returnCode

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

selectionXorMode

protected JCheckBox selectionXorMode

showDebugTrace

protected JCheckBox showDebugTrace

showRendering

protected JCheckBox showRendering

userStylesheet

protected JTextField userStylesheet

userStylesheetBrowse

protected JButton userStylesheetBrowse

userStylesheetEnabled

protected JCheckBox userStylesheetEnabled

userStylesheetLabel

protected JLabel userStylesheetLabel

Constructor Detail

PreferenceDialog

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

Method Detail

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.

buildGUI

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

buildLanguagePanel

protected JPanel buildLanguagePanel()
Builds the Language panel.

buildNetworkPanel

protected JPanel buildNetworkPanel()
Builds the Network panel.

buildSecurityPanel

protected JPanel buildSecurityPanel()
Builds the Security panel.

buildStylesheetPanel

protected JPanel buildStylesheetPanel()
Builds the Stylesheet panel.

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.

isMetalSteel

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

savePreferences

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

showDialog

public int showDialog()
Shows the dialog.

updateMediaListButtons

protected void updateMediaListButtons()
Updates the disabled state of the buttons next to the media type list.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.