Package elki.visualization.batikutil
Class JSVGSynchronizedCanvas
- 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
-
- elki.visualization.batikutil.JSVGSynchronizedCanvas
-
- All Implemented Interfaces:
java.awt.image.ImageObserver,java.awt.MenuContainer,java.io.Serializable
public class JSVGSynchronizedCanvas extends org.apache.batik.swing.JSVGCanvasAn JSVGCanvas that allows easier synchronization of Updates for SVGPlot objects.- Since:
- 0.3
- Author:
- Erich Schubert
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.batik.swing.JSVGCanvas
org.apache.batik.swing.JSVGCanvas.AffineAction, org.apache.batik.swing.JSVGCanvas.CanvasSVGListener, org.apache.batik.swing.JSVGCanvas.CanvasUserAgent, org.apache.batik.swing.JSVGCanvas.LocationListener, org.apache.batik.swing.JSVGCanvas.ResetTransformAction, org.apache.batik.swing.JSVGCanvas.RotateAction, org.apache.batik.swing.JSVGCanvas.ScrollAction, org.apache.batik.swing.JSVGCanvas.ScrollDownAction, org.apache.batik.swing.JSVGCanvas.ScrollLeftAction, org.apache.batik.swing.JSVGCanvas.ScrollRightAction, org.apache.batik.swing.JSVGCanvas.ScrollUpAction, org.apache.batik.swing.JSVGCanvas.ToolTipModifier, org.apache.batik.swing.JSVGCanvas.ToolTipRunnable, org.apache.batik.swing.JSVGCanvas.ZoomAction, org.apache.batik.swing.JSVGCanvas.ZoomInAction, org.apache.batik.swing.JSVGCanvas.ZoomOutAction
-
Nested classes/interfaces inherited from class org.apache.batik.swing.svg.JSVGComponent
org.apache.batik.swing.svg.JSVGComponent.BridgeUserAgent, org.apache.batik.swing.svg.JSVGComponent.BridgeUserAgentWrapper, org.apache.batik.swing.svg.JSVGComponent.JSVGComponentListener, org.apache.batik.swing.svg.JSVGComponent.SVGListener
-
Nested classes/interfaces inherited from class org.apache.batik.swing.gvt.JGVTComponent
org.apache.batik.swing.gvt.JGVTComponent.Listener, org.apache.batik.swing.gvt.JGVTComponent.UnixTextSelectionListener
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicReference<java.lang.Runnable>latestThe latest attaching operation.private SVGPlotplotCurrent SVG plot.private static longserialVersionUIDSerial version number.private JSVGUpdateSynchronizersynchronizerSynchronizer to use when synchronizing SVG plots-
Fields inherited from class org.apache.batik.swing.JSVGCanvas
FAST_SCROLL_DOWN_ACTION, FAST_SCROLL_LEFT_ACTION, FAST_SCROLL_RIGHT_ACTION, FAST_SCROLL_UP_ACTION, imageZoomInteractor, lastTarget, lastToolTipEventTarget, lastToolTipEventTimeStamp, locationListener, MAP_TOKEN, panInteractor, pcs, RESET_TRANSFORM_ACTION, resetTransformInteractor, rotateInteractor, SCROLL_DOWN_ACTION, SCROLL_LEFT_ACTION, SCROLL_RIGHT_ACTION, SCROLL_UP_ACTION, toolTipDocs, toolTipListener, toolTipMap, uri, ZOOM_IN_ACTION, ZOOM_OUT_ACTION, zoomInteractor
-
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 JSVGSynchronizedCanvas()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private voidattachPlot(SVGPlot newplot)Attach to a new plot, and display.private voiddetachPlot(SVGPlot oldplot)Execute the detaching event.SVGPlotgetPlot()Get the currently displayed SVG plot.private voidscheduleSetPlot(SVGPlot oldplot, SVGPlot newplot)Schedule a detach.voidsetDocument(org.w3c.dom.Document doc)Deprecated.Document cannot be synchronized - usesetPlot(elki.visualization.svg.SVGPlot)and aSVGPlotobject!voidsetPlot(SVGPlot newplot)Choose a new plot to display.-
Methods inherited from class org.apache.batik.swing.JSVGCanvas
addPropertyChangeListener, addPropertyChangeListener, createListener, createUserAgent, getEnableImageZoomInteractor, getEnablePanInteractor, getEnableResetTransformInteractor, getEnableRotateInteractor, getEnableZoomInteractor, getURI, installActions, installKeyboardActions, installSVGDocument, matchLastToolTipEvent, removePropertyChangeListener, removePropertyChangeListener, setDisableInteractions, setEnableImageZoomInteractor, setEnablePanInteractor, setEnableResetTransformInteractor, setEnableRotateInteractor, setEnableZoomInteractor, setLastToolTipEvent, setURI
-
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, 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
-
serialVersionUID
private static final long serialVersionUID
Serial version number.- See Also:
- Constant Field Values
-
synchronizer
private final JSVGUpdateSynchronizer synchronizer
Synchronizer to use when synchronizing SVG plots
-
plot
private SVGPlot plot
Current SVG plot.
-
latest
private final java.util.concurrent.atomic.AtomicReference<java.lang.Runnable> latest
The latest attaching operation.
-
-
Method Detail
-
getPlot
public SVGPlot getPlot()
Get the currently displayed SVG plot.- Returns:
- current SVG plot. May be
null!
-
setDocument
@Deprecated public void setDocument(org.w3c.dom.Document doc)
Deprecated.Document cannot be synchronized - usesetPlot(elki.visualization.svg.SVGPlot)and aSVGPlotobject!UsesetPlot(elki.visualization.svg.SVGPlot)instead if you need synchronization!- Overrides:
setDocumentin classorg.apache.batik.swing.svg.JSVGComponent
-
setPlot
public void setPlot(SVGPlot newplot)
Choose a new plot to display.- Parameters:
newplot- New plot to display. May benull!
-
scheduleSetPlot
private void scheduleSetPlot(SVGPlot oldplot, SVGPlot newplot)
Schedule a detach.- Parameters:
oldplot- Plot to detach from.
-
attachPlot
private void attachPlot(SVGPlot newplot)
Attach to a new plot, and display.- Parameters:
newplot- Plot to attach to.
-
detachPlot
private void detachPlot(SVGPlot oldplot)
Execute the detaching event.- Parameters:
oldplot- Plot to detach from.
-
-