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 Classes Modifier and Type Interface Description static interface
VisualizationServer.Paintable
an interface for the preRender and postRender
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChangeListener(javax.swing.event.ChangeListener l)
Adds aChangeListener
.void
addPostRenderPaintable(VisualizationServer.Paintable paintable)
void
addPreRenderPaintable(VisualizationServer.Paintable paintable)
void
fireStateChanged()
Notifies all listeners that have registered interest for notification on this event type.java.awt.geom.Point2D
getCenter()
javax.swing.event.ChangeListener[]
getChangeListeners()
Returns an array of all theChangeListener
s added with addChangeListener().Layout<V,E>
getGraphLayout()
VisualizationModel<V,E>
getModel()
PickedState<E>
getPickedEdgeState()
PickedState<V>
getPickedVertexState()
GraphElementAccessor<V,E>
getPickSupport()
RenderContext<V,E>
getRenderContext()
Renderer<V,E>
getRenderer()
java.util.Map<java.awt.RenderingHints.Key,java.lang.Object>
getRenderingHints()
boolean
isDoubleBuffered()
Returns whether this class uses double buffering.void
removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener.void
removePostRenderPaintable(VisualizationServer.Paintable paintable)
void
removePreRenderPaintable(VisualizationServer.Paintable paintable)
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(java.util.Map<java.awt.RenderingHints.Key,java.lang.Object> renderingHints)
void
setVisible(boolean aFlag)
Makes the component visible ifaFlag
is true, or invisible if false.void
stateChanged(javax.swing.event.ChangeEvent e)
In response to changes from the model, repaint the view, then fire an event to any listeners.
-
-
-
Method Detail
-
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
void setModel(VisualizationModel<V,E> model)
- Parameters:
model
- the model for this class to use
-
stateChanged
void stateChanged(javax.swing.event.ChangeEvent e)
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
void setRenderer(Renderer<V,E> r)
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
-
setGraphLayout
void setGraphLayout(Layout<V,E> layout)
Replaces the current graph layout withlayout
.- Parameters:
layout
- the new layout to set
-
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:
JComponent.setVisible(boolean)
-
getRenderingHints
java.util.Map<java.awt.RenderingHints.Key,java.lang.Object> getRenderingHints()
- Returns:
- the renderingHints
-
setRenderingHints
void setRenderingHints(java.util.Map<java.awt.RenderingHints.Key,java.lang.Object> renderingHints)
- Parameters:
renderingHints
- The renderingHints to set.
-
addPreRenderPaintable
void addPreRenderPaintable(VisualizationServer.Paintable paintable)
- Parameters:
paintable
- The paintable to add.
-
removePreRenderPaintable
void removePreRenderPaintable(VisualizationServer.Paintable paintable)
- Parameters:
paintable
- The paintable to remove.
-
addPostRenderPaintable
void addPostRenderPaintable(VisualizationServer.Paintable paintable)
- Parameters:
paintable
- The paintable to add.
-
removePostRenderPaintable
void removePostRenderPaintable(VisualizationServer.Paintable paintable)
- Parameters:
paintable
- The paintable to remove.
-
addChangeListener
void addChangeListener(javax.swing.event.ChangeListener l)
Adds aChangeListener
.- Parameters:
l
- the listener to be added
-
removeChangeListener
void removeChangeListener(javax.swing.event.ChangeListener l)
Removes a ChangeListener.- Parameters:
l
- the listener to be removed
-
getChangeListeners
javax.swing.event.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:
EventListenerList
-
getPickedVertexState
PickedState<V> getPickedVertexState()
- Returns:
- the vertex PickedState instance
-
getPickedEdgeState
PickedState<E> getPickedEdgeState()
- Returns:
- the edge PickedState instance
-
setPickedVertexState
void setPickedVertexState(PickedState<V> pickedVertexState)
-
setPickedEdgeState
void setPickedEdgeState(PickedState<E> pickedEdgeState)
-
getPickSupport
GraphElementAccessor<V,E> getPickSupport()
- Returns:
- the GraphElementAccessor
-
setPickSupport
void setPickSupport(GraphElementAccessor<V,E> pickSupport)
- Parameters:
pickSupport
- The pickSupport to set.
-
getCenter
java.awt.geom.Point2D getCenter()
-
getRenderContext
RenderContext<V,E> getRenderContext()
-
setRenderContext
void setRenderContext(RenderContext<V,E> renderContext)
-
repaint
void repaint()
-
-