pedviz.view
Class GraphView3D

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

public class GraphView3D
extends GraphView

This class visualizes a LayoutedGraph object in a three-dimensional environment.

Version:
0.1
Author:
Lukas Forer

Constructor Summary
GraphView3D()
          Creates a new GraphView object.
GraphView3D(java.awt.GraphicsConfiguration config)
          Constructs a GraphView with the given configuration.
GraphView3D(java.awt.GraphicsConfiguration config, LayoutedGraph graph)
          Constructs a GraphView with the given configuration and displays the given LayoutedGaph object.
GraphView3D(LayoutedGraph graph)
          Creates a new GraphView object and displays the given LayoutedGaph object.
 
Method Summary
 void centerGraph()
          Centers the graph and fits the size on.
 void deselect()
          Deselects all nodes that are currently selected.
 void deselect(Node node)
          Deselects the given node if it's selected.
 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 hide(Node node)
          Hides the given node if it's shown.
 void hideAll()
          Hides all nodes that are currently shown.
 void highlight(java.util.Collection<Node> nodes)
          Highlights a collection of nodes.
 void highlight(Node node)
          Highlights the given node.
 boolean isAntialiasingEnabled()
          Returns true if the visualization uses antialiasing.
 boolean isLightEnabled()
          Returns true if the visualization uses lights.
 boolean isMaterialEnabled()
          Returns true if the nodes use matrials.
 boolean isTransparencyEnabled()
          Returns true if the visualization uses transparency.
 boolean isVisbleSphere()
          Returns true, if the sphere is visible.
 void select(Node node)
          Selects a single node.
 void setAntialiasingEnabled(boolean useAntialiasing)
          Enables or disables antiliasing.
 void setBackgroundColor(java.awt.Color backgroundColor)
          Sets the background color of this component.
 void setEdgeVisible(boolean flag)
          Displays or hides the edges.
 void setGraph(LayoutedGraph graph)
          Sets the LayoutedGraph for this view..
 void setLightEnabled(boolean useLight)
          Enables or disables transparency lights.
 void setMaterialEnabled(boolean useMaterial)
          Enables or disables materials.
 void setMovingEnabled(boolean flag)
          Enables or disables moving.
 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 setTransparencyEnabled(boolean useTransparency)
          Enables or disables transparency.
 void setVisbleSphere(boolean visbleSphere)
          Sets the visibilty of the sphere.
 void setXRotatingEnabled(boolean xRotating)
          Enables or disables rotating on the x-axis.
 void setYRotatingEnabled(boolean yRotating)
          Enables or disables rotating on the y-axis..
 void setZoomEnabled(boolean flag)
          Enables or disables zooming.
 void show(Node node)
          Shows the given node if it's hidden.
 void showAll()
          Shows all nodes that are currently hidden.
 void unHighlightAll()
          Clears accentuation for all nodes.
 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, fireNodeEvent, getAlpha, getBackgroundColor, getEffect, getGraph, getRules, getScale, getSelection, getSelectionCount, getTranslateX, getTranslateY, isEdgeVisible, isMovingEnabled, isMultiselection, isSelected, isSelectionEnabled, isZoomEnabled, removeNodeListener, removeRule, select, setAlpha, setCursor, setEffect, setMultiselection, setRules, setSelectionEnabled, setTranslate, updateGraphModel, updateGraphView
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphView3D

public GraphView3D()
Creates a new GraphView object.


GraphView3D

public GraphView3D(LayoutedGraph graph)
Creates a new GraphView object and displays the given LayoutedGaph object.

Parameters:
graph -

GraphView3D

public GraphView3D(java.awt.GraphicsConfiguration config,
                   LayoutedGraph graph)
Constructs a GraphView with the given configuration and displays the given LayoutedGaph object.

Parameters:
config - Configuration
graph - LayoutedGraph object

GraphView3D

public GraphView3D(java.awt.GraphicsConfiguration config)
Constructs a GraphView with the given configuration.

Parameters:
config - Configuration
Method Detail

setGraph

public void setGraph(LayoutedGraph graph)
Description copied from class: GraphView
Sets the LayoutedGraph for this view..

Overrides:
setGraph in class GraphView
Parameters:
graph - Graph object

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:

