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

cytoscape.visual.mappings
Class PassThroughMapping

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

public class PassThroughMapping
extends Object
implements ObjectMapping

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 interface cytoscape.visual.mappings.ObjectMapping
EDGE_MAPPING, NODE_MAPPING
 
Constructor Summary
PassThroughMapping(Object defaultObj)
          Creates a new PassThroughMapping object.
PassThroughMapping(Object defaultObj, byte mapType)
          Standard constructor for compatibility with new calculator creation in the UI.
PassThroughMapping(Object defaultObj, String attrName)
          Creates a new PassThroughMapping object.
 
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 attrBundle)
          DOCUMENT ME!
 Object clone()
          DOCUMENT ME!
 Class[] getAcceptedDataClasses()
          DOCUMENT ME!
 String getControllingAttributeName()
          DOCUMENT ME!
 JPanel getLegend(String visualAttr, byte b)
          Deprecated. Use getLegend(VisualPropertyType) instead. Gone 5/2008.
 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.
 Class getRangeClass()
          DOCUMENT ME!
 JPanel getUI(JDialog parent, CyNetwork network)
          DOCUMENT ME!
 void removeChangeListener(ChangeListener l)
          Empty implementation because PassThroughMapping has no UI.
 void setControllingAttributeName(String attrName, CyNetwork network, boolean preserveMapping)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PassThroughMapping

public PassThroughMapping(Object defaultObj,
                          byte mapType)
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.

PassThroughMapping

public PassThroughMapping(Object defaultObj)
Creates a new PassThroughMapping object.

Parameters:
defaultObj - DOCUMENT ME!

PassThroughMapping

public PassThroughMapping(Object defaultObj,
                          String attrName)
Creates a new PassThroughMapping object.

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

clone

public Object clone()
DOCUMENT ME!

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

getRangeClass

public Class getRangeClass()
DOCUMENT ME!

Specified by:
getRangeClass in interface ObjectMapping
Returns:
DOCUMENT ME!

getAcceptedDataClasses

public Class[] getAcceptedDataClasses()
DOCUMENT ME!

Specified by:
getAcceptedDataClasses in interface ObjectMapping
Returns:
DOCUMENT ME!

getControllingAttributeName

public String getControllingAttributeName()
DOCUMENT ME!

Specified by:
getControllingAttributeName in interface ObjectMapping
Returns:
DOCUMENT ME!

setControllingAttributeName

public void setControllingAttributeName(String attrName,
                                        CyNetwork network,
                                        boolean preserveMapping)
DOCUMENT ME!

Specified by:
setControllingAttributeName in interface ObjectMapping
Parameters:
attrName - DOCUMENT ME!
network - DOCUMENT ME!
preserveMapping - DOCUMENT ME!

addChangeListener

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

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

removeChangeListener

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

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

getUI

public JPanel getUI(JDialog parent,
                    CyNetwork network)
DOCUMENT ME!

Specified by:
getUI in interface ObjectMapping
Parameters:
parent - DOCUMENT ME!
network - DOCUMENT ME!
Returns:
DOCUMENT ME!

calculateRangeValue

public Object calculateRangeValue(Map attrBundle)
DOCUMENT ME!

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

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

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

getLegend

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

DOCUMENT ME!

Specified by:
getLegend in interface ObjectMapping
Parameters:
visualAttr - DOCUMENT ME!
b - DOCUMENT ME!
Returns:
DOCUMENT ME!

getLegend

public JPanel getLegend(VisualPropertyType vpt)
DOCUMENT ME!

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

www.cytoscape.org