Package org.apache.batik.swing
Class JSVGCanvas
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- org.apache.batik.swing.gvt.JGVTComponent
-
- org.apache.batik.swing.svg.JSVGComponent
-
- org.apache.batik.swing.JSVGCanvas
-
- All Implemented Interfaces:
java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable
- Direct Known Subclasses:
JSVGViewerFrame.Canvas
public class JSVGCanvas extends JSVGComponent
This class represents a general-purpose swing SVG component. TheJSVGCanvasdoes not provided additional functionalities compared to theJSVGComponentbut simply provides an API conformed to the JavaBean specification. The only major change between theJSVGComponentand this component is that interactors and text selection are activated by default.- Version:
- $Id: JSVGCanvas.java 1851346 2019-01-15 13:41:00Z ssteiner $
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classJSVGCanvas.AffineActionA swing action to append an affine transform to the current rendering transform.protected classJSVGCanvas.CanvasSVGListenerTo hide the listener methods.protected classJSVGCanvas.CanvasUserAgentTheCanvasUserAgentonly adds tooltips to the behavior of the defaultBridgeUserAgent.protected static classJSVGCanvas.LocationListenerHelper class.classJSVGCanvas.ResetTransformActionA swing action to reset the rendering transform of the canvas.classJSVGCanvas.RotateActionA swing action to Rotate the canvas.classJSVGCanvas.ScrollActionA swing action to Pan/scroll the canvas.classJSVGCanvas.ScrollDownActionA swing action to scroll the canvas down, by a fixed amountclassJSVGCanvas.ScrollLeftActionA swing action to scroll the canvas to the left, by a fixed amountclassJSVGCanvas.ScrollRightActionA swing action to scroll the canvas to the right, by a fixed amountclassJSVGCanvas.ScrollUpActionA swing action to scroll the canvas up, by a fixed amountprotected classJSVGCanvas.ToolTipModifierSets a specific tooltip on the JSVGCanvas when a given event occurs.protected classJSVGCanvas.ToolTipRunnableclassJSVGCanvas.ZoomActionA swing action to apply a zoom factor to the canvas.classJSVGCanvas.ZoomInActionA swing action to zoom in the canvas.classJSVGCanvas.ZoomOutActionA swing action to zoom out the canvas.-
Nested classes/interfaces inherited from class org.apache.batik.swing.svg.JSVGComponent
JSVGComponent.BridgeUserAgent, JSVGComponent.BridgeUserAgentWrapper, JSVGComponent.JSVGComponentListener, JSVGComponent.SVGListener
-
Nested classes/interfaces inherited from class org.apache.batik.swing.gvt.JGVTComponent
JGVTComponent.Listener, JGVTComponent.UnixTextSelectionListener
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFAST_SCROLL_DOWN_ACTIONThe key for the Action to quickly scroll down.static java.lang.StringFAST_SCROLL_LEFT_ACTIONThe key for the Action to quickly scroll left.static java.lang.StringFAST_SCROLL_RIGHT_ACTIONThe key for the Action to quickly scroll right.static java.lang.StringFAST_SCROLL_UP_ACTIONThe key for the Action to quickly scroll up.protected InteractorimageZoomInteractorAn interactor to perform a realtime zoom.private booleanisImageZoomInteractorEnabledThis flag bit indicates whether or not the image zoom interactor is enabled.private booleanisPanInteractorEnabledThis flag bit indicates whether or not the pan interactor is enabled.private booleanisResetTransformInteractorEnabledThis flag bit indicates whether or not the reset transform interactor is enabled.private booleanisRotateInteractorEnabledThis flag bit indicates whether or not the rotate interactor is enabled.private booleanisZoomInteractorEnabledThis flag bit indicates whether or not the zoom interactor is enabled.protected org.w3c.dom.events.EventTargetlastTargetprotected org.w3c.dom.events.EventTargetlastToolTipEventTargetThe target for which the last tool tip event was fired.protected longlastToolTipEventTimeStampThe time of the last tool tip event.protected JSVGCanvas.LocationListenerlocationListenerKeeps track of the last known mouse position over the canvas.protected static java.lang.ObjectMAP_TOKENThis is used as the value in the toolTipDocs WeakHashMap.protected InteractorpanInteractorAn interactor to perform a translation.protected java.beans.PropertyChangeSupportpcsThePropertyChangeSupportused to firePropertyChangeEvent.static java.lang.StringRESET_TRANSFORM_ACTIONThe key for the Action to reset the transform.protected InteractorresetTransformInteractorAn interactor to reset the rendering transform.protected InteractorrotateInteractorAn interactor to perform a rotation.static java.lang.StringSCROLL_DOWN_ACTIONThe key for the Action to scroll down.static java.lang.StringSCROLL_LEFT_ACTIONThe key for the Action to scroll left.static java.lang.StringSCROLL_RIGHT_ACTIONThe key for the Action to scroll right.static java.lang.StringSCROLL_UP_ACTIONThe key for the Action to scroll up.protected java.util.MaptoolTipDocsprotected org.w3c.dom.events.EventListenertoolTipListenerprotected java.util.MaptoolTipMapMapping of elements to listeners so they can be removed, if the tooltip is removed.protected java.lang.StringuriThe URI of the current document being displayed.static java.lang.StringZOOM_IN_ACTIONThe key for the Action to zoom in.static java.lang.StringZOOM_OUT_ACTIONThe key for the Action to zoom out.protected InteractorzoomInteractorAn interactor to perform a zoom.-
Fields inherited from class org.apache.batik.swing.svg.JSVGComponent
afterStopRunnable, ALWAYS_DYNAMIC, ALWAYS_INTERACTIVE, ALWAYS_STATIC, animationLimitingAmount, animationLimitingMode, AUTODETECT, bridgeContext, BROKEN_LINK_TITLE, documentLoader, documentState, FEATURES, fragmentIdentifier, gvtTreeBuilder, gvtTreeBuilderListeners, isDynamicDocument, isInteractiveDocument, jsvgComponentListener, linkActivationListeners, loader, nextDocumentLoader, nextGVTTreeBuilder, nextUpdateManager, prevComponentSize, recenterOnResize, SCRIPT_ALERT, SCRIPT_CONFIRM, SCRIPT_PROMPT, selfCallingDisableInteractions, svgDocument, svgDocumentLoaderListeners, svgLoadEventDispatcher, svgLoadEventDispatcherListeners, svgUserAgent, updateManager, updateManagerListeners, updateOverlay, userAgent, userSetDisableInteractions, viewingTransform
-
Fields inherited from class org.apache.batik.swing.gvt.JGVTComponent
disableInteractions, doubleBufferedRendering, eventDispatcher, eventsEnabled, gvtRoot, gvtTreeRenderer, gvtTreeRendererListeners, image, initialTransform, interactor, interactors, jgvtListeners, listener, needRender, overlays, paintingTransform, progressivePaint, progressivePaintThread, renderer, rendererFactory, renderingTransform, selectableText, suspendInteractions, textSelectionManager, useUnixTextSelection
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description JSVGCanvas()Creates a new JSVGCanvas.JSVGCanvas(SVGUserAgent ua, boolean eventsEnabled, boolean selectableText)Creates a new JSVGCanvas.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener pcl)Adds the specifiedPropertyChangeListener.voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener pcl)Adds the specifiedPropertyChangeListenerfor the specified property.protected JGVTComponent.ListenercreateListener()Creates an instance of Listener.protected UserAgentcreateUserAgent()Creates a UserAgent.booleangetEnableImageZoomInteractor()Returns true if the image zoom interactor is enabled, false otherwise.booleangetEnablePanInteractor()Returns true if the pan interactor is enabled, false otherwise.booleangetEnableResetTransformInteractor()Returns true if the reset transform interactor is enabled, false otherwise.booleangetEnableRotateInteractor()Returns true if the rotate interactor is enabled, false otherwise.booleangetEnableZoomInteractor()Returns true if the zoom interactor is enabled, false otherwise.java.lang.StringgetURI()Returns the URI of the current document.protected voidinstallActions()Builds the ActionMap of this canvas with a set of predefinedActions.protected voidinstallKeyboardActions()Builds the InputMap of this canvas with a set of predefinedActions.protected voidinstallSVGDocument(org.w3c.dom.svg.SVGDocument doc)This does the real work of installing the SVG Document after the update manager from the previous document (if any) has been properly 'shut down'.booleanmatchLastToolTipEvent(long t, org.w3c.dom.events.EventTarget et)Checks if the specified event time and element are the same as the last tool tip event.voidremovePropertyChangeListener(java.beans.PropertyChangeListener pcl)Removes the specifiedPropertyChangeListener.voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener pcl)Removes the specifiedPropertyChangeListenerfor the specified property.voidsetDisableInteractions(boolean b)Turn off all 'interactor' objects (pan, zoom, etc) if 'b' is true, turn them on if 'b' is false.voidsetEnableImageZoomInteractor(boolean b)Determines whether the image zoom interactor is enabled or not.voidsetEnablePanInteractor(boolean b)Determines whether the pan interactor is enabled or not.voidsetEnableResetTransformInteractor(boolean b)Determines whether the reset transform interactor is enabled or not.voidsetEnableRotateInteractor(boolean b)Determines whether the rotate interactor is enabled or not.voidsetEnableZoomInteractor(boolean b)Determines whether the zoom interactor is enabled or not.voidsetLastToolTipEvent(long t, org.w3c.dom.events.EventTarget et)Sets the time and element of the last tool tip event handled.voidsetURI(java.lang.String newURI)Sets the URI to the specified uri.-
Methods inherited from class org.apache.batik.swing.svg.JSVGComponent
addGVTTreeBuilderListener, addLinkActivationListener, addSVGDocumentLoaderListener, addSVGLoadEventDispatcherListener, addUpdateManagerListener, calculateViewingTransform, clearUserSetDisableInteractions, computeRenderingTransform, createBridgeContext, createImageRenderer, dispose, flushImageCache, getCanvasGraphicsNode, getCanvasGraphicsNode, getFragmentIdentifier, getInterpreter, getRecenterOnResize, getSVGDocument, getSVGDocumentSize, getUpdateManager, getViewBoxTransform, getViewingTransform, handleException, isDynamic, isInteractive, loadSVGDocument, removeGVTTreeBuilderListener, removeLinkActivationListener, removeSVGDocumentLoaderListener, removeSVGLoadEventDispatcherListener, removeUpdateManagerListener, renderGVTTree, resumeProcessing, setAnimationLimitingCPU, setAnimationLimitingFPS, setAnimationLimitingNone, setBridgeContextAnimationLimitingMode, setDocument, setDocumentState, setFragmentIdentifier, setGraphicsNode, setMySize, setRecenterOnResize, setSVGDocument, showAlert, showConfirm, showPrompt, showPrompt, startGVTTreeBuilder, startSVGLoadEventDispatcher, stopProcessing, stopThenRun, suspendProcessing, updateRenderingTransform, updateZoomAndPanEnable
-
Methods inherited from class org.apache.batik.swing.gvt.JGVTComponent
addAWTListeners, addGVTTreeRendererListener, addJGVTComponentListener, createEventDispatcher, createTextSelectionManager, deselectAll, flush, flush, getDisableInteractions, getDoubleBufferedRendering, getGraphicsNode, getInitialTransform, getInteractors, getOffScreen, getOverlays, getPaintingTransform, getProgressivePaint, getRenderingTransform, getRenderRect, getSelectionOverlayColor, getSelectionOverlayStrokeColor, getTextSelectionManager, getUseUnixTextSelection, immediateRepaint, initializeEventHandling, isSelectionOverlayXORMode, paintComponent, releaseRenderingReferences, removeGVTTreeRendererListener, removeJGVTComponentListener, resetRenderingTransform, scheduleGVTRendering, select, setDoubleBufferedRendering, setGraphicsNode, setPaintingTransform, setProgressivePaint, setRenderingTransform, setRenderingTransform, setSelectionOverlayColor, setSelectionOverlayStrokeColor, setSelectionOverlayXORMode, setUseUnixTextSelection
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
SCROLL_RIGHT_ACTION
public static final java.lang.String SCROLL_RIGHT_ACTION
The key for the Action to scroll right.- See Also:
- Constant Field Values
-
SCROLL_LEFT_ACTION
public static final java.lang.String SCROLL_LEFT_ACTION
The key for the Action to scroll left.- See Also:
- Constant Field Values
-
SCROLL_UP_ACTION
public static final java.lang.String SCROLL_UP_ACTION
The key for the Action to scroll up.- See Also:
- Constant Field Values
-
SCROLL_DOWN_ACTION
public static final java.lang.String SCROLL_DOWN_ACTION
The key for the Action to scroll down.- See Also:
- Constant Field Values
-
FAST_SCROLL_RIGHT_ACTION
public static final java.lang.String FAST_SCROLL_RIGHT_ACTION
The key for the Action to quickly scroll right.- See Also:
- Constant Field Values
-
FAST_SCROLL_LEFT_ACTION
public static final java.lang.String FAST_SCROLL_LEFT_ACTION
The key for the Action to quickly scroll left.- See Also:
- Constant Field Values
-
FAST_SCROLL_UP_ACTION
public static final java.lang.String FAST_SCROLL_UP_ACTION
The key for the Action to quickly scroll up.- See Also:
- Constant Field Values
-
FAST_SCROLL_DOWN_ACTION
public static final java.lang.String FAST_SCROLL_DOWN_ACTION
The key for the Action to quickly scroll down.- See Also:
- Constant Field Values
-
ZOOM_IN_ACTION
public static final java.lang.String ZOOM_IN_ACTION
The key for the Action to zoom in.- See Also:
- Constant Field Values
-
ZOOM_OUT_ACTION
public static final java.lang.String ZOOM_OUT_ACTION
The key for the Action to zoom out.- See Also:
- Constant Field Values
-
RESET_TRANSFORM_ACTION
public static final java.lang.String RESET_TRANSFORM_ACTION
The key for the Action to reset the transform.- See Also:
- Constant Field Values
-
isZoomInteractorEnabled
private boolean isZoomInteractorEnabled
This flag bit indicates whether or not the zoom interactor is enabled. True means the zoom interactor is functional.
-
isImageZoomInteractorEnabled
private boolean isImageZoomInteractorEnabled
This flag bit indicates whether or not the image zoom interactor is enabled. True means the image zoom interactor is functional.
-
isPanInteractorEnabled
private boolean isPanInteractorEnabled
This flag bit indicates whether or not the pan interactor is enabled. True means the pan interactor is functional.
-
isRotateInteractorEnabled
private boolean isRotateInteractorEnabled
This flag bit indicates whether or not the rotate interactor is enabled. True means the rotate interactor is functional.
-
isResetTransformInteractorEnabled
private boolean isResetTransformInteractorEnabled
This flag bit indicates whether or not the reset transform interactor is enabled. True means the reset transform interactor is functional.
-
pcs
protected java.beans.PropertyChangeSupport pcs
ThePropertyChangeSupportused to firePropertyChangeEvent.
-
uri
protected java.lang.String uri
The URI of the current document being displayed.
-
locationListener
protected JSVGCanvas.LocationListener locationListener
Keeps track of the last known mouse position over the canvas. This is used for displaying tooltips at the right location.
-
toolTipMap
protected java.util.Map toolTipMap
Mapping of elements to listeners so they can be removed, if the tooltip is removed.
-
toolTipListener
protected org.w3c.dom.events.EventListener toolTipListener
-
lastTarget
protected org.w3c.dom.events.EventTarget lastTarget
-
toolTipDocs
protected java.util.Map toolTipDocs
-
MAP_TOKEN
protected static final java.lang.Object MAP_TOKEN
This is used as the value in the toolTipDocs WeakHashMap. This way we can tell if a document has already been added.
-
lastToolTipEventTimeStamp
protected long lastToolTipEventTimeStamp
The time of the last tool tip event.
-
lastToolTipEventTarget
protected org.w3c.dom.events.EventTarget lastToolTipEventTarget
The target for which the last tool tip event was fired.
-
zoomInteractor
protected Interactor zoomInteractor
An interactor to perform a zoom.Binding: BUTTON1 + CTRL Key
-
imageZoomInteractor
protected Interactor imageZoomInteractor
An interactor to perform a realtime zoom.Binding: BUTTON3 + SHIFT Key
-
panInteractor
protected Interactor panInteractor
An interactor to perform a translation.Binding: BUTTON1 + SHIFT Key
-
rotateInteractor
protected Interactor rotateInteractor
An interactor to perform a rotation.Binding: BUTTON3 + CTRL Key
-
resetTransformInteractor
protected Interactor resetTransformInteractor
An interactor to reset the rendering transform.Binding: CTRL+SHIFT+BUTTON3
-
-
Constructor Detail
-
JSVGCanvas
public JSVGCanvas()
Creates a new JSVGCanvas.
-
JSVGCanvas
public JSVGCanvas(SVGUserAgent ua, boolean eventsEnabled, boolean selectableText)
Creates a new JSVGCanvas.- Parameters:
ua- a SVGUserAgent instance or null.eventsEnabled- Whether the GVT tree should be reactive to mouse and key events.selectableText- Whether the text should be selectable.
-
-
Method Detail
-
installActions
protected void installActions()
Builds the ActionMap of this canvas with a set of predefinedActions.
-
setDisableInteractions
public void setDisableInteractions(boolean b)
Description copied from class:JGVTComponentTurn off all 'interactor' objects (pan, zoom, etc) if 'b' is true, turn them on if 'b' is false.- Overrides:
setDisableInteractionsin classJSVGComponent
-
installKeyboardActions
protected void installKeyboardActions()
Builds the InputMap of this canvas with a set of predefinedActions.
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Adds the specifiedPropertyChangeListener.- Overrides:
addPropertyChangeListenerin classjava.awt.Container- Parameters:
pcl- the property change listener to add
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Removes the specifiedPropertyChangeListener.- Overrides:
removePropertyChangeListenerin classjava.awt.Component- Parameters:
pcl- the property change listener to remove
-
addPropertyChangeListener
public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener pcl)Adds the specifiedPropertyChangeListenerfor the specified property.- Overrides:
addPropertyChangeListenerin classjava.awt.Container- Parameters:
propertyName- the name of the property to listen onpcl- the property change listener to add
-
removePropertyChangeListener
public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener pcl)Removes the specifiedPropertyChangeListenerfor the specified property.- Overrides:
removePropertyChangeListenerin classjava.awt.Component- Parameters:
propertyName- the name of the property that was listened onpcl- the property change listener to remove
-
setEnableZoomInteractor
public void setEnableZoomInteractor(boolean b)
Determines whether the zoom interactor is enabled or not.
-
getEnableZoomInteractor
public boolean getEnableZoomInteractor()
Returns true if the zoom interactor is enabled, false otherwise.
-
setEnableImageZoomInteractor
public void setEnableImageZoomInteractor(boolean b)
Determines whether the image zoom interactor is enabled or not.
-
getEnableImageZoomInteractor
public boolean getEnableImageZoomInteractor()
Returns true if the image zoom interactor is enabled, false otherwise.
-
setEnablePanInteractor
public void setEnablePanInteractor(boolean b)
Determines whether the pan interactor is enabled or not.
-
getEnablePanInteractor
public boolean getEnablePanInteractor()
Returns true if the pan interactor is enabled, false otherwise.
-
setEnableRotateInteractor
public void setEnableRotateInteractor(boolean b)
Determines whether the rotate interactor is enabled or not.
-
getEnableRotateInteractor
public boolean getEnableRotateInteractor()
Returns true if the rotate interactor is enabled, false otherwise.
-
setEnableResetTransformInteractor
public void setEnableResetTransformInteractor(boolean b)
Determines whether the reset transform interactor is enabled or not.
-
getEnableResetTransformInteractor
public boolean getEnableResetTransformInteractor()
Returns true if the reset transform interactor is enabled, false otherwise.
-
getURI
public java.lang.String getURI()
Returns the URI of the current document.
-
setURI
public void setURI(java.lang.String newURI)
Sets the URI to the specified uri. If the input 'newURI' string is null, then the canvas will display an empty document.- Parameters:
newURI- the new uri of the document to display
-
createUserAgent
protected UserAgent createUserAgent()
Creates a UserAgent.- Overrides:
createUserAgentin classJSVGComponent
-
createListener
protected JGVTComponent.Listener createListener()
Creates an instance of Listener.- Overrides:
createListenerin classJSVGComponent
-
installSVGDocument
protected void installSVGDocument(org.w3c.dom.svg.SVGDocument doc)
Description copied from class:JSVGComponentThis does the real work of installing the SVG Document after the update manager from the previous document (if any) has been properly 'shut down'.- Overrides:
installSVGDocumentin classJSVGComponent
-
setLastToolTipEvent
public void setLastToolTipEvent(long t, org.w3c.dom.events.EventTarget et)Sets the time and element of the last tool tip event handled.
-
matchLastToolTipEvent
public boolean matchLastToolTipEvent(long t, org.w3c.dom.events.EventTarget et)Checks if the specified event time and element are the same as the last tool tip event.
-
-