public class Main extends java.lang.Object implements Application
Modifier and Type | Class and Description |
---|---|
protected class |
Main.FontSizeHandler
To handle the '-font-size' option.
|
protected static interface |
Main.OptionHandler
This interface represents an option handler.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
arguments
The arguments.
|
static java.lang.String |
BATIK_CONFIGURATION_SUBDIRECTORY
Batik configuration sub-directory
|
protected static java.util.ResourceBundle |
bundle
The resource bundle
|
static java.lang.String |
DEFAULT_DEFAULT_FONT_FAMILY
Default font-family value.
|
protected static javax.swing.ImageIcon |
frameIcon
The frame's icon.
|
protected java.util.Map |
handlers
The option handlers.
|
protected java.util.Vector |
lastVisited
The array of last visited URIs
|
static int |
MAX_VISITED_URIS
Maximum number of recently visited URIs
|
protected int |
maxVisitedURIs
The actual allowed maximum number of last visited URIs
|
protected boolean |
overrideSecurityPolicy
Controls whether the application can override the
system security policy property.
|
static java.lang.String |
POLICY_GRANT_SCRIPT_FILE_ACCESS
Entry for granting file system access to scripts
|
static java.lang.String |
POLICY_GRANT_SCRIPT_NETWORK_ACCESS
Entry for granting network access to scripts
|
static java.lang.String |
PREFERENCE_KEY_VISITED_URI_LIST
Entry for the list of recently visited URI
|
static java.lang.String |
PREFERENCE_KEY_VISITED_URI_LIST_LENGTH
Entry for the maximum number of last visited URIs
|
protected PreferenceDialog |
preferenceDialog
The preference dialog.
|
protected XMLPreferenceManager |
preferenceManager
The preference manager.
|
static java.lang.String |
PROPERTY_JAVA_SECURITY_POLICY
System property for specifying an additional policy file.
|
static java.lang.String |
PROPERTY_USER_HOME
User home property
|
protected static ResourceManager |
resources
The resource manager
|
static java.lang.String |
RESOURCES
The gui resources file name
|
protected ApplicationSecurityEnforcer |
securityEnforcer
Script security enforcement is delegated to the
security utility
|
static java.lang.String |
SQUIGGLE_CONFIGURATION_FILE
Name of the Squiggle configuration file
|
static java.lang.String |
SQUIGGLE_POLICY_FILE
Name of the Squiggle policy file
|
static java.lang.String |
SQUIGGLE_SECURITY_POLICY
URL for Squiggle's security policy file
|
static java.lang.String |
SVG_INITIALIZATION
SVG initialization file, used to trigger loading of most of
the Batik classes
|
protected java.lang.String |
svgInitializationURI
Stores the initialization file URI
|
protected java.lang.String |
uiSpecialization
The UI specialization to use in the JSVGViewerFrames.
|
static java.lang.String |
UNKNOWN_SCRIPT_TYPE_LOAD_KEY_EXTENSION
Extension used in addition to the scriptType value
to read from the PreferenceManager whether or not the
scriptType can be loaded.
|
static java.lang.String |
URI_SEPARATOR
List of separators between URI values in the preference
file
|
protected java.util.List |
viewerFrames
The viewer frames.
|
Constructor and Description |
---|
Main(java.lang.String[] args)
Creates a new application.
|
Modifier and Type | Method and Description |
---|---|
void |
addVisitedURI(java.lang.String uri)
Notifies Application of recently visited URI
|
boolean |
canLoadScriptType(java.lang.String scriptType)
Returns true if the input scriptType can be loaded in
this application.
|
void |
closeJSVGViewerFrame(JSVGViewerFrame f)
Closes the given viewer frame.
|
JSVGViewerFrame |
createAndShowJSVGViewerFrame()
Creates and shows a new viewer frame.
|
javax.swing.Action |
createExitAction(JSVGViewerFrame vf)
Creates a new application exit action.
|
int |
getAllowedExternalResourceOrigin()
Returns the allowed origins for external
resources.
|
int |
getAllowedScriptOrigin()
Returns the allowed origins for scripts.
|
java.lang.String |
getDefaultFontFamily()
Returns the default value for the CSS
"font-family" property
|
java.lang.String |
getLanguages()
Returns the user languages.
|
java.lang.String |
getMedia()
Returns the CSS media to use.
|
java.lang.String |
getUISpecialization()
Returns the UI resource specialization to use.
|
java.lang.String |
getUserStyleSheetURI()
Returns the user stylesheet uri.
|
java.lang.String[] |
getVisitedURIs()
Asks Application for a list of recently visited URI.
|
java.lang.String |
getXMLParserClassName()
Returns the XML parser class name.
|
protected void |
initializeLastVisited()
Initializes the lastVisited array
|
void |
installCustomPolicyFile()
Installs a custom policy file in the '.batik' directory.
|
boolean |
isSelectionOverlayXORMode()
Returns true if the selection overlay is painted in XOR mode, false
otherwise.
|
boolean |
isXMLParserValidating()
Returns true if the XML parser must be in validation mode, false
otherwise.
|
static void |
main(java.lang.String[] args)
Creates a viewer frame and shows it..
|
void |
openLink(java.lang.String url)
Opens the given link in a new window.
|
protected void |
printUsage()
Prints the command line usage.
|
void |
run()
Runs the application.
|
void |
showPreferenceDialog(JSVGViewerFrame f)
Shows the preference dialog.
|
public static final java.lang.String UNKNOWN_SCRIPT_TYPE_LOAD_KEY_EXTENSION
public static final java.lang.String PROPERTY_USER_HOME
public static final java.lang.String PROPERTY_JAVA_SECURITY_POLICY
public static final java.lang.String BATIK_CONFIGURATION_SUBDIRECTORY
public static final java.lang.String SQUIGGLE_CONFIGURATION_FILE
public static final java.lang.String SQUIGGLE_POLICY_FILE
public static final java.lang.String POLICY_GRANT_SCRIPT_NETWORK_ACCESS
public static final java.lang.String POLICY_GRANT_SCRIPT_FILE_ACCESS
public static final java.lang.String PREFERENCE_KEY_VISITED_URI_LIST
public static final java.lang.String PREFERENCE_KEY_VISITED_URI_LIST_LENGTH
public static final java.lang.String URI_SEPARATOR
public static final java.lang.String DEFAULT_DEFAULT_FONT_FAMILY
public static final java.lang.String SVG_INITIALIZATION
protected java.lang.String svgInitializationURI
public static final java.lang.String RESOURCES
public static final java.lang.String SQUIGGLE_SECURITY_POLICY
protected static java.util.ResourceBundle bundle
protected static ResourceManager resources
protected static javax.swing.ImageIcon frameIcon
protected XMLPreferenceManager preferenceManager
public static final int MAX_VISITED_URIS
protected java.util.Vector lastVisited
protected int maxVisitedURIs
protected java.lang.String[] arguments
protected boolean overrideSecurityPolicy
protected ApplicationSecurityEnforcer securityEnforcer
protected java.util.Map handlers
protected java.util.List viewerFrames
protected PreferenceDialog preferenceDialog
protected java.lang.String uiSpecialization
public Main(java.lang.String[] args)
args
- The command-line arguments.public static void main(java.lang.String[] args)
args
- The command-line arguments.public void installCustomPolicyFile() throws java.io.IOException
java.io.IOException
public void run()
protected void printUsage()
public JSVGViewerFrame createAndShowJSVGViewerFrame()
createAndShowJSVGViewerFrame
in interface Application
public void closeJSVGViewerFrame(JSVGViewerFrame f)
closeJSVGViewerFrame
in interface Application
public javax.swing.Action createExitAction(JSVGViewerFrame vf)
createExitAction
in interface Application
public void openLink(java.lang.String url)
openLink
in interface Application
public java.lang.String getXMLParserClassName()
getXMLParserClassName
in interface Application
public boolean isXMLParserValidating()
isXMLParserValidating
in interface Application
public void showPreferenceDialog(JSVGViewerFrame f)
showPreferenceDialog
in interface Application
public java.lang.String getLanguages()
getLanguages
in interface Application
public java.lang.String getUserStyleSheetURI()
getUserStyleSheetURI
in interface Application
public java.lang.String getDefaultFontFamily()
getDefaultFontFamily
in interface Application
public java.lang.String getMedia()
getMedia
in interface Application
public boolean isSelectionOverlayXORMode()
isSelectionOverlayXORMode
in interface Application
public boolean canLoadScriptType(java.lang.String scriptType)
canLoadScriptType
in interface Application
public int getAllowedScriptOrigin()
getAllowedScriptOrigin
in interface Application
ResourceOrigin
public int getAllowedExternalResourceOrigin()
getAllowedExternalResourceOrigin
in interface Application
ResourceOrigin
public void addVisitedURI(java.lang.String uri)
addVisitedURI
in interface Application
public java.lang.String[] getVisitedURIs()
getVisitedURIs
in interface Application
public java.lang.String getUISpecialization()
getUISpecialization
in interface Application
protected void initializeLastVisited()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.