Package edu.uci.ics.jung.visualization
Interface VisualizationServer<V,E>
- Type Parameters:
V
- the vertex typeE
- the edge type
- All Known Implementing Classes:
BasicVisualizationServer
,SatelliteVisualizationViewer
,VisualizationImageServer
,VisualizationViewer
public interface VisualizationServer<V,E>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
an interface for the preRender and postRender -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds aChangeListener
.void
void
void
Notifies all listeners that have registered interest for notification on this event type.Returns an array of all theChangeListener
s added with addChangeListener().getModel()
boolean
Returns whether this class uses double buffering.void
Removes a ChangeListener.void
void
void
repaint()
void
setDoubleBuffered
(boolean doubleBuffered) Specify whether this class uses its offscreen image or not.void
setGraphLayout
(Layout<V, E> layout) Replaces the current graph layout withlayout
.void
setModel
(VisualizationModel<V, E> model) void
setPickedEdgeState
(PickedState<E> pickedEdgeState) void
setPickedVertexState
(PickedState<V> pickedVertexState) void
setPickSupport
(GraphElementAccessor<V, E> pickSupport) void
setRenderContext
(RenderContext<V, E> renderContext) void
setRenderer
(Renderer<V, E> r) Sets the showing Renderer to be the input Renderer.void
setRenderingHints
(Map<RenderingHints.Key, Object> renderingHints) void
setVisible
(boolean aFlag) Makes the component visible ifaFlag
is true, or invisible if false.void
In response to changes from the model, repaint the view, then fire an event to any listeners.
-
Method Details
-
setDoubleBuffered
void setDoubleBuffered(boolean doubleBuffered) Specify whether this class uses its offscreen image or not.- Parameters:
doubleBuffered
- if true, then doubleBuffering in the superclass is set to 'false'
-
isDoubleBuffered
boolean isDoubleBuffered()Returns whether this class uses double buffering. The superclass will be the opposite state.- Returns:
- the double buffered state
-
getModel
VisualizationModel<V,E> getModel()- Returns:
- the model.
-
setModel
- Parameters:
model
- the model for this class to use
-
stateChanged
In response to changes from the model, repaint the view, then fire an event to any listeners. Examples of listeners are the GraphZoomScrollPane and the BirdsEyeVisualizationViewer- Parameters:
e
- the change event
-
setRenderer
Sets the showing Renderer to be the input Renderer. Also tells the Renderer to refer to this instance as a PickedKey. (Because Renderers maintain a small amount of state, such as the PickedKey, it is important to create a separate instance for each VV instance.)- Parameters:
r
- the renderer to use
-
getRenderer
- Returns:
- the renderer used by this instance.
-
setGraphLayout
Replaces the current graph layout withlayout
.- Parameters:
layout
- the new layout to set
-
getGraphLayout
- Returns:
- the current graph layout.
-
setVisible
void setVisible(boolean aFlag) Makes the component visible ifaFlag
is true, or invisible if false.- Parameters:
aFlag
- true iff the component should be visible- See Also:
-
getRenderingHints
Map<RenderingHints.Key,Object> getRenderingHints()- Returns:
- the renderingHints
-
setRenderingHints
- Parameters:
renderingHints
- The renderingHints to set.
-
addPreRenderPaintable
- Parameters:
paintable
- The paintable to add.
-
removePreRenderPaintable
- Parameters:
paintable
- The paintable to remove.
-
addPostRenderPaintable
- Parameters:
paintable
- The paintable to add.
-
removePostRenderPaintable
- Parameters:
paintable
- The paintable to remove.
-
addChangeListener
Adds aChangeListener
.- Parameters:
l
- the listener to be added
-
removeChangeListener
Removes a ChangeListener.- Parameters:
l
- the listener to be removed
-
getChangeListeners
ChangeListener[] getChangeListeners()Returns an array of all theChangeListener
s added with addChangeListener().- Returns:
- all of the
ChangeListener
s added or an empty array if no listeners have been added
-
fireStateChanged
void fireStateChanged()Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created.- See Also:
-
getPickedVertexState
PickedState<V> getPickedVertexState()- Returns:
- the vertex PickedState instance
-
getPickedEdgeState
PickedState<E> getPickedEdgeState()- Returns:
- the edge PickedState instance
-
setPickedVertexState
-
setPickedEdgeState
-
getPickSupport
GraphElementAccessor<V,E> getPickSupport()- Returns:
- the GraphElementAccessor
-
setPickSupport
- Parameters:
pickSupport
- The pickSupport to set.
-
getCenter
Point2D getCenter() -
getRenderContext
RenderContext<V,E> getRenderContext() -
setRenderContext
-
repaint
void repaint()
-