org.apache.batik.apps.svgbrowser
Class Main

java.lang.Object
  |
  +--org.apache.batik.apps.svgbrowser.Main
All Implemented Interfaces:
Application

public class Main
extends java.lang.Object
implements Application

This class contains the main method of an SVG viewer.


Inner Class Summary
protected  class Main.FontSizeHandler
          To handle the '-font-size' option.
protected static interface Main.OptionHandler
          This interface represents an option handler.
 
Field Summary
protected  java.lang.String[] arguments
          The arguments.
protected static java.util.ResourceBundle bundle
          The resource bundle
static java.lang.String CSS_PARSER_CLASS_NAME_KEY
          The CSS parser class name key.
protected static javax.swing.ImageIcon frameIcon
          The frame's icon.
protected  java.util.Map handlers
          The option handlers.
protected  PreferenceDialog preferenceDialog
          The preference dialog.
protected  XMLPreferenceManager preferenceManager
          The preference manager.
protected static ResourceManager resources
          The resource manager
static java.lang.String RESOURCES
          The gui resources file name
protected  java.util.List viewerFrames
          The viewer frames.
 
Constructor Summary
Main(java.lang.String[] args)
          Creates a new application.
 
Method Summary
 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.
 java.lang.String getLanguages()
          Returns the user languages.
 java.lang.String getMedia()
          Returns the CSS media to use.
 java.lang.String getUserStyleSheetURI()
          Returns the user stylesheet uri.
 java.lang.String getXMLParserClassName()
          Returns the XML parser class name.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CSS_PARSER_CLASS_NAME_KEY

public static final java.lang.String CSS_PARSER_CLASS_NAME_KEY
The CSS parser class name key.

RESOURCES

public static final java.lang.String RESOURCES
The gui resources file name

bundle

protected static java.util.ResourceBundle bundle
The resource bundle

resources

protected static ResourceManager resources
The resource manager

frameIcon

protected static javax.swing.ImageIcon frameIcon
The frame's icon.

preferenceManager

protected XMLPreferenceManager preferenceManager
The preference manager.

arguments

protected java.lang.String[] arguments
The arguments.

handlers

protected java.util.Map handlers
The option handlers.

viewerFrames

protected java.util.List viewerFrames
The viewer frames.

preferenceDialog

protected PreferenceDialog preferenceDialog
The preference dialog.
Constructor Detail

Main

public Main(java.lang.String[] args)
Creates a new application.
Parameters:
args - The command-line arguments.
Method Detail

main

public static void main(java.lang.String[] args)
Creates a viewer frame and shows it..
Parameters:
args - The command-line arguments.

run

public void run()
Runs the application.

printUsage

protected void printUsage()
Prints the command line usage.

createAndShowJSVGViewerFrame

public JSVGViewerFrame createAndShowJSVGViewerFrame()
Creates and shows a new viewer frame.
Specified by:
createAndShowJSVGViewerFrame in interface Application

closeJSVGViewerFrame

public void closeJSVGViewerFrame(JSVGViewerFrame f)
Closes the given viewer frame.
Specified by:
closeJSVGViewerFrame in interface Application

createExitAction

public javax.swing.Action createExitAction(JSVGViewerFrame vf)
Creates a new application exit action.
Specified by:
createExitAction in interface Application

openLink

public void openLink(java.lang.String url)
Opens the given link in a new window.
Specified by:
openLink in interface Application

getXMLParserClassName

public java.lang.String getXMLParserClassName()
Returns the XML parser class name.
Specified by:
getXMLParserClassName in interface Application

isXMLParserValidating

public boolean isXMLParserValidating()
Returns true if the XML parser must be in validation mode, false otherwise.
Specified by:
isXMLParserValidating in interface Application

showPreferenceDialog

public void showPreferenceDialog(JSVGViewerFrame f)
Shows the preference dialog.
Specified by:
showPreferenceDialog in interface Application

getLanguages

public java.lang.String getLanguages()
Returns the user languages.
Specified by:
getLanguages in interface Application

getUserStyleSheetURI

public java.lang.String getUserStyleSheetURI()
Returns the user stylesheet uri.
Specified by:
getUserStyleSheetURI in interface Application
Returns:
null if no user style sheet was specified.

getMedia

public java.lang.String getMedia()
Returns the CSS media to use.
Specified by:
getMedia in interface Application
Returns:
empty string if no CSS media was specified.

isSelectionOverlayXORMode

public boolean isSelectionOverlayXORMode()
Returns true if the selection overlay is painted in XOR mode, false otherwise.
Specified by:
isSelectionOverlayXORMode in interface Application


Copyright © 2001 Apache Software Foundation. All Rights Reserved.