Cytoscape 2.8.0 API

cytoscape.visual.mappings
Class PassThroughMapping

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

public class PassThroughMapping
extends AbstractMapping

Defines a mapping from a bundle of data attributes to a visual attribute. The returned value is simply the value of one of the data attributes, defined by the controlling attribute name. This value is type-checked against the expected range class; null is returned instead if the data value is of the wrong type.


Field Summary
 
Fields inherited from class cytoscape.visual.mappings.AbstractMapping
acceptedClasses, controllingAttrName, rangeClass
 
Fields inherited from class cytoscape.visual.SubjectBase
observers
 
Fields inherited from interface cytoscape.visual.mappings.ObjectMapping
EDGE_MAPPING, NODE_MAPPING
 
Constructor Summary
PassThroughMapping(Class<?> rangeClass, String controllingAttributeName)
          Creates a new PassThroughMapping object.
PassThroughMapping(Object defaultObj)
          Deprecated. Use new constructor instead. Will be removed in 10/2011. Controlling attribute name is always required, and now it's a part of constructor argument.
PassThroughMapping(Object defaultObj, byte mapType)
          Deprecated. Use new constructor instead. Will be removed in 10/2011. Controlling attribute name is always required, and now it's a part of constructor argument.
PassThroughMapping(Object defaultObj, String attrName)
          Deprecated. Use new constructor instead. Will be removed in 10/2011. Controlling attribute name is always required, and now it's a part of constructor argument.
 
Method Summary
 void addChangeListener(ChangeListener l)
          Empty implementation because PassThroughMapping has no UI.
 void applyProperties(Properties props, String baseKey, ValueParser parser)
          Customize this object by applying mapping defintions described by the supplied Properties argument.
 Object calculateRangeValue(Map<String,Object> attrBundle)
          DOCUMENT ME!
 Object clone()
          Create clone of this instance.
 JPanel getLegend(VisualPropertyType vpt)
          DOCUMENT ME!
 Properties getProperties(String baseKey)
          Return a Properties object with entries suitable for customizing this object via the applyProperties method.
 RangeValueCalculator<?> getRangeValueCalculator()
           
 void removeChangeListener(ChangeListener l)
          Empty implementation because PassThroughMapping has no UI.
 
Methods inherited from class cytoscape.visual.mappings.AbstractMapping
getAcceptedDataClasses, getControllingAttributeName, getRangeClass, getUI, setControllingAttributeName, setControllingAttributeName
 
Methods inherited from class cytoscape.visual.SubjectBase
fireStateChanged
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PassThroughMapping

@Deprecated
public PassThroughMapping(Object defaultObj,
                                     byte mapType)
Deprecated. Use new constructor instead. Will be removed in 10/2011. Controlling attribute name is always required, and now it's a part of constructor argument.

Standard constructor for compatibility with new calculator creation in the UI.

Parameters:
defaultObj - Default object - provided only to establish mapping's range class.
mapType - unused. Will be removed in the next release (2.8). Map Type is not in use.

PassThroughMapping

@Deprecated
public PassThroughMapping(Object defaultObj)
Deprecated. Use new constructor instead. Will be removed in 10/2011. Controlling attribute name is always required, and now it's a part of constructor argument.

Creates a new PassThroughMapping object.

Parameters:
defaultObj - DOCUMENT ME!

PassThroughMapping

@Deprecated
public PassThroughMapping(Object defaultObj,
                                     String attrName)
Deprecated. Use new constructor instead. Will be removed in 10/2011. Controlling attribute name is always required, and now it's a part of constructor argument.

Parameters:
defaultObj -
attrName -

PassThroughMapping

public PassThroughMapping(Class<?> rangeClass,
                          String controllingAttributeName)
Creates a new PassThroughMapping object.

Parameters:
defaultObj - DOCUMENT ME!
controllingAttributeName - DOCUMENT ME!
Method Detail

clone

public Object clone()
Create clone of this instance.

Specified by:
clone in interface ObjectMapping
Specified by:
clone in class AbstractMapping
Returns:
DOCUMENT ME!

addChangeListener

public void addChangeListener(ChangeListener l)
Empty implementation because PassThroughMapping has no UI.

Specified by:
addChangeListener in interface ObjectMapping
Overrides:
addChangeListener in class SubjectBase
Parameters:
l - ChangeListener to add

removeChangeListener

public void removeChangeListener(ChangeListener l)
Empty implementation because PassThroughMapping has no UI.

Specified by:
removeChangeListener in interface ObjectMapping
Overrides:
removeChangeListener in class SubjectBase
Parameters:
l - ChangeListener to add

calculateRangeValue

public Object calculateRangeValue(Map<String,Object> attrBundle)
DOCUMENT ME!

Specified by:
calculateRangeValue in interface ObjectMapping
Specified by:
calculateRangeValue in class AbstractMapping
Parameters:
attrBundle - DOCUMENT ME!
Returns:
DOCUMENT ME!

getRangeValueCalculator

public RangeValueCalculator<?> getRangeValueCalculator()

applyProperties

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

Specified by:
applyProperties in interface ObjectMapping
Specified by:
applyProperties in class AbstractMapping

getProperties

public Properties getProperties(String baseKey)
Return a Properties object with entries suitable for customizing this object via the applyProperties method.

Specified by:
getProperties in interface ObjectMapping
Specified by:
getProperties in class AbstractMapping

getLegend

public JPanel getLegend(VisualPropertyType vpt)
DOCUMENT ME!

Specified by:
getLegend in interface ObjectMapping
Overrides:
getLegend in class AbstractMapping
Parameters:
vpt - DOCUMENT ME!
Returns:
DOCUMENT ME!

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.