anl.aida.viz
Class GrayScaleEdgeStyler

java.lang.Object
  extended by anl.aida.viz.AbstractEdgeStyler
      extended by anl.aida.viz.GrayScaleEdgeStyler
All Implemented Interfaces:
EdgeStyler

public class GrayScaleEdgeStyler
extends AbstractEdgeStyler

Styles edges such that the edges are drawn on a gray scale such that edges with more docs are darker than those with less.


Field Summary
(package private)  float diff
           
(package private)  float max
           
(package private)  float min
           
 
Constructor Summary
GrayScaleEdgeStyler(ConceptGraph<TermNode> graph)
           
 
Method Summary
 java.awt.Paint getPaint(CGEdge edge)
          Gets the paint appropriate for the specified edge.
private  float scale(CGEdge edge)
           
 void update(java.util.Collection<CGEdge> edges)
          Updates the styler with new edge info.
 
Methods inherited from class anl.aida.viz.AbstractEdgeStyler
createEdge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

min

float min

max

float max

diff

float diff
Constructor Detail

GrayScaleEdgeStyler

public GrayScaleEdgeStyler(ConceptGraph<TermNode> graph)
Method Detail

update

public void update(java.util.Collection<CGEdge> edges)
Description copied from interface: EdgeStyler
Updates the styler with new edge info. This can be used to recalculate min, max etc. when a graph has changed.


getPaint

public java.awt.Paint getPaint(CGEdge edge)
Description copied from interface: EdgeStyler
Gets the paint appropriate for the specified edge.

Parameters:
edge - the edge we want the paint for
Returns:
the paint appropriate for the specified edge.

scale

private float scale(CGEdge edge)