org.apache.batik.swing.gvt
public abstract class AbstractJGVTComponent extends JComponent
| Nested Class Summary | |
|---|---|
| protected class | AbstractJGVTComponent.Listener
To hide the listener methods. |
| protected class | AbstractJGVTComponent.UnixTextSelectionListener |
| Field Summary | |
|---|---|
| protected boolean | disableInteractions
Whether to unconditionally disable interactions. |
| protected boolean | doubleBufferedRendering
Whether the double buffering is enabled. |
| protected AWTEventDispatcher | eventDispatcher
The event dispatcher. |
| protected boolean | eventsEnabled
Whether the GVT tree should be reactive to mouse and key events. |
| protected GraphicsNode | gvtRoot
The GVT tree root. |
| protected GVTTreeRenderer | gvtTreeRenderer
The GVT tree renderer. |
| protected List | gvtTreeRendererListeners
The GVT tree renderer listeners. |
| protected BufferedImage | image
The image to paint. |
| protected AffineTransform | initialTransform
The initial rendering transform. |
| protected Interactor | interactor
The current interactor. |
| protected List | interactors
The interactor list. |
| protected List | jgvtListeners
The JGVTComponentListener list. |
| protected AbstractJGVTComponent.Listener | listener
The listener. |
| protected boolean | needRender
Whether a render was requested. |
| protected List | overlays
The overlays. |
| protected AffineTransform | paintingTransform
The transform used for painting. |
| protected boolean | progressivePaint
Whether to allow progressive paint. |
| protected HaltingThread | progressivePaintThread
The progressive paint thread. |
| protected ImageRenderer | renderer
The current renderer. |
| protected ImageRendererFactory | rendererFactory
The renderer factory. |
| protected AffineTransform | renderingTransform
The transform used for rendering. |
| protected boolean | selectableText
Whether the text should be selectable if eventEnabled is false,
this flag is ignored. |
| protected boolean | suspendInteractions
Whether to suspend interactions. |
| protected TextSelectionManager | textSelectionManager
The text selection manager. |
| protected boolean | useUnixTextSelection
Whether the JGVTComponent should adhere to 'Unix' text
selection semantics where as soon as text is selected it
is copied to the clipboard. |
| Constructor Summary | |
|---|---|
| AbstractJGVTComponent()
Creates a new AbstractJGVTComponent. | |
| AbstractJGVTComponent(boolean eventsEnabled, boolean selectableText)
Creates a new abstract JGVTComponent. | |
| Method Summary | |
|---|---|
| protected void | addAWTListeners()
Adds the AWT listeners. |
| void | addGVTTreeRendererListener(GVTTreeRendererListener l)
Adds a GVTTreeRendererListener to this component. |
| void | addJGVTComponentListener(JGVTComponentListener listener) |
| protected boolean | computeRenderingTransform()
Computes the initial value of the transform used for rendering.
|
| protected ImageRenderer | createImageRenderer()
Creates a new renderer. |
| protected AbstractJGVTComponent.Listener | createListener()
Creates an instance of Listener. |
| protected TextSelectionManager | createTextSelectionManager(EventDispatcher ed) |
| void | deselectAll()
Deselects all. |
| void | flush()
Flush any cached image data (preliminary interface,
may be removed or modified in the future). |
| void | flush(Rectangle r)
Flush a rectangle of cached image data (preliminary interface,
may be removed or modified in the future). |
| boolean | getDisableInteractions()
Returns true if all 'interactor' objects
(pan, zoom, etc) are disabled. |
| boolean | getDoubleBufferedRendering()
Tells whether this component use double buffering to render
SVG documents. |
| GraphicsNode | getGraphicsNode()
Returns the root of the GVT tree displayed by this component, if any. |
| AffineTransform | getInitialTransform()
Returns the initial transform. |
| List | getInteractors()
Returns the interactor list. |
| BufferedImage | getOffScreen()
Returns the off-screen image, if any. |
| List | getOverlays()
Returns the overlay list. |
| AffineTransform | getPaintingTransform()
Returns the current painting transform. |
| boolean | getProgressivePaint()
Tells whether the progressive paint is enabled. |
| AffineTransform | getRenderingTransform()
Returns the current rendering transform. |
| Rectangle | getRenderRect() |
| Color | getSelectionOverlayColor()
Returns the color of the selection overlay. |
| Color | getSelectionOverlayStrokeColor()
Returns the color of the outline of the selection overlay. |
| TextSelectionManager | getTextSelectionManager()
Returns the current Text selection manager for the Component.
|
| void | getUseUnixTextSelection(boolean b)
Returns true if the canvas will copy selections
to the clipboard when they are completed. |
| protected void | handleException(Exception e)
Handles an exception. |
| void | immediateRepaint()
Repaints immediately the component. |
| protected void | initializeEventHandling()
Initializes the event handling classes. |
| boolean | isSelectionOverlayXORMode()
Returns true if the selection overlay is painted in XOR mode, false
otherwise. |
| void | paintComponent(Graphics g)
Paints this component. |
| protected void | releaseRenderingReferences()
Releases the references to the rendering resources, |
| void | removeGVTTreeRendererListener(GVTTreeRendererListener l)
Removes a GVTTreeRendererListener from this component. |
| void | removeJGVTComponentListener(JGVTComponentListener listener) |
| protected void | renderGVTTree()
Renders the GVT tree. |
| void | resetRenderingTransform()
Resets the rendering transform to its initial value. |
| protected void | scheduleGVTRendering()
Schedules a new GVT rendering. |
| void | select(Mark start, Mark end)
Sets the selection to the specified start and end mark.
|
| void | setDisableInteractions(boolean b)
Turn off all 'interactor' objects (pan, zoom, etc) if
'b' is true, turn them on if 'b' is false. |
| void | setDoubleBufferedRendering(boolean b)
Sets whether this component should use double buffering to render
SVG documents. |
| void | setGraphicsNode(GraphicsNode gn)
Sets the GVT tree to display. |
| protected void | setGraphicsNode(GraphicsNode gn, boolean createDispatcher)
Sets the GVT tree to display. |
| void | setPaintingTransform(AffineTransform at)
Sets the painting transform. |
| void | setProgressivePaint(boolean b)
Whether to enable the progressive paint. |
| void | setRenderingTransform(AffineTransform at)
Sets the rendering transform.
|
| void | setRenderingTransform(AffineTransform at, boolean performRedraw) |
| void | setSelectionOverlayColor(Color color)
Sets the color of the selection overlay to the specified color.
|
| void | setSelectionOverlayStrokeColor(Color color)
Sets the color of the outline of the selection overlay to the specified
color.
|
| void | setSelectionOverlayXORMode(boolean state)
Sets whether or not the selection overlay will be painted in XOR mode,
depending on the specified parameter.
|
| void | setUseUnixTextSelection(boolean b)
If 'b' is true text selections will copied to
the clipboard immediately. |
| void | stopProcessing()
Stops the processing of the current tree. |
| protected boolean | updateRenderingTransform()
Updates the value of the transform used for rendering.
|
Parameters: eventsEnabled Whether the GVT tree should be reactive to mouse and key events. selectableText Whether the text should be selectable. if eventEnabled is false, this flag is ignored.
Parameters: start the mark used to define where the selection starts end the mark used to define where the selection ends
Parameters: color the new color of the selection overlay
Parameters: color the new color of the outline of the selection overlay
Parameters: state true implies the selection overlay will be in XOR mode