|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
org.apache.batik.swing.gvt.AbstractJGVTComponent
org.apache.batik.swing.gvt.JGVTComponent
org.apache.batik.swing.svg.AbstractJSVGComponent
org.apache.batik.swing.svg.JSVGComponent
org.apache.batik.swing.JSVGCanvas
public class JSVGCanvas
This class represents a general-purpose swing SVG component. The JSVGCanvas does not provided additional functionalities compared to the JSVGComponent but simply provides an API conformed to the JavaBean specification. The only major change between the JSVGComponent and this component is that interactors and text selection are activated by default.
| Nested Class Summary | |
|---|---|
class |
JSVGCanvas.AffineAction
A swing action to append an affine transform to the current rendering transform. |
protected class |
JSVGCanvas.CanvasSVGListener
To hide the listener methods. |
protected class |
JSVGCanvas.CanvasUserAgent
The CanvasUserAgent only adds tooltips to the behavior of the default BridgeUserAgent. |
protected class |
JSVGCanvas.LocationListener
Helper class. |
class |
JSVGCanvas.ResetTransformAction
A swing action to reset the rendering transform of the canvas. |
class |
JSVGCanvas.RotateAction
A swing action to Rotate the canvas. |
class |
JSVGCanvas.ScrollAction
A swing action to Pan/scroll the canvas. |
class |
JSVGCanvas.ScrollDownAction
A swing action to scroll the canvas down, by a fixed amount |
class |
JSVGCanvas.ScrollLeftAction
A swing action to scroll the canvas to the left, by a fixed amount |
class |
JSVGCanvas.ScrollRightAction
A swing action to scroll the canvas to the right, by a fixed amount |
class |
JSVGCanvas.ScrollUpAction
A swing action to scroll the canvas up, by a fixed amount |
protected class |
JSVGCanvas.ToolTipModifier
Sets a specific tooltip on the JSVGCanvas when a given event occurs. |
protected class |
JSVGCanvas.ToolTipRunnable
|
class |
JSVGCanvas.ZoomAction
A swing action to apply a zoom factor to the canvas. |
class |
JSVGCanvas.ZoomInAction
A swing action to zoom in the canvas. |
class |
JSVGCanvas.ZoomOutAction
A swing action to zoom out the canvas. |
| Nested classes/interfaces inherited from class org.apache.batik.swing.svg.JSVGComponent |
|---|
JSVGComponent.ExtendedSVGListener |
| Nested classes/interfaces inherited from class org.apache.batik.swing.svg.AbstractJSVGComponent |
|---|
AbstractJSVGComponent.BridgeUserAgent, AbstractJSVGComponent.BridgeUserAgentWrapper, AbstractJSVGComponent.JSVGComponentListener, AbstractJSVGComponent.SVGListener |
| Nested classes/interfaces inherited from class org.apache.batik.swing.gvt.JGVTComponent |
|---|
JGVTComponent.ExtendedListener |
| Nested classes/interfaces inherited from class org.apache.batik.swing.gvt.AbstractJGVTComponent |
|---|
AbstractJGVTComponent.Listener, AbstractJGVTComponent.UnixTextSelectionListener |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
FAST_SCROLL_DOWN_ACTION
The key for the Action to quickly scroll down. |
static String |
FAST_SCROLL_LEFT_ACTION
The key for the Action to quickly scroll left. |
static String |
FAST_SCROLL_RIGHT_ACTION
The key for the Action to quickly scroll right. |
static String |
FAST_SCROLL_UP_ACTION
The key for the Action to quickly scroll up. |
protected Interactor |
imageZoomInteractor
An interactor to perform a realtime zoom. |
protected EventTarget |
lastTarget
|
protected EventTarget |
lastToolTipEventTarget
The target for which the last tool tip event was fired. |
protected long |
lastToolTipEventTimeStamp
The time of the last tool tip event. |
protected JSVGCanvas.LocationListener |
locationListener
Keeps track of the last known mouse position over the canvas. |
protected static Object |
MAP_TOKEN
This is used as the value in the toolTipDocs WeakHashMap. |
protected Interactor |
panInteractor
An interactor to perform a translation. |
protected PropertyChangeSupport |
pcs
The PropertyChangeSupport used to fire PropertyChangeEvent. |
static String |
RESET_TRANSFORM_ACTION
The key for the Action to reset the transform. |
protected Interactor |
resetTransformInteractor
An interactor to reset the rendering transform. |
protected Interactor |
rotateInteractor
An interactor to perform a rotation. |
static String |
SCROLL_DOWN_ACTION
The key for the Action to scroll down. |
static String |
SCROLL_LEFT_ACTION
The key for the Action to scroll left. |
static String |
SCROLL_RIGHT_ACTION
The key for the Action to scroll right. |
static String |
SCROLL_UP_ACTION
The key for the Action to scroll up. |
protected Map |
toolTipDocs
|
protected EventListener |
toolTipListener
|
protected Map |
toolTipMap
Mapping of elements to listeners so they can be removed, if the tooltip is removed. |
protected String |
uri
The URI of the current document being displayed. |
static String |
ZOOM_IN_ACTION
The key for the Action to zoom in. |
static String |
ZOOM_OUT_ACTION
The key for the Action to zoom out. |
protected Interactor |
zoomInteractor
An interactor to perform a zoom. |
| Fields inherited from class org.apache.batik.swing.gvt.AbstractJGVTComponent |
|---|
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 |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JSVGCanvas()
Creates a new JSVGCanvas. |
|
JSVGCanvas(SVGUserAgent ua,
boolean eventsEnabled,
boolean selectableText)
Creates a new JSVGCanvas. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener pcl)
Adds the specified PropertyChangeListener. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener pcl)
Adds the specified PropertyChangeListener for the specified property. |
protected AbstractJGVTComponent.Listener |
createListener()
Creates an instance of Listener. |
protected UserAgent |
createUserAgent()
Creates a UserAgent. |
boolean |
getEnableImageZoomInteractor()
Returns true if the image zoom interactor is enabled, false otherwise. |
boolean |
getEnablePanInteractor()
Returns true if the pan interactor is enabled, false otherwise. |
boolean |
getEnableResetTransformInteractor()
Returns true if the reset transform interactor is enabled, false otherwise. |
boolean |
getEnableRotateInteractor()
Returns true if the rotate interactor is enabled, false otherwise. |
boolean |
getEnableZoomInteractor()
Returns true if the zoom interactor is enabled, false otherwise. |
String |
getURI()
Returns the URI of the current document. |
protected void |
installActions()
Builds the ActionMap of this canvas with a set of predefined Actions. |
protected void |
installKeyboardActions()
Builds the InputMap of this canvas with a set of predefined Actions. |
protected void |
installSVGDocument(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'. |
boolean |
matchLastToolTipEvent(long t,
EventTarget et)
Checks if the specified event time and element are the same as the last tool tip event. |
void |
removePropertyChangeListener(PropertyChangeListener pcl)
Removes the specified PropertyChangeListener. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener pcl)
Removes the specified PropertyChangeListener for the specified property. |
void |
setDisableInteractions(boolean b)
Turn off all 'interactor' objects (pan, zoom, etc) if 'b' is true, turn them on if 'b' is false. |
void |
setEnableImageZoomInteractor(boolean b)
Determines whether the image zoom interactor is enabled or not. |
void |
setEnablePanInteractor(boolean b)
Determines whether the pan interactor is enabled or not. |
void |
setEnableResetTransformInteractor(boolean b)
Determines whether the reset transform interactor is enabled or not. |
void |
setEnableRotateInteractor(boolean b)
Determines whether the rotate interactor is enabled or not. |
void |
setEnableZoomInteractor(boolean b)
Determines whether the zoom interactor is enabled or not. |
void |
setLastToolTipEvent(long t,
EventTarget et)
Sets the time and element of the last tool tip event handled. |
void |
setURI(String newURI)
Sets the URI to the specified uri. |
| Methods inherited from class org.apache.batik.swing.gvt.JGVTComponent |
|---|
addAWTListeners |