org.apache.batik.apps.svgbrowser
public class JSVGViewerFrame extends JFrame implements ActionMap, SVGDocumentLoaderListener, GVTTreeBuilderListener, SVGLoadEventDispatcherListener, GVTTreeRendererListener, LinkActivationListener, UpdateManagerListener
Nested Class Summary | |
---|---|
class | JSVGViewerFrame.AboutAction
To show the about dialog |
class | JSVGViewerFrame.BackAction
To go back to the previous document |
protected class | JSVGViewerFrame.Canvas
An extension of JSVGCanvas that exposes the Rhino interpreter. |
class | JSVGViewerFrame.CloseAction
To close the last document. |
protected static class | JSVGViewerFrame.Debugger
Rhino debugger class. |
class | JSVGViewerFrame.DOMViewerAction
To display the DOM viewer of the document |
class | JSVGViewerFrame.ExportAsJPGAction
To save the current document as JPG. |
class | JSVGViewerFrame.ExportAsPNGAction
To save the current document as PNG. |
class | JSVGViewerFrame.ExportAsTIFFAction
To save the current document as TIFF. |
class | JSVGViewerFrame.FindDialogAction
To display the Find dialog |
class | JSVGViewerFrame.FlushAction
To flush image cache (purely for debugging purposes) |
class | JSVGViewerFrame.ForwardAction
To go forward to the next document |
class | JSVGViewerFrame.FullScreenAction
To display the document full screen |
protected static class | JSVGViewerFrame.ImageFileFilter
A FileFilter used when exporting the SVG document as an image. |
class | JSVGViewerFrame.MonitorAction
To display the memory monitor. |
class | JSVGViewerFrame.NewWindowAction
To open a new window. |
class | JSVGViewerFrame.NextTransformAction
To go forward to the next transform |
class | JSVGViewerFrame.OpenAction
To open a new file. |
class | JSVGViewerFrame.OpenLocationAction
To open a new document. |
class | JSVGViewerFrame.PauseAction
To pause a document. |
class | JSVGViewerFrame.PlayAction
To restart after a pause. |
class | JSVGViewerFrame.PreferencesAction
To show the preferences. |
class | JSVGViewerFrame.PreviousTransformAction
To go back to the previous transform |
class | JSVGViewerFrame.PrintAction
To print the current document. |
class | JSVGViewerFrame.ReloadAction
To reload the current document. |
class | JSVGViewerFrame.SaveAsAction
To save the current document as SVG. |
class | JSVGViewerFrame.SetTransformAction
To show the set transform dialog |
class | JSVGViewerFrame.StopAction
To stop the current processing. |
class | JSVGViewerFrame.ThumbnailDialogAction
To display the Thumbnail dialog |
class | JSVGViewerFrame.ToggleDebuggerAction
To toggle visiblity of JavaScript Debugger. |
protected class | JSVGViewerFrame.UserAgent
This class implements a SVG user agent. |
class | JSVGViewerFrame.UseStylesheetAction
To apply the selected author stylesheet |
class | JSVGViewerFrame.ViewSourceAction
To view the source of the current document. |
Field Summary | |
---|---|
static String | ABOUT_ACTION |
protected String | alternateStyleSheet
The alternate style-sheet title. |
protected Application | application
The current application. |
protected boolean | autoAdjust
The auto adjust flag. |
protected JSVGViewerFrame.BackAction | backAction
The back action |
protected static ResourceBundle | bundle
The resource bundle |
static String | BACK_ACTION |
protected File | currentPath
The current path. |
protected File | currentSavePath
The current export path. |
static String | CLOSE_ACTION |
protected boolean | debug
The debug flag. |
protected JSVGViewerFrame.Debugger | debugger
The debugger object. |
protected static SquiggleInputHandler | defaultHandler
The default input handler |
protected DOMViewer | domViewer
The DOM viewer. |
static Cursor | DEFAULT_CURSOR
The default cursor. |
static String | DOM_VIEWER_ACTION |
static String | EXIT_ACTION |
static String | EXPORT_AS_JPG_ACTION |
static String | EXPORT_AS_PNG_ACTION |
static String | EXPORT_AS_TIFF_ACTION |
protected FindDialog | findDialog
The Find dialog. |
protected JSVGViewerFrame.ForwardAction | forwardAction
The forward action |
static String | FIND_DIALOG_ACTION |
static String | FLUSH_ACTION |
static String | FORWARD_ACTION |
static String | FULL_SCREEN_ACTION |
protected static Vector | handlers
The input handlers |
protected static String | JDK_1_4_PRESENCE_TEST_CLASS
If the following class can be found (it appeared in JDK 1.4),
then we know we are post JDK 1.4. |
protected Map | listeners
The map that contains the action listeners |
protected LocalHistory | localHistory
The local history. |
protected LocationBar | locationBar
The location bar. |
protected boolean | managerStopped
Whether the update manager was stopped. |
protected static JFrame | memoryMonitorFrame
The memory monitor frame. |
static String | MONITOR_ACTION |
protected JSVGViewerFrame.NextTransformAction | nextTransformAction
The next transform action |
static String | NEW_WINDOW_ACTION |
static String | NEXT_TRANSFORM_ACTION |
static String | OPEN_ACTION |
static String | OPEN_LOCATION_ACTION |
protected static String | OPEN_TITLE
Resource string name for the Open dialog. |
protected JSVGViewerFrame.PauseAction | pauseAction
The pause action |
protected JSVGViewerFrame.PlayAction | playAction
The play action |
protected JSVGViewerFrame.PreviousTransformAction | previousTransformAction
The previous transform action |
protected static boolean | priorJDK1_4
Kind of ugly, but we need to know if we are running before
or after 1.4... |
static String | PAUSE_ACTION |
static String | PLAY_ACTION |
static String | PREFERENCES_ACTION |
static String | PREVIOUS_TRANSFORM_ACTION |
static String | PRINT_ACTION |
static String | PROPERTY_OS_NAME
Name for the os-name property |
static String | PROPERTY_OS_NAME_DEFAULT
Name for the os.name default |
static String | PROPERTY_OS_WINDOWS_PREFIX
Name for the os.name property prefix we are looking
for in OpenAction to work around JFileChooser bug |
protected static ResourceManager | resources
The resource manager |
static String | RELOAD_ACTION |
static String | RESET_TRANSFORM_ACTION |
static String | RESOURCES
The gui resources file name |
protected StatusBar | statusBar
The status bar. |
protected JSVGViewerFrame.StopAction | stopAction
The stop action |
protected JSVGViewerFrame.Canvas | svgCanvas
The JSVGCanvas. |
protected JPanel | svgCanvasPanel
The panel where the svgCanvas is displayed |
protected SVGDocument | svgDocument
The current document. |
static String | SAVE_AS_ACTION |
static String | SET_TRANSFORM_ACTION |
static String | STOP_ACTION |
protected ThumbnailDialog | thumbnailDialog
The Find dialog. |
protected String | title
The initial frame title. |
protected JAffineTransformChooser.Dialog | transformDialog
The transform dialog |
protected TransformHistory | transformHistory
The transform history. |
static String | THUMBNAIL_DIALOG_ACTION |
static String | TOGGLE_DEBUGGER_ACTION |
protected URIChooser | uriChooser
The URI chooser. |
protected SVGUserAgent | userAgent
The SVG user agent. |
protected JSVGViewerFrame.UseStylesheetAction | useStylesheetAction
The use (author) stylesheet action |
static String | USE_STYLESHEET_ACTION |
static String | VIEW_SOURCE_ACTION |
protected JWindow | window
A window used for full screen display |
static Cursor | WAIT_CURSOR
The cursor indicating that an operation is pending. |
static String | ZOOM_IN_ACTION |
static String | ZOOM_OUT_ACTION |
Constructor Summary | |
---|---|
JSVGViewerFrame(Application app)
Creates a new SVG viewer frame. |
Method Summary | |
---|---|
void | dispose()
Call dispose on canvas as well. |
void | documentLoadingCancelled(SVGDocumentLoaderEvent e)
Called when the loading of a document was cancelled. |
void | documentLoadingCompleted(SVGDocumentLoaderEvent e)
Called when the loading of a document was completed. |
void | documentLoadingFailed(SVGDocumentLoaderEvent e)
Called when the loading of a document has failed. |
void | documentLoadingStarted(SVGDocumentLoaderEvent e)
Called when the loading of a document was started. |
Action | getAction(String key)
Returns the action associated with the given string
or null on error |
protected static Vector | getHandlers()
Returns the list of input file handler. |
SquiggleInputHandler | getInputHandler(ParsedURL purl)
Returns the input handler for the given URI |
JSVGCanvas | getJSVGCanvas()
Returns the main JSVGCanvas of this frame. |
void | gvtBuildCancelled(GVTTreeBuilderEvent e)
Called when a build was cancelled. |
void | gvtBuildCompleted(GVTTreeBuilderEvent e)
Called when a build was completed. |
void | gvtBuildFailed(GVTTreeBuilderEvent e)
Called when a build failed. |
void | gvtBuildStarted(GVTTreeBuilderEvent e)
Called when a build started.
|
void | gvtRenderingCancelled(GVTTreeRendererEvent e)
Called when a rendering was cancelled. |
void | gvtRenderingCompleted(GVTTreeRendererEvent e)
Called when a rendering was completed. |
void | gvtRenderingFailed(GVTTreeRendererEvent e)
Called when a rendering failed. |
void | gvtRenderingPrepare(GVTTreeRendererEvent e)
Called when a rendering is in its preparing phase. |
void | gvtRenderingStarted(GVTTreeRendererEvent e)
Called when a rendering started. |
void | hideDebugger()
Hides and destroys the Rhino debugger. |
void | linkActivated(LinkActivationEvent e)
Called when a link was activated. |
void | managerResumed(UpdateManagerEvent e)
Called when the manager was resumed. |
void | managerStarted(UpdateManagerEvent e)
Called when the manager was started. |
void | managerStopped(UpdateManagerEvent e)
Called when the manager was stopped. |
void | managerSuspended(UpdateManagerEvent e)
Called when the manager was suspended. |
static void | registerHandler(SquiggleInputHandler handler)
Registers an input file handler by adding it to the handlers map. |
void | setAutoAdjust(boolean b)
Whether to auto adjust the canvas to the size of the document. |
void | setDebug(boolean b)
Whether to show the debug traces. |
void | setSVGDocument(SVGDocument svgDocument, String svgDocumentURL, String svgDocumentTitle)
Forces the viewer frame to show the input SVGDocument |
void | showDebugger()
Shows the Rhino debugger. |
void | showSVGDocument(String uri)
Shows the given document into the viewer frame |
void | svgLoadEventDispatchCancelled(SVGLoadEventDispatcherEvent e)
Called when a onload event dispatch was cancelled. |
void | svgLoadEventDispatchCompleted(SVGLoadEventDispatcherEvent e)
Called when a onload event dispatch was completed. |
void | svgLoadEventDispatchFailed(SVGLoadEventDispatcherEvent e)
Called when a onload event dispatch failed. |
void | svgLoadEventDispatchStarted(SVGLoadEventDispatcherEvent e)
Called when a onload event dispatch started. |
void | updateCompleted(UpdateManagerEvent e)
Called when an update was completed. |
void | updateFailed(UpdateManagerEvent e)
Called when an update failed. |
void | updateStarted(UpdateManagerEvent e)
Called when an update started. |
Parameters: key the key mapped with the action to get
Throws: MissingListenerException if the action is not found
Parameters: handler the new input handler to register.