anl.aida.viz
Class ScaledNodeStyler

java.lang.Object
  extended by anl.aida.viz.AbstractCircleNodeStyler
      extended by anl.aida.viz.ScaledNodeStyler
All Implemented Interfaces:
NodeStyler

public class ScaledNodeStyler
extends AbstractCircleNodeStyler

Node style implementation that scales the size of the ellipse with respect to some intial size and document count. If a term node's document count is equal to the base initial count then the node will be the same as the original size. If the count is less than the initial count then the size will be smaller than the initial size and so on.


Field Summary
private  java.util.Map<java.lang.String,anl.aida.util.Pair<java.lang.Float,java.lang.Float>> sizeMap
           
 
Fields inherited from class anl.aida.viz.AbstractCircleNodeStyler
BASE_NODE_SIZE
 
Constructor Summary
ScaledNodeStyler(java.awt.Paint nodePaint, java.awt.Paint textPaint, edu.umd.cs.piccolo.PLayer layer)
          Layer is expected to contain PNodes with TermNode objects.
 
Method Summary
 float getSize(TermNode tNode)
          Gets the size appropriate for the specified term node.
 
Methods inherited from class anl.aida.viz.AbstractCircleNodeStyler
createNode, getPaint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sizeMap

private java.util.Map<java.lang.String,anl.aida.util.Pair<java.lang.Float,java.lang.Float>> sizeMap
Constructor Detail

ScaledNodeStyler

public ScaledNodeStyler(java.awt.Paint nodePaint,
                        java.awt.Paint textPaint,
                        edu.umd.cs.piccolo.PLayer layer)
Layer is expected to contain PNodes with TermNode objects.

Parameters:
nodePaint - the node paint
textPaint - the text paint
layer - the layer containing the PNodes whose sizes will be used as a base.
Method Detail

getSize

public float getSize(TermNode tNode)
Gets the size appropriate for the specified term node.

Parameters:
tNode - the node to get the size for
Returns:
the size appropriate for the specified term node.