be.ac.ulg.montefiore.run.totem.visualtopo.graph
Class GraphAspectFunctions.VertexAspectFunction

java.lang.Object
  extended by edu.uci.ics.jung.graph.decorators.AbstractVertexShapeFunction
      extended by be.ac.ulg.montefiore.run.totem.visualtopo.graph.GraphAspectFunctions.VertexAspectFunction
All Implemented Interfaces:
edu.uci.ics.jung.graph.decorators.SettableVertexShapeFunction, edu.uci.ics.jung.graph.decorators.VertexAspectRatioFunction, edu.uci.ics.jung.graph.decorators.VertexPaintFunction, edu.uci.ics.jung.graph.decorators.VertexShapeFunction, edu.uci.ics.jung.graph.decorators.VertexSizeFunction, edu.uci.ics.jung.graph.decorators.VertexStrokeFunction
Enclosing class:
GraphAspectFunctions

public static final class GraphAspectFunctions.VertexAspectFunction
extends edu.uci.ics.jung.graph.decorators.AbstractVertexShapeFunction
implements edu.uci.ics.jung.graph.decorators.VertexPaintFunction, edu.uci.ics.jung.graph.decorators.VertexSizeFunction, edu.uci.ics.jung.graph.decorators.VertexAspectRatioFunction, edu.uci.ics.jung.graph.decorators.VertexStrokeFunction

This inner class manage all properties of the vertices representation (shapes, colors, size, ...)


Field Summary
 
Fields inherited from class edu.uci.ics.jung.graph.decorators.AbstractVertexShapeFunction
DEFAULT_ASPECT_RATIO, DEFAULT_SIZE, factory, varf, vsf
 
Fields inherited from interface edu.uci.ics.jung.graph.decorators.VertexPaintFunction
TRANSPARENT
 
Constructor Summary
GraphAspectFunctions.VertexAspectFunction()
          a simple constructor
 
Method Summary
 float getAspectRatio(edu.uci.ics.jung.graph.Vertex v)
          compute width/heigth ratio for a Vertex
 java.awt.Paint getDrawPaint(edu.uci.ics.jung.graph.Vertex vertex)
          returns the vertex border color.
 java.awt.Paint getFillPaint(edu.uci.ics.jung.graph.Vertex vertex)
          returns the vertex inner color.
 java.awt.Shape getShape(edu.uci.ics.jung.graph.Vertex v)
          Compute appropiate shape for the vertex (here a circle)
 int getSize(edu.uci.ics.jung.graph.Vertex vertex)
          return vertex size
 java.awt.Stroke getStroke(edu.uci.ics.jung.graph.Vertex v)
          Returns border effect for the vertex
 
Methods inherited from class edu.uci.ics.jung.graph.decorators.AbstractVertexShapeFunction
setAspectRatioFunction, setSizeFunction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphAspectFunctions.VertexAspectFunction

public GraphAspectFunctions.VertexAspectFunction()
a simple constructor

Method Detail

getFillPaint

public java.awt.Paint getFillPaint(edu.uci.ics.jung.graph.Vertex vertex)
returns the vertex inner color.

Specified by:
getFillPaint in interface edu.uci.ics.jung.graph.decorators.VertexPaintFunction
Parameters:
vertex -
Returns:
the vertex inner color

getDrawPaint

public java.awt.Paint getDrawPaint(edu.uci.ics.jung.graph.Vertex vertex)
returns the vertex border color.

Specified by:
getDrawPaint in interface edu.uci.ics.jung.graph.decorators.VertexPaintFunction
Parameters:
vertex -
Returns:
the vertex border color

getSize

public int getSize(edu.uci.ics.jung.graph.Vertex vertex)
return vertex size

Specified by:
getSize in interface edu.uci.ics.jung.graph.decorators.VertexSizeFunction
Parameters:
vertex -
Returns:
the size of the vertex

getAspectRatio

public float getAspectRatio(edu.uci.ics.jung.graph.Vertex v)
compute width/heigth ratio for a Vertex

Specified by:
getAspectRatio in interface edu.uci.ics.jung.graph.decorators.VertexAspectRatioFunction
Parameters:
v - a Vertex
Returns:
an integer : the appropriate width/heigth ratio

getShape

public java.awt.Shape getShape(edu.uci.ics.jung.graph.Vertex v)
Compute appropiate shape for the vertex (here a circle)

Specified by:
getShape in interface edu.uci.ics.jung.graph.decorators.VertexShapeFunction
Parameters:
v - a vertex
Returns:
Returns vertex shape

getStroke

public java.awt.Stroke getStroke(edu.uci.ics.jung.graph.Vertex v)
Returns border effect for the vertex

Specified by:
getStroke in interface edu.uci.ics.jung.graph.decorators.VertexStrokeFunction
Parameters:
v - a vertex
Returns:
a Stroke


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.