cytoscape.visual.calculators
Class GenericNodeSizeCalculator

java.lang.Object
  extended by cytoscape.visual.calculators.AbstractCalculator
      extended by cytoscape.visual.calculators.NodeCalculator
          extended by cytoscape.visual.calculators.GenericNodeSizeCalculator
All Implemented Interfaces:
Calculator, NodeSizeCalculator, Cloneable

public class GenericNodeSizeCalculator
extends NodeCalculator
implements NodeSizeCalculator


Nested Class Summary
 
Nested classes/interfaces inherited from class cytoscape.visual.calculators.AbstractCalculator
AbstractCalculator.CalculatorUI, AbstractCalculator.MappingListener
 
Field Summary
 
Fields inherited from class cytoscape.visual.calculators.AbstractCalculator
acceptedDataClasses, changeEvent, changeListeners, ID, mappings, name
 
Constructor Summary
GenericNodeSizeCalculator(String name, ObjectMapping m)
           
GenericNodeSizeCalculator(String name, Properties props, String baseKey)
          Constructor for dynamic creation via properties.
 
Method Summary
 double calculateNodeSize(giny.model.Node node, CyNetwork network)
          calculateNodeSize returns -1 if there is no mapping; since a negative number has no meaning as a node size, this is a case that the caller of calculateNodeSize should expect to handle.
 
Methods inherited from class cytoscape.visual.calculators.NodeCalculator
getAttrBundle, getUI
 
Methods inherited from class cytoscape.visual.calculators.AbstractCalculator
addChangeListener, addMapping, clone, fireStateChanged, getAttrBundle, getDupeCount, getMapping, getMappings, getProperties, getUI, removeChangeListener, setName, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cytoscape.visual.calculators.Calculator
addChangeListener, clone, getProperties, getUI, removeChangeListener, setName, toString
 

Constructor Detail

GenericNodeSizeCalculator

public GenericNodeSizeCalculator(String name,
                                 ObjectMapping m)

GenericNodeSizeCalculator

public GenericNodeSizeCalculator(String name,
                                 Properties props,
                                 String baseKey)
Constructor for dynamic creation via properties.

Method Detail

calculateNodeSize

public double calculateNodeSize(giny.model.Node node,
                                CyNetwork network)
calculateNodeSize returns -1 if there is no mapping; since a negative number has no meaning as a node size, this is a case that the caller of calculateNodeSize should expect to handle. The usual caller is NodeAppearanceCalculator.

Specified by:
calculateNodeSize in interface NodeSizeCalculator