Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.visual.mappings
Class ContinuousMapping

java.lang.Object
  extended by cytoscape.visual.SubjectBase
      extended by cytoscape.visual.mappings.ContinuousMapping
All Implemented Interfaces:
ObjectMapping, Cloneable

public class ContinuousMapping
extends SubjectBase
implements ObjectMapping

Implements an interpolation table mapping data to values of a particular class. The data value is extracted from a bundle of attributes by using a specified data attribute name. For refactoring changes in this class, please refer to: cytoscape.visual.mappings.continuous.README.txt.


Field Summary
 
Fields inherited from interface cytoscape.visual.mappings.ObjectMapping
EDGE_MAPPING, NODE_MAPPING
 
Constructor Summary
ContinuousMapping(Object defaultObj, byte mapType)
          Constructor.
 
Method Summary
 void addPoint(double value, BoundaryRangeValues brv)
          Adds a New Data Point.
 void applyProperties(Properties props, String baseKey, ValueParser parser)
          Customizes this object by applying mapping defintions described by the supplied Properties argument.
 Object calculateRangeValue(Map attrBundle)
          Calculates the Range Value.
 Object clone()
          Create deep copy of the object.
 Class[] getAcceptedDataClasses()
          Gets Accepted Data Classes.
 ArrayList<ContinuousMappingPoint> getAllPoints()
          Gets all Data Points.
 String getControllingAttributeName()
          Gets the Name of the Controlling Attribute.
 Interpolator getInterpolator()
          Gets the Mapping Interpolator.
 JPanel getLegend(String visualAttr, byte b)
          Deprecated. Use getLegend(VisualPropertyType) instead. Gone 5/2008.
 JPanel getLegend(VisualPropertyType vpt)
           
 ContinuousMappingPoint getPoint(int index)
          Gets Specified Point.
 int getPointCount()
          Gets Total Point Count.
 Properties getProperties(String baseKey)
          Returns a Properties object with entries suitable for customizing this object via the applyProperties method.
 Class getRangeClass()
          Gets the Range Class.
 JPanel getUI(JDialog dialog, CyNetwork network)
          Gets the UI Object Associated with the Mapper.
 void removePoint(int index)
          Removes a Point from the List.
 void setControllingAttributeName(String attrName, CyNetwork network, boolean preserveMapping)
          Sets the Name of the Controlling Attribte.
 void setInterpolator(Interpolator interpolator)
          Sets the Mapping Interpolator.
 
Methods inherited from class cytoscape.visual.SubjectBase
addChangeListener, fireStateChanged, removeChangeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cytoscape.visual.mappings.ObjectMapping
addChangeListener, removeChangeListener
 

Constructor Detail

ContinuousMapping

public ContinuousMapping(Object defaultObj,
                         byte mapType)
                  throws IllegalArgumentException
Constructor.

Parameters:
defaultObj - default object to map to
mapType - Type of mapping, one of ObjectMapping.EDGE_MAPPING or ObjectMapping.NODE_MAPPING
Throws:
IllegalArgumentException
Method Detail

clone

public Object clone()
Create deep copy of the object.

Specified by:
clone in interface ObjectMapping
Overrides:
clone in class Object
Returns:
Cloned Mapping Object.

getAllPoints

public ArrayList<ContinuousMappingPoint> getAllPoints()
Gets all Data Points.

Returns:
ArrayList of ContinuousMappingPoint objects.

addPoint

public void addPoint(double value,
                     BoundaryRangeValues brv)
Adds a New Data Point.


removePoint

public void removePoint(int index)
Removes a Point from the List.


getPointCount

public int getPointCount()
Gets Total Point Count.


getPoint

public ContinuousMappingPoint getPoint(int index)
Gets Specified Point.

Parameters:
index - Index Value.
Returns:
ContinuousMappingPoint.

applyProperties

public void applyProperties(Properties props,
                            String baseKey,
                            ValueParser parser)
Customizes this object by applying mapping defintions described by the supplied Properties argument. Required by the ObjectMapping interface.

Specified by:
applyProperties in interface ObjectMapping
Parameters:
props - Properties Object.
baseKey - Base Key for finding properties.
parser - ValueParser Object.

getProperties

public Properties getProperties(String baseKey)
Returns a Properties object with entries suitable for customizing this object via the applyProperties method. Required by the ObjectMapping interface.

Specified by:
getProperties in interface ObjectMapping
Parameters:
baseKey - Base Key for creating properties.
Returns:
Properties Object.

getRangeClass

public Class getRangeClass()
Gets the Range Class. Required by the ObjectMapping interface.

Specified by:
getRangeClass in interface ObjectMapping
Returns:
Class object.

getAcceptedDataClasses

public Class[] getAcceptedDataClasses()
Gets Accepted Data Classes. Required by the ObjectMapping interface.

Specified by:
getAcceptedDataClasses in interface ObjectMapping
Returns:
ArrayList of Class objects.

getControllingAttributeName

public String getControllingAttributeName()
Gets the Name of the Controlling Attribute. Required by the ObjectMapping interface.

Specified by:
getControllingAttributeName in interface ObjectMapping
Returns:
Attribue Name.

setControllingAttributeName

public void setControllingAttributeName(String attrName,
                                        CyNetwork network,
                                        boolean preserveMapping)
Sets the Name of the Controlling Attribte.

Specified by:
setControllingAttributeName in interface ObjectMapping
Parameters:
attrName - Attribute Name.
network - CytoscapeNetwork Object.
preserveMapping - Flag to preserve mapping.

getInterpolator

public Interpolator getInterpolator()
Gets the Mapping Interpolator. Required by the ObjectMapping interface.

Returns:
Interpolator Object.

setInterpolator

public void setInterpolator(Interpolator interpolator)
Sets the Mapping Interpolator. Required by the ObjectMapping interface.

Parameters:
interpolator - Interpolator Object.

getUI

public JPanel getUI(JDialog dialog,
                    CyNetwork network)
Gets the UI Object Associated with the Mapper. Required by the ObjectMapping interface.

Specified by:
getUI in interface ObjectMapping
Parameters:
dialog - Parent Dialog.
network - CyNetwork.
Returns:
JPanel Object.

getLegend

@Deprecated
public JPanel getLegend(String visualAttr,
                                   byte b)
Deprecated. Use getLegend(VisualPropertyType) instead. Gone 5/2008.

Specified by:
getLegend in interface ObjectMapping

getLegend

public JPanel getLegend(VisualPropertyType vpt)
Specified by:
getLegend in interface ObjectMapping

calculateRangeValue

public Object calculateRangeValue(Map attrBundle)
Calculates the Range Value. Required by the ObjectMapping interface.

Specified by:
calculateRangeValue in interface ObjectMapping
Parameters:
attrBundle - A Bundle of Attributes.
Returns:
Mapping object.

www.cytoscape.org