Package ghidra.graph.viewer
Class VisualGraphViewUpdater<V extends VisualVertex,E extends VisualEdge<V>>
java.lang.Object
ghidra.graph.viewer.VisualGraphViewUpdater<V,E>
- Type Parameters:
V- the vertex typeE- the edge type
This is the class through which operations travel that manipulate the view and graph while
plugged-in to the UI. (Setup and tear down operations performed before the view
or graph are visible need not pass through this class.) This class is responsible for
controlling how to display view and graph changes, including whether to animate.
The animations are categorized into those that mutate the graph and those that are just display animations (like hover animations).
-
Constructor Summary
ConstructorsConstructorDescriptionVisualGraphViewUpdater(GraphViewer<V, E> primaryViewer, VisualGraph<V, E> graph) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a listener to be notified when a job is started.voidvoidvoidvoidvoiddispose()voidensureVertexAreaVisible(V vertex, Rectangle area, BusyListener callbackListener) voidensureVertexVisible(V vertex, Rectangle area) voidFits the graph into both the primary and satellite viewsvoidWill schedule the fitting work to happen now if now work is being done, or later otherwisvoidfitGraphToViewerLater(edu.uci.ics.jung.visualization.VisualizationServer<V, E> theViewer) voidvoidfitGraphToViewerNow(edu.uci.ics.jung.visualization.VisualizationServer<V, E> theViewer) booleanbooleanisBusy()Returns true if this updater is performing any animations or running any jobs that can mutate the graph or viewbooleanReturns true if this updater is running any jobs that can mutate the graph or viewvoidmoveVertexToCenterTopWithAnimation(V vertex) voidmoveVertexToCenterTopWithAnimation(V vertex, BusyListener callbackListener) voidvoidmoveVertexToCenterWithAnimation(V vertex) voidmoveVertexToCenterWithAnimation(V vertex, BusyListener callbackListener) voidmoveVertexToCenterWithoutAnimation(V vertex) voidmoveViewerLocationWithoutAnimation(Point translation) voidvoidvoidsetGraphPerspective(GraphPerspectiveInfo<V, E> graphInfo) voidsetGraphScale(double scale) voidvoidprotected voidsetSatelliteViewer(SatelliteGraphViewer<V, E> satelliteViewer) voidprotected voidvoidvoidtwinkeVertex(V vertex) voidupdateEdgeShapes(Collection<E> edges) voidvoidzoomInCompletely(V centerOnVertex)
-
Constructor Details
-
VisualGraphViewUpdater
-
-
Method Details
-
setSatelliteViewer
-
addJobScheduledListener
Add a listener to be notified when a job is started. Jobs often, but not always, mutate the underlying graph. For this reason, other tasks that use the graph may want to not do their work while a job is running.- Parameters:
c- the listener
-
isAnimationEnabled
public boolean isAnimationEnabled() -
dispose
public void dispose() -
fitAllGraphsToViewsNow
public void fitAllGraphsToViewsNow()Fits the graph into both the primary and satellite views -
fitGraphToViewerNow
public void fitGraphToViewerNow() -
fitGraphToViewerNow
-
fitGraphToViewerLater
public void fitGraphToViewerLater()Will schedule the fitting work to happen now if now work is being done, or later otherwis -
fitGraphToViewerLater
-
zoomInCompletely
public void zoomInCompletely() -
zoomInCompletely
-
moveVertexToCenterTopWithoutAnimation
-
moveVertexToCenterWithoutAnimation
-
moveVertexToCenterWithAnimation
-
moveVertexToCenterWithAnimation
-
moveVertexToCenterTopWithAnimation
-
moveVertexToCenterTopWithAnimation
-
moveViewerLocationWithoutAnimation
-
centerViewSpacePointWithAnimation
-
centerViewSpacePointWithoutAnimation
-
centerLayoutSpacePointWithoutAnimation
-
setLayoutSpacePointWithoutAnimation
-
setLayoutSpacePointWithAnimation
-
ensureVertexVisible
-
ensureVertexAreaVisible
-
updateEdgeShapes
-
setGraphPerspective
-
twinkeVertex
-
setGraphScale
public void setGraphScale(double scale) -
animateEdgeHover
public void animateEdgeHover() -
isBusy
public boolean isBusy()Returns true if this updater is performing any animations or running any jobs that can mutate the graph or view- Returns:
- true if busy
-
isMutatingGraph
public boolean isMutatingGraph()Returns true if this updater is running any jobs that can mutate the graph or view- Returns:
- true if busy
-
scheduleViewChangeJob
-
stopEdgeHoverAnimation
public void stopEdgeHoverAnimation() -
stopAllAnimation
public void stopAllAnimation() -
stopAllNonMutativeAnimation
protected void stopAllNonMutativeAnimation() -
relayoutGraph
public void relayoutGraph()
-