Package org.apache.batik.apps.svgbrowser
Class JSVGViewerFrame
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- org.apache.batik.apps.svgbrowser.JSVGViewerFrame
-
- All Implemented Interfaces:
java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable,javax.accessibility.Accessible,javax.swing.RootPaneContainer,javax.swing.WindowConstants,UpdateManagerListener,GVTTreeRendererListener,GVTTreeBuilderListener,LinkActivationListener,SVGDocumentLoaderListener,SVGLoadEventDispatcherListener,ActionMap
public class JSVGViewerFrame extends javax.swing.JFrame implements ActionMap, SVGDocumentLoaderListener, GVTTreeBuilderListener, SVGLoadEventDispatcherListener, GVTTreeRendererListener, LinkActivationListener, UpdateManagerListener
This class represents a SVG viewer swing frame.- Version:
- $Id: JSVGViewerFrame.java 1851346 2019-01-15 13:41:00Z ssteiner $
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classJSVGViewerFrame.AboutActionTo show the about dialogclassJSVGViewerFrame.BackActionTo go back to the previous documentprotected classJSVGViewerFrame.CanvasAn extension of JSVGCanvas that exposes the Rhino interpreter.classJSVGViewerFrame.CloseActionTo close the last document.protected static classJSVGViewerFrame.DebuggerRhino debugger class.classJSVGViewerFrame.DOMViewerActionTo display the DOM viewer of the documentclassJSVGViewerFrame.ExportAsJPGActionTo save the current document as JPG.classJSVGViewerFrame.ExportAsPNGActionTo save the current document as PNG.classJSVGViewerFrame.ExportAsTIFFActionTo save the current document as TIFF.classJSVGViewerFrame.FindDialogActionTo display the Find dialogclassJSVGViewerFrame.FlushActionTo flush image cache (purely for debugging purposes)classJSVGViewerFrame.ForwardActionTo go forward to the next documentclassJSVGViewerFrame.FullScreenActionTo display the document full screenprotected static classJSVGViewerFrame.ImageFileFilterA FileFilter used when exporting the SVG document as an image.classJSVGViewerFrame.MonitorActionTo display the memory monitor.classJSVGViewerFrame.NewWindowActionTo open a new window.classJSVGViewerFrame.NextTransformActionTo go forward to the next transformclassJSVGViewerFrame.OpenActionTo open a new file.classJSVGViewerFrame.OpenLocationActionTo open a new document.classJSVGViewerFrame.PauseActionTo pause a document.classJSVGViewerFrame.PlayActionTo restart after a pause.classJSVGViewerFrame.PreferencesActionTo show the preferences.classJSVGViewerFrame.PreviousTransformActionTo go back to the previous transformclassJSVGViewerFrame.PrintActionTo print the current document.classJSVGViewerFrame.ReloadActionTo reload the current document.classJSVGViewerFrame.SaveAsActionTo save the current document as SVG.classJSVGViewerFrame.SetTransformActionTo show the set transform dialogclassJSVGViewerFrame.StopActionTo stop the current processing.classJSVGViewerFrame.ThumbnailDialogActionTo display the Thumbnail dialogclassJSVGViewerFrame.ToggleDebuggerActionTo toggle visiblity of JavaScript Debugger.protected classJSVGViewerFrame.UserAgentThis class implements a SVG user agent.classJSVGViewerFrame.UseStylesheetActionTo apply the selected author stylesheetclassJSVGViewerFrame.ViewSourceActionTo view the source of the current document.-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringABOUT_ACTIONprotected java.lang.StringalternateStyleSheetThe alternate style-sheet title.protected ApplicationapplicationThe current application.protected booleanautoAdjustThe auto adjust flag.static java.lang.StringBACK_ACTIONprotected JSVGViewerFrame.BackActionbackActionThe back actionprotected static java.util.ResourceBundlebundleThe resource bundlestatic java.lang.StringCLOSE_ACTIONprotected java.io.FilecurrentPathThe current path.protected java.io.FilecurrentSavePathThe current export path.protected booleandebugThe debug flag.protected JSVGViewerFrame.DebuggerdebuggerThe debugger object.static java.awt.CursorDEFAULT_CURSORThe default cursor.protected static SquiggleInputHandlerdefaultHandlerThe default input handlerstatic java.lang.StringDOM_VIEWER_ACTIONprotected DOMViewerdomViewerThe DOM viewer.private static java.lang.StringEOLstatic java.lang.StringEXIT_ACTIONstatic java.lang.StringEXPORT_AS_JPG_ACTIONstatic java.lang.StringEXPORT_AS_PNG_ACTIONstatic java.lang.StringEXPORT_AS_TIFF_ACTIONstatic java.lang.StringFIND_DIALOG_ACTIONprotected FindDialogfindDialogThe Find dialog.static java.lang.StringFLUSH_ACTIONstatic java.lang.StringFORWARD_ACTIONprotected JSVGViewerFrame.ForwardActionforwardActionThe forward actionstatic java.lang.StringFULL_SCREEN_ACTIONprotected static java.util.VectorhandlersThe input handlersprotected static java.lang.StringJDK_1_4_PRESENCE_TEST_CLASSIf the following class can be found (it appeared in JDK 1.4), then we know we are post JDK 1.4.protected java.util.MaplistenersThe map that contains the action listenersprotected LocalHistorylocalHistoryThe local history.protected LocationBarlocationBarThe location bar.protected booleanmanagerStoppedWhether the update manager was stopped.protected static javax.swing.JFramememoryMonitorFrameThe memory monitor frame.static java.lang.StringMONITOR_ACTIONstatic java.lang.StringNEW_WINDOW_ACTIONstatic java.lang.StringNEXT_TRANSFORM_ACTIONprotected JSVGViewerFrame.NextTransformActionnextTransformActionThe next transform actionstatic java.lang.StringOPEN_ACTIONstatic java.lang.StringOPEN_LOCATION_ACTIONprotected static java.lang.StringOPEN_TITLEResource string name for the Open dialog.static java.lang.StringPAUSE_ACTIONprotected JSVGViewerFrame.PauseActionpauseActionThe pause actionstatic java.lang.StringPLAY_ACTIONprotected JSVGViewerFrame.PlayActionplayActionThe play actionstatic java.lang.StringPREFERENCES_ACTIONstatic java.lang.StringPREVIOUS_TRANSFORM_ACTIONprotected JSVGViewerFrame.PreviousTransformActionpreviousTransformActionThe previous transform actionstatic java.lang.StringPRINT_ACTIONprotected static booleanpriorJDK1_4Kind of ugly, but we need to know if we are running before or after 1.4...static java.lang.StringPROPERTY_OS_NAMEName for the os-name propertystatic java.lang.StringPROPERTY_OS_NAME_DEFAULTName for the os.name defaultstatic java.lang.StringPROPERTY_OS_WINDOWS_PREFIXName for the os.name property prefix we are looking for in OpenAction to work around JFileChooser bugstatic java.lang.StringRELOAD_ACTIONstatic java.lang.StringRESET_TRANSFORM_ACTIONprotected static ResourceManagerresourcesThe resource managerstatic java.lang.StringRESOURCESThe gui resources file namestatic java.lang.StringSAVE_AS_ACTIONstatic java.lang.StringSET_TRANSFORM_ACTIONprotected StatusBarstatusBarThe status bar.static java.lang.StringSTOP_ACTIONprotected JSVGViewerFrame.StopActionstopActionThe stop actionprotected JSVGViewerFrame.CanvassvgCanvasThe JSVGCanvas.protected javax.swing.JPanelsvgCanvasPanelThe panel where the svgCanvas is displayedprotected org.w3c.dom.svg.SVGDocumentsvgDocumentThe current document.static java.lang.StringTHUMBNAIL_DIALOG_ACTIONprotected ThumbnailDialogthumbnailDialogThe Find dialog.(package private) longtimeprotected java.lang.StringtitleThe initial frame title.static java.lang.StringTOGGLE_DEBUGGER_ACTIONprotected JAffineTransformChooser.DialogtransformDialogThe transform dialogprotected TransformHistorytransformHistoryThe transform history.protected URIChooseruriChooserThe URI chooser.static java.lang.StringUSE_STYLESHEET_ACTIONprotected SVGUserAgentuserAgentThe SVG user agent.protected JSVGViewerFrame.UseStylesheetActionuseStylesheetActionThe use (author) stylesheet actionstatic java.lang.StringVIEW_SOURCE_ACTIONstatic java.awt.CursorWAIT_CURSORThe cursor indicating that an operation is pending.protected javax.swing.JWindowwindowA window used for full screen displaystatic java.lang.StringZOOM_IN_ACTIONstatic java.lang.StringZOOM_OUT_ACTION-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description JSVGViewerFrame(Application app)Creates a new SVG viewer frame.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Call dispose on canvas as well.voiddocumentLoadingCancelled(SVGDocumentLoaderEvent e)Called when the loading of a document was cancelled.voiddocumentLoadingCompleted(SVGDocumentLoaderEvent e)Called when the loading of a document was completed.voiddocumentLoadingFailed(SVGDocumentLoaderEvent e)Called when the loading of a document has failed.voiddocumentLoadingStarted(SVGDocumentLoaderEvent e)Called when the loading of a document was started.javax.swing.ActiongetAction(java.lang.String key)Returns the action associated with the given string or null on errorprotected static java.util.VectorgetHandlers()Returns the list of input file handler.SquiggleInputHandlergetInputHandler(ParsedURL purl)Returns the input handler for the given URIJSVGCanvasgetJSVGCanvas()Returns the main JSVGCanvas of this frame.voidgvtBuildCancelled(GVTTreeBuilderEvent e)Called when a build was cancelled.voidgvtBuildCompleted(GVTTreeBuilderEvent e)Called when a build was completed.voidgvtBuildFailed(GVTTreeBuilderEvent e)Called when a build failed.voidgvtBuildStarted(GVTTreeBuilderEvent e)Called when a build started.voidgvtRenderingCancelled(GVTTreeRendererEvent e)Called when a rendering was cancelled.voidgvtRenderingCompleted(GVTTreeRendererEvent e)Called when a rendering was completed.voidgvtRenderingFailed(GVTTreeRendererEvent e)Called when a rendering failed.voidgvtRenderingPrepare(GVTTreeRendererEvent e)Called when a rendering is in its preparing phase.voidgvtRenderingStarted(GVTTreeRendererEvent e)Called when a rendering started.voidhideDebugger()Hides and destroys the Rhino debugger.voidlinkActivated(LinkActivationEvent e)Called when a link was activated.private static java.io.FilemakeAbsolute(java.io.File f)Needed to work-around JFileChooser bug with abstract FilesvoidmanagerResumed(UpdateManagerEvent e)Called when the manager was resumed.voidmanagerStarted(UpdateManagerEvent e)Called when the manager was started.voidmanagerStopped(UpdateManagerEvent e)Called when the manager was stopped.voidmanagerSuspended(UpdateManagerEvent e)Called when the manager was suspended.static voidregisterHandler(SquiggleInputHandler handler)Registers an input file handler by adding it to the handlers map.voidsetAutoAdjust(boolean b)Whether to auto adjust the canvas to the size of the document.voidsetDebug(boolean b)Whether to show the debug traces.voidsetSVGDocument(org.w3c.dom.svg.SVGDocument svgDocument, java.lang.String svgDocumentURL, java.lang.String svgDocumentTitle)Forces the viewer frame to show the input SVGDocumentvoidshowDebugger()Shows the Rhino debugger.voidshowSVGDocument(java.lang.String uri)Shows the given document into the viewer framevoidsvgLoadEventDispatchCancelled(SVGLoadEventDispatcherEvent e)Called when a onload event dispatch was cancelled.voidsvgLoadEventDispatchCompleted(SVGLoadEventDispatcherEvent e)Called when a onload event dispatch was completed.voidsvgLoadEventDispatchFailed(SVGLoadEventDispatcherEvent e)Called when a onload event dispatch failed.voidsvgLoadEventDispatchStarted(SVGLoadEventDispatcherEvent e)Called when a onload event dispatch started.voidupdateCompleted(UpdateManagerEvent e)Called when an update was completed.voidupdateFailed(UpdateManagerEvent e)Called when an update failed.voidupdateStarted(UpdateManagerEvent e)Called when an update started.-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
EOL
private static java.lang.String EOL
-
priorJDK1_4
protected static boolean priorJDK1_4
Kind of ugly, but we need to know if we are running before or after 1.4...
-
JDK_1_4_PRESENCE_TEST_CLASS
protected static final java.lang.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.- See Also:
- Constant Field Values
-
RESOURCES
public static final java.lang.String RESOURCES
The gui resources file name- See Also:
- Constant Field Values
-
ABOUT_ACTION
public static final java.lang.String ABOUT_ACTION
- See Also:
- Constant Field Values
-
OPEN_ACTION
public static final java.lang.String OPEN_ACTION
- See Also:
- Constant Field Values
-
OPEN_LOCATION_ACTION
public static final java.lang.String OPEN_LOCATION_ACTION
- See Also:
- Constant Field Values
-
NEW_WINDOW_ACTION
public static final java.lang.String NEW_WINDOW_ACTION
- See Also:
- Constant Field Values
-
RELOAD_ACTION
public static final java.lang.String RELOAD_ACTION
- See Also:
- Constant Field Values
-
SAVE_AS_ACTION
public static final java.lang.String SAVE_AS_ACTION
- See Also:
- Constant Field Values
-
BACK_ACTION
public static final java.lang.String BACK_ACTION
- See Also:
- Constant Field Values
-
FORWARD_ACTION
public static final java.lang.String FORWARD_ACTION
- See Also:
- Constant Field Values
-
FULL_SCREEN_ACTION
public static final java.lang.String FULL_SCREEN_ACTION
- See Also:
- Constant Field Values
-
PRINT_ACTION
public static final java.lang.String PRINT_ACTION
- See Also:
- Constant Field Values
-
EXPORT_AS_JPG_ACTION
public static final java.lang.String EXPORT_AS_JPG_ACTION
- See Also:
- Constant Field Values
-
EXPORT_AS_PNG_ACTION
public static final java.lang.String EXPORT_AS_PNG_ACTION
- See Also:
- Constant Field Values
-
EXPORT_AS_TIFF_ACTION
public static final java.lang.String EXPORT_AS_TIFF_ACTION
- See Also:
- Constant Field Values
-
PREFERENCES_ACTION
public static final java.lang.String PREFERENCES_ACTION
- See Also:
- Constant Field Values
-
CLOSE_ACTION
public static final java.lang.String CLOSE_ACTION
- See Also:
- Constant Field Values
-
VIEW_SOURCE_ACTION
public static final java.lang.String VIEW_SOURCE_ACTION
- See Also:
- Constant Field Values
-
EXIT_ACTION
public static final java.lang.String EXIT_ACTION
- See Also:
- Constant Field Values
-
RESET_TRANSFORM_ACTION
public static final java.lang.String RESET_TRANSFORM_ACTION
- See Also:
- Constant Field Values
-
ZOOM_IN_ACTION
public static final java.lang.String ZOOM_IN_ACTION
- See Also:
- Constant Field Values
-
ZOOM_OUT_ACTION
public static final java.lang.String ZOOM_OUT_ACTION
- See Also:
- Constant Field Values
-
PREVIOUS_TRANSFORM_ACTION
public static final java.lang.String PREVIOUS_TRANSFORM_ACTION
- See Also:
- Constant Field Values
-
NEXT_TRANSFORM_ACTION
public static final java.lang.String NEXT_TRANSFORM_ACTION
- See Also:
- Constant Field Values
-
USE_STYLESHEET_ACTION
public static final java.lang.String USE_STYLESHEET_ACTION
- See Also:
- Constant Field Values
-
PLAY_ACTION
public static final java.lang.String PLAY_ACTION
- See Also:
- Constant Field Values
-
PAUSE_ACTION
public static final java.lang.String PAUSE_ACTION
- See Also:
- Constant Field Values
-
STOP_ACTION
public static final java.lang.String STOP_ACTION
- See Also:
- Constant Field Values
-
MONITOR_ACTION
public static final java.lang.String MONITOR_ACTION
- See Also:
- Constant Field Values
-
DOM_VIEWER_ACTION
public static final java.lang.String DOM_VIEWER_ACTION
- See Also:
- Constant Field Values
-
SET_TRANSFORM_ACTION
public static final java.lang.String SET_TRANSFORM_ACTION
- See Also:
- Constant Field Values
-
FIND_DIALOG_ACTION
public static final java.lang.String FIND_DIALOG_ACTION
- See Also:
- Constant Field Values
-
THUMBNAIL_DIALOG_ACTION
public static final java.lang.String THUMBNAIL_DIALOG_ACTION
- See Also:
- Constant Field Values
-
FLUSH_ACTION
public static final java.lang.String FLUSH_ACTION
- See Also:
- Constant Field Values
-
TOGGLE_DEBUGGER_ACTION
public static final java.lang.String TOGGLE_DEBUGGER_ACTION
- See Also:
- Constant Field Values
-
WAIT_CURSOR
public static final java.awt.Cursor WAIT_CURSOR
The cursor indicating that an operation is pending.
-
DEFAULT_CURSOR
public static final java.awt.Cursor DEFAULT_CURSOR
The default cursor.
-
PROPERTY_OS_NAME
public static final java.lang.String PROPERTY_OS_NAME
Name for the os-name property
-
PROPERTY_OS_NAME_DEFAULT
public static final java.lang.String PROPERTY_OS_NAME_DEFAULT
Name for the os.name default
-
PROPERTY_OS_WINDOWS_PREFIX
public static final java.lang.String PROPERTY_OS_WINDOWS_PREFIX
Name for the os.name property prefix we are looking for in OpenAction to work around JFileChooser bug
-
OPEN_TITLE
protected static final java.lang.String OPEN_TITLE
Resource string name for the Open dialog.- See Also:
- Constant Field Values
-
handlers
protected static java.util.Vector handlers
The input handlers
-
defaultHandler
protected static SquiggleInputHandler defaultHandler
The default input handler
-
bundle
protected static java.util.ResourceBundle bundle
The resource bundle
-
resources
protected static ResourceManager resources
The resource manager
-
application
protected Application application
The current application.
-
svgCanvas
protected JSVGViewerFrame.Canvas svgCanvas
The JSVGCanvas.
-
svgCanvasPanel
protected javax.swing.JPanel svgCanvasPanel
The panel where the svgCanvas is displayed
-
window
protected javax.swing.JWindow window
A window used for full screen display
-
memoryMonitorFrame
protected static javax.swing.JFrame memoryMonitorFrame
The memory monitor frame.
-
currentPath
protected java.io.File currentPath
The current path.
-
currentSavePath
protected java.io.File currentSavePath
The current export path.
-
backAction
protected JSVGViewerFrame.BackAction backAction
The back action
-
forwardAction
protected JSVGViewerFrame.ForwardAction forwardAction
The forward action
-
playAction
protected JSVGViewerFrame.PlayAction playAction
The play action
-
pauseAction
protected JSVGViewerFrame.PauseAction pauseAction
The pause action
-
stopAction
protected JSVGViewerFrame.StopAction stopAction
The stop action
-
previousTransformAction
protected JSVGViewerFrame.PreviousTransformAction previousTransformAction
The previous transform action
-
nextTransformAction
protected JSVGViewerFrame.NextTransformAction nextTransformAction
The next transform action
-
useStylesheetAction
protected JSVGViewerFrame.UseStylesheetAction useStylesheetAction
The use (author) stylesheet action
-
debug
protected boolean debug
The debug flag.
-
autoAdjust
protected boolean autoAdjust
The auto adjust flag.
-
managerStopped
protected boolean managerStopped
Whether the update manager was stopped.
-
userAgent
protected SVGUserAgent userAgent
The SVG user agent.
-
svgDocument
protected org.w3c.dom.svg.SVGDocument svgDocument
The current document.
-
uriChooser
protected URIChooser uriChooser
The URI chooser.
-
domViewer
protected DOMViewer domViewer
The DOM viewer.
-
findDialog
protected FindDialog findDialog
The Find dialog.
-
thumbnailDialog
protected ThumbnailDialog thumbnailDialog
The Find dialog.
-
transformDialog
protected JAffineTransformChooser.Dialog transformDialog
The transform dialog
-
locationBar
protected LocationBar locationBar
The location bar.
-
statusBar
protected StatusBar statusBar
The status bar.
-
title
protected java.lang.String title
The initial frame title.
-
localHistory
protected LocalHistory localHistory
The local history.
-
transformHistory
protected TransformHistory transformHistory
The transform history.
-
alternateStyleSheet
protected java.lang.String alternateStyleSheet
The alternate style-sheet title.
-
debugger
protected JSVGViewerFrame.Debugger debugger
The debugger object.
-
listeners
protected java.util.Map listeners
The map that contains the action listeners
-
time
long time
-
-
Constructor Detail
-
JSVGViewerFrame
public JSVGViewerFrame(Application app)
Creates a new SVG viewer frame.
-
-
Method Detail
-
dispose
public void dispose()
Call dispose on canvas as well.- Overrides:
disposein classjava.awt.Window
-
setDebug
public void setDebug(boolean b)
Whether to show the debug traces.
-
setAutoAdjust
public void setAutoAdjust(boolean b)
Whether to auto adjust the canvas to the size of the document.
-
getJSVGCanvas
public JSVGCanvas getJSVGCanvas()
Returns the main JSVGCanvas of this frame.
-
makeAbsolute
private static java.io.File makeAbsolute(java.io.File f)
Needed to work-around JFileChooser bug with abstract Files
-
showDebugger
public void showDebugger()
Shows the Rhino debugger.
-
hideDebugger
public void hideDebugger()
Hides and destroys the Rhino debugger.
-
showSVGDocument
public void showSVGDocument(java.lang.String uri)
Shows the given document into the viewer frame
-
getInputHandler
public SquiggleInputHandler getInputHandler(ParsedURL purl) throws java.io.IOException
Returns the input handler for the given URI- Throws:
java.io.IOException
-
getHandlers
protected static java.util.Vector getHandlers()
Returns the list of input file handler.
-
registerHandler
public static void registerHandler(SquiggleInputHandler handler)
Registers an input file handler by adding it to the handlers map.- Parameters:
handler- the new input handler to register.
-
getAction
public javax.swing.Action getAction(java.lang.String key) throws MissingListenerExceptionReturns the action associated with the given string or null on error- Specified by:
getActionin interfaceActionMap- Parameters:
key- the key mapped with the action to get- Throws:
MissingListenerException- if the action is not found
-
documentLoadingStarted
public void documentLoadingStarted(SVGDocumentLoaderEvent e)
Called when the loading of a document was started.- Specified by:
documentLoadingStartedin interfaceSVGDocumentLoaderListener
-
documentLoadingCompleted
public void documentLoadingCompleted(SVGDocumentLoaderEvent e)
Called when the loading of a document was completed.- Specified by:
documentLoadingCompletedin interfaceSVGDocumentLoaderListener
-
setSVGDocument
public void setSVGDocument(org.w3c.dom.svg.SVGDocument svgDocument, java.lang.String svgDocumentURL, java.lang.String svgDocumentTitle)Forces the viewer frame to show the input SVGDocument
-
documentLoadingCancelled
public void documentLoadingCancelled(SVGDocumentLoaderEvent e)
Called when the loading of a document was cancelled.- Specified by:
documentLoadingCancelledin interfaceSVGDocumentLoaderListener
-
documentLoadingFailed
public void documentLoadingFailed(SVGDocumentLoaderEvent e)
Called when the loading of a document has failed.- Specified by:
documentLoadingFailedin interfaceSVGDocumentLoaderListener
-
gvtBuildStarted
public void gvtBuildStarted(GVTTreeBuilderEvent e)
Called when a build started. The data of the event is initialized to the old document.- Specified by:
gvtBuildStartedin interfaceGVTTreeBuilderListener
-
gvtBuildCompleted
public void gvtBuildCompleted(GVTTreeBuilderEvent e)
Called when a build was completed.- Specified by:
gvtBuildCompletedin interfaceGVTTreeBuilderListener
-
gvtBuildCancelled
public void gvtBuildCancelled(GVTTreeBuilderEvent e)
Called when a build was cancelled.- Specified by:
gvtBuildCancelledin interfaceGVTTreeBuilderListener
-
gvtBuildFailed
public void gvtBuildFailed(GVTTreeBuilderEvent e)
Called when a build failed.- Specified by:
gvtBuildFailedin interfaceGVTTreeBuilderListener
-
svgLoadEventDispatchStarted
public void svgLoadEventDispatchStarted(SVGLoadEventDispatcherEvent e)
Called when a onload event dispatch started.- Specified by:
svgLoadEventDispatchStartedin interfaceSVGLoadEventDispatcherListener
-
svgLoadEventDispatchCompleted
public void svgLoadEventDispatchCompleted(SVGLoadEventDispatcherEvent e)
Called when a onload event dispatch was completed.- Specified by:
svgLoadEventDispatchCompletedin interfaceSVGLoadEventDispatcherListener
-
svgLoadEventDispatchCancelled
public void svgLoadEventDispatchCancelled(SVGLoadEventDispatcherEvent e)
Called when a onload event dispatch was cancelled.- Specified by:
svgLoadEventDispatchCancelledin interfaceSVGLoadEventDispatcherListener
-
svgLoadEventDispatchFailed
public void svgLoadEventDispatchFailed(SVGLoadEventDispatcherEvent e)
Called when a onload event dispatch failed.- Specified by:
svgLoadEventDispatchFailedin interfaceSVGLoadEventDispatcherListener
-
gvtRenderingPrepare
public void gvtRenderingPrepare(GVTTreeRendererEvent e)
Called when a rendering is in its preparing phase.- Specified by:
gvtRenderingPreparein interfaceGVTTreeRendererListener
-
gvtRenderingStarted
public void gvtRenderingStarted(GVTTreeRendererEvent e)
Called when a rendering started.- Specified by:
gvtRenderingStartedin interfaceGVTTreeRendererListener
-
gvtRenderingCompleted
public void gvtRenderingCompleted(GVTTreeRendererEvent e)
Called when a rendering was completed.- Specified by:
gvtRenderingCompletedin interfaceGVTTreeRendererListener
-
gvtRenderingCancelled
public void gvtRenderingCancelled(GVTTreeRendererEvent e)
Called when a rendering was cancelled.- Specified by:
gvtRenderingCancelledin interfaceGVTTreeRendererListener
-
gvtRenderingFailed
public void gvtRenderingFailed(GVTTreeRendererEvent e)
Called when a rendering failed.- Specified by:
gvtRenderingFailedin interfaceGVTTreeRendererListener
-
linkActivated
public void linkActivated(LinkActivationEvent e)
Called when a link was activated.- Specified by:
linkActivatedin interfaceLinkActivationListener
-
managerStarted
public void managerStarted(UpdateManagerEvent e)
Called when the manager was started.- Specified by:
managerStartedin interfaceUpdateManagerListener
-
managerSuspended
public void managerSuspended(UpdateManagerEvent e)
Called when the manager was suspended.- Specified by:
managerSuspendedin interfaceUpdateManagerListener
-
managerResumed
public void managerResumed(UpdateManagerEvent e)
Called when the manager was resumed.- Specified by:
managerResumedin interfaceUpdateManagerListener
-
managerStopped
public void managerStopped(UpdateManagerEvent e)
Called when the manager was stopped.- Specified by:
managerStoppedin interfaceUpdateManagerListener
-
updateStarted
public void updateStarted(UpdateManagerEvent e)
Called when an update started.- Specified by:
updateStartedin interfaceUpdateManagerListener
-
updateCompleted
public void updateCompleted(UpdateManagerEvent e)
Called when an update was completed.- Specified by:
updateCompletedin interfaceUpdateManagerListener
-
updateFailed
public void updateFailed(UpdateManagerEvent e)
Called when an update failed.- Specified by:
updateFailedin interfaceUpdateManagerListener
-
-