pedviz.view
Class GraphView2D

java.lang.Object
  extended by pedviz.view.GraphView
      extended by pedviz.view.GraphView2D

public class GraphView2D
extends GraphView

This class visualizes a LayoutedGraph in a tow-dimensional environment.

Version:
0.1
Author:
Lukas Forer

Constructor Summary
GraphView2D()
          Creates a new GraphView2D object.
GraphView2D(LayoutedGraph graph)
          Creates a new GraphView2D object for the given LayoutedGraph object.
 
Method Summary
 void centerGraph()
          Centers the graph and fits the size on.
 void exportJPEG(java.lang.String filename, float scale, boolean grayscale)
          Exports the GraphView as a jpeg-file.
 java.awt.Component getComponent()
          Returns the SWING/AWT component used by this instance.
 void setScale(double scale)
          Sets the scale factor.
 void setTranslateX(double translateX)
          Sets the x-translation.
 void setTranslateY(double translateY)
          Sets the y-translation.
 void updateGraphView()
          Fires an update of the GraphView manually.
 void updateNodes(java.util.Set<Node> nodes)
          Redraws the given nodes.
 void updateRules()
          Reapplies all rules.
 
Methods inherited from class pedviz.view.GraphView
addNodeListener, addRule, deselect, deselect, fireNodeEvent, getAlpha, getBackgroundColor, getEffect, getGraph, getRules, getScale, getSelection, getSelectionCount, getTranslateX, getTranslateY, hide, hideAll, highlight, highlight, isEdgeVisible, isMovingEnabled, isMultiselection, isSelected, isSelectionEnabled, isZoomEnabled, removeNodeListener, removeRule, select, select, setAlpha, setBackgroundColor, setCursor, setEdgeVisible, setEffect, setGraph, setMovingEnabled, setMultiselection, setRules, setSelectionEnabled, setTranslate, setZoomEnabled, show, showAll, unHighlightAll, updateGraphModel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphView2D

public GraphView2D()
Creates a new GraphView2D object.


GraphView2D

public GraphView2D(LayoutedGraph graph)
Creates a new GraphView2D object for the given LayoutedGraph object.

Parameters:
graph -
Method Detail

centerGraph

public void centerGraph()
Description copied from class: GraphView
Centers the graph and fits the size on.

Overrides:
centerGraph in class GraphView

exportJPEG

public void exportJPEG(java.lang.String filename,
                       float scale,
                       boolean grayscale)
Description copied from class: GraphView
Exports the GraphView as a jpeg-file.

Overrides:
exportJPEG in class GraphView
Parameters:
filename - filename
scale - scale factor

updateGraphView

public void updateGraphView()
Description copied from class: GraphView
Fires an update of the GraphView manually.

Overrides:
updateGraphView in class GraphView

getComponent

public java.awt.Component getComponent()
Description copied from class: GraphView
Returns the SWING/AWT component used by this instance.

Overrides:
getComponent in class GraphView
Returns:

setScale

public void setScale(double scale)
Description copied from class: GraphView
Sets the scale factor.

Overrides:
setScale in class GraphView
Parameters:
scale - scale factor

setTranslateX

public void setTranslateX(double translateX)
Description copied from class: GraphView
Sets the x-translation.

Overrides:
setTranslateX in class GraphView
Parameters:
translateX - x-translation

setTranslateY

public void setTranslateY(double translateY)
Description copied from class: GraphView
Sets the y-translation.

Overrides:
setTranslateY in class GraphView
Parameters:
translateY - y-translation

updateNodes

public void updateNodes(java.util.Set<Node> nodes)
Description copied from class: GraphView
Redraws the given nodes.

Overrides:
updateNodes in class GraphView
Parameters:
nodes - nodes that should be repainted.

updateRules

public void updateRules()
Description copied from class: GraphView
Reapplies all rules.

Overrides:
updateRules in class GraphView