centerGraph

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

Overrides:
centerGraph in class GraphView

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

unHighlightAll

public void unHighlightAll()
Description copied from class: GraphView
Clears accentuation for all nodes.

Overrides:
unHighlightAll in class GraphView

highlight

public void highlight(Node node)
Description copied from class: GraphView
Highlights the given node.

Overrides:
highlight in class GraphView
Parameters:
node - node

highlight

public void highlight(java.util.Collection<Node> nodes)
Description copied from class: GraphView
Highlights a collection of nodes.

Overrides:
highlight in class GraphView
Parameters:
nodes - list of nodes

deselect

public void deselect()
Description copied from class: GraphView
Deselects all nodes that are currently selected.

Overrides:
deselect in class GraphView

deselect

public void deselect(Node node)
Description copied from class: GraphView
Deselects the given node if it's selected.

Overrides:
deselect in class GraphView
Parameters:
node - node

show

public void show(Node node)
Description copied from class: GraphView
Shows the given node if it's hidden.

Overrides:
show in class GraphView
Parameters:
node - node

hide

public void hide(Node node)
Description copied from class: GraphView
Hides the given node if it's shown.

Overrides:
hide in class GraphView
Parameters:
node - node

showAll

public void showAll()
Description copied from class: GraphView
Shows all nodes that are currently hidden.

Overrides:
showAll in class GraphView

hideAll

public void hideAll()
Description copied from class: GraphView
Hides all nodes that are currently shown.

Overrides:
hideAll in class GraphView

select

public void select(Node node)
Description copied from class: GraphView
Selects a single node.

Overrides:
select in class GraphView
Parameters:
node - node

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

setBackgroundColor

public void setBackgroundColor(java.awt.Color backgroundColor)
Description copied from class: GraphView
Sets the background color of this component.

Overrides:
setBackgroundColor in class GraphView

setEdgeVisible

public void setEdgeVisible(boolean flag)
Description copied from class: GraphView
Displays or hides the edges.

Overrides:
setEdgeVisible in class GraphView

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.

setZoomEnabled

public void setZoomEnabled(boolean flag)
Description copied from class: GraphView
Enables or disables zooming.

Overrides:
setZoomEnabled in class GraphView

setMovingEnabled

public void setMovingEnabled(boolean flag)
Description copied from class: GraphView
Enables or disables moving.

Overrides:
setMovingEnabled in class GraphView

setYRotatingEnabled

public void setYRotatingEnabled(boolean yRotating)
Enables or disables rotating on the y-axis..

Parameters:
flag -

setXRotatingEnabled

public void setXRotatingEnabled(boolean xRotating)
Enables or disables rotating on the x-axis.

Parameters:
flag -

isTransparencyEnabled

public boolean isTransparencyEnabled()
Returns true if the visualization uses transparency.

Returns:
true if the visualization uses transparency.

setTransparencyEnabled

public void setTransparencyEnabled(boolean useTransparency)
Enables or disables transparency.

Parameters:
useTransparency -

isAntialiasingEnabled

public boolean isAntialiasingEnabled()
Returns true if the visualization uses antialiasing.

Returns:
true if the visualization uses antialiasing.

setAntialiasingEnabled

public void setAntialiasingEnabled(boolean useAntialiasing)
Enables or disables antiliasing.

Parameters:
useAntialiasing -

isMaterialEnabled

public boolean isMaterialEnabled()
Returns true if the nodes use matrials.

Returns:
true if transparency will be used.

setMaterialEnabled

public void setMaterialEnabled(boolean useMaterial)
Enables or disables materials.

Parameters:
useMaterial -

isLightEnabled

public boolean isLightEnabled()
Returns true if the visualization uses lights.

Returns:
true if the visualization uses lights.

setLightEnabled

public void setLightEnabled(boolean useLight)
Enables or disables transparency lights.

Parameters:
useLight -

isVisbleSphere

public boolean isVisbleSphere()
Returns true, if the sphere is visible.

Returns:
true, if the sphere is visible.

setVisbleSphere

public void setVisbleSphere(boolean visbleSphere)
Sets the visibilty of the sphere.

Parameters:
visbleSphere - the visibilty of the sphere.

updateRules

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

Overrides:
updateRules in class GraphView