edu.uci.ics.jung.visualization
Interface VisualizationServer<V,E>

Type Parameters:
V -
E -
All Known Implementing Classes:
BasicVisualizationServer, SatelliteVisualizationViewer, VisualizationImageServer, VisualizationViewer

public interface VisualizationServer<V,E>

Author:
tom

Nested Class Summary
static interface VisualizationServer.Paintable
          an interface for the preRender and postRender
 
Method Summary
 void addChangeListener(ChangeListener l)
          Adds a ChangeListener.
 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.
 Point2D getCenter()
           
 ChangeListener[] getChangeListeners()
          Returns an array of all the ChangeListeners added with addChangeListener().
 Layout<V,E> getGraphLayout()
          Returns the current graph layout.
 VisualizationModel<V,E> getModel()
           
 PickedState<E> getPickedEdgeState()
           
 PickedState<V> getPickedVertexState()
           
 GraphElementAccessor<V,E> getPickSupport()
           
 RenderContext<V,E> getRenderContext()
           
 Renderer<V,E> getRenderer()
          Returns the renderer used by this instance.
 Map<RenderingHints.Key,Object> getRenderingHints()
           
 boolean isDoubleBuffered()
          whether this class uses double buffering.
 void removeChangeListener(ChangeListener l)
          Removes a ChangeListener.
 void removePostRenderPaintable(VisualizationServer.Paintable paintable)
           
 void removePreRenderPaintable(VisualizationServer.Paintable paintable)
           
 void repaint()
           
 void setDoubleBuffered(boolean doubleBuffered)
          set whether this class uses its offscreen image or not.
 void setGraphLayout(Layout<V,E> layout)
          Removes the current graph layout, and adds a new one.
 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)
           
 void stateChanged(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)
set whether this class uses its offscreen image or not. If true, then doubleBuffering in the superclass is set to 'false'


isDoubleBuffered

boolean isDoubleBuffered()
whether this class uses double buffering. The superclass will be the opposite state.


getModel

VisualizationModel<V,E> getModel()
Returns:
Returns the model.

setModel

void setModel(VisualizationModel<V,E> model)
Parameters:
model - The model to set.

stateChanged

void stateChanged(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


setRenderer

void setRenderer(Renderer<V,E> r)
Sets the showing Renderer to be the input Renderer. Also tells the Renderer to refer to this visualizationviewer 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.)


getRenderer

Renderer<V,E> getRenderer()
Returns the renderer used by this instance.


setGraphLayout

void setGraphLayout(Layout<V,E> layout)
Removes the current graph layout, and adds a new one.

Parameters:
layout - the new layout to set

getGraphLayout

Layout<V,E> getGraphLayout()
Returns the current graph layout. Passes thru to the model


setVisible

void setVisible(boolean aFlag)
See Also:
JComponent.setVisible(boolean)

getRenderingHints

Map<RenderingHints.Key,Object> getRenderingHints()
Returns:
Returns the renderingHints.

setRenderingHints

void setRenderingHints(Map<RenderingHints.Key,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(ChangeListener l)
Adds a ChangeListener.

Parameters:
l - the listener to be added

removeChangeListener

void removeChangeListener(ChangeListener l)
Removes a ChangeListener.

Parameters:
l - the listener to be removed

getChangeListeners

ChangeListener[] getChangeListeners()
Returns an array of all the ChangeListeners added with addChangeListener().

Returns:
all of the ChangeListeners 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:
Returns the pickedState.

getPickedEdgeState

PickedState<E> getPickedEdgeState()
Returns:
Returns the pickedState.

setPickedVertexState

void setPickedVertexState(PickedState<V> pickedVertexState)
Parameters:
pickedState - The pickedState to set.

setPickedEdgeState

void setPickedEdgeState(PickedState<E> pickedEdgeState)

getPickSupport

GraphElementAccessor<V,E> getPickSupport()
Returns:
Returns the GraphElementAccessor.

setPickSupport

void setPickSupport(GraphElementAccessor<V,E> pickSupport)
Parameters:
pickSupport - The pickSupport to set.

getCenter

Point2D getCenter()

getRenderContext

RenderContext<V,E> getRenderContext()

setRenderContext

void setRenderContext(RenderContext<V,E> renderContext)

repaint

void repaint()


Copyright © 2009. All Rights Reserved.