|
Cytoscape 2.4.1 (c) 2006,2007 ISB, MSKCC, UCSD | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcytoscape.visual.mappings.PassThroughMapping
public class PassThroughMapping
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)
|
|
PassThroughMapping(Object defaultObj,
byte mapType)
Standard constructor for compatibility with new calculator creation in the UI. |
|
PassThroughMapping(Object defaultObj,
String attrName)
|
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)
|
Object |
clone()
|
Class[] |
getAcceptedDataClasses()
Return the classes that the ObjectMapping can map from, eg. the contents of the data of the controlling attribute. |
String |
getControllingAttributeName()
Get the controlling attribute name |
JPanel |
getLegend(String visualAttr,
byte b)
|
Properties |
getProperties(String baseKey)
Return a Properties object with entries suitable for customizing this object via the applyProperties method. |
Class |
getRangeClass()
|
JPanel |
getUI(JDialog parent,
CyNetwork network)
|
void |
removeChangeListener(ChangeListener l)
Empty implementation because PassThroughMapping has no UI. |
void |
setControllingAttributeName(String attrName,
CyNetwork network,
boolean preserveMapping)
Set the controlling attribute name. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PassThroughMapping(Object defaultObj, byte mapType)
defaultObj
- Default object - provided only to establish
mapping's range class.mapType
- unused.public PassThroughMapping(Object defaultObj)
public PassThroughMapping(Object defaultObj, String attrName)
Method Detail |
---|
public Object clone()
clone
in interface ObjectMapping
clone
in class Object
public Class getRangeClass()
getRangeClass
in interface ObjectMapping
public Class[] getAcceptedDataClasses()
ObjectMapping
For example, DiscreteMapping DiscreteMapping
can only accept
String types in the mapped attribute data. Likewise, ContinuousMapping
ContinuousMapping
can only accept numeric types in the mapped
attribute data since it must interpolate.
Return null if this mapping has no restrictions on the domain type.
getAcceptedDataClasses
in interface ObjectMapping
public String getControllingAttributeName()
ObjectMapping
getControllingAttributeName
in interface ObjectMapping
public void setControllingAttributeName(String attrName, CyNetwork network, boolean preserveMapping)
ObjectMapping
setControllingAttributeName
in interface ObjectMapping
public void addChangeListener(ChangeListener l)
addChangeListener
in interface ObjectMapping
l
- ChangeListener to addpublic void removeChangeListener(ChangeListener l)
removeChangeListener
in interface ObjectMapping
l
- ChangeListener to addpublic JPanel getUI(JDialog parent, CyNetwork network)
getUI
in interface ObjectMapping
public Object calculateRangeValue(Map attrBundle)
calculateRangeValue
in interface ObjectMapping
public void applyProperties(Properties props, String baseKey, ValueParser parser)
applyProperties
in interface ObjectMapping
public Properties getProperties(String baseKey)
getProperties
in interface ObjectMapping
public JPanel getLegend(String visualAttr, byte b)
getLegend
in interface ObjectMapping
|
www.cytoscape.org | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |