org.apache.batik.apps.svgbrowser
public class Main extends Object implements Application
Nested Class Summary | |
---|---|
protected class | Main.FontSizeHandler
To handle the '-font-size' option. |
protected interface | Main.OptionHandler
This interface represents an option handler. |
Field Summary | |
---|---|
protected String[] | arguments
The arguments. |
protected static ResourceBundle | bundle
The resource bundle |
static String | BATIK_CONFIGURATION_SUBDIRECTORY
Batik configuration sub-directory |
static String | DEFAULT_DEFAULT_FONT_FAMILY
Default font-family value. |
protected static ImageIcon | frameIcon
The frame's icon. |
protected Map | handlers
The option handlers. |
protected Vector | lastVisited
The array of last visited URIs |
protected int | maxVisitedURIs
The actual allowed maximum number of last visited URIs |
static int | MAX_VISITED_URIS
Maximum number of recently visited URIs |
protected boolean | overrideSecurityPolicy
Controls whether the application can override the
system security policy property. |
protected PreferenceDialog | preferenceDialog
The preference dialog. |
protected XMLPreferenceManager | preferenceManager
The preference manager. |
static String | POLICY_GRANT_SCRIPT_FILE_ACCESS
Entry for granting file system access to scripts |
static String | POLICY_GRANT_SCRIPT_NETWORK_ACCESS
Entry for granting network access to scripts |
static String | PREFERENCE_KEY_VISITED_URI_LIST
Entry for the list of recently visited URI |
static String | PREFERENCE_KEY_VISITED_URI_LIST_LENGTH
Entry for the maximum number of last visited URIs |
static String | PROPERTY_JAVA_SECURITY_POLICY
System property for specifying an additional policy file. |
static String | PROPERTY_USER_HOME
User home property |
protected static ResourceManager | resources
The resource manager |
static String | RESOURCES
The gui resources file name |
protected ApplicationSecurityEnforcer | securityEnforcer
Script security enforcement is delegated to the
security utility |
protected String | svgInitializationURI
Stores the initialization file URI |
static String | SQUIGGLE_CONFIGURATION_FILE
Name of the Squiggle configuration file |
static String | SQUIGGLE_POLICY_FILE
Name of the Squiggle policy file |
static String | SQUIGGLE_SECURITY_POLICY
URL for Squiggle's security policy file |
static String | SVG_INITIALIZATION
SVG initialization file, used to trigger loading of most of
the Batik classes |
protected String | uiSpecialization
The UI specialization to use in the JSVGViewerFrames. |
static 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 String | URI_SEPARATOR
List of separators between URI values in the preference
file |
protected List | viewerFrames
The viewer frames. |
Constructor Summary | |
---|---|
Main(String[] args)
Creates a new application. |
Method Summary | |
---|---|
void | addVisitedURI(String uri)
Notifies Application of recently visited URI |
boolean | canLoadScriptType(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. |
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. |
String | getDefaultFontFamily()
Returns the default value for the CSS
"font-family" property |
String | getLanguages()
Returns the user languages. |
String | getMedia()
Returns the CSS media to use. |
String | getUISpecialization()
Returns the UI resource specialization to use. |
String | getUserStyleSheetURI()
Returns the user stylesheet uri. |
String[] | getVisitedURIs()
Asks Application for a list of recently visited URI. |
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(String[] args)
Creates a viewer frame and shows it.. |
void | openLink(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. |
Parameters: args The command-line arguments.
See Also: ResourceOrigin
See Also: ResourceOrigin
Returns: empty string if no CSS media was specified.
Returns: null if no user style sheet was specified.
Parameters: args The command-line arguments.