|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectMapping
Mappings should implement this interface. Mappings are classes that map from
a value stored in the edge attributes or node attributes HashMap in
cytoscape.CyAttributes
. The range of the mapping depends on the
AbstractCalculator
that owns
the mapping.
All classes implementing this interface MUST have a constructor that
takes the arguments Object, CyNetwork, byte, where Object is the default object
the mapper should map to, CyNetwork is the CyNetwork object representing the network
displayed in Cytoscape, and the byte is one of EDGE_MAPPING
or
NODE_MAPPING
.
K - Key attribute value. Can be any type (for this implementation, number, string, boolean, list, or map).
V - Mapped visual value, such as color, node shape, etc.
Field Summary | |
---|---|
static byte |
EDGE_MAPPING
Deprecated. |
static byte |
NODE_MAPPING
Deprecated. |
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener l)
Add a ChangeListener to the mapping. |
void |
applyProperties(Properties props,
String baseKey,
ValueParser parser)
|
Object |
calculateRangeValue(Map<String,Object> attrBundle)
Create a mapped visual representation from the given attribute value. |
Object |
clone()
|
Class<?>[] |
getAcceptedDataClasses()
Return the classes that the ObjectMapping can map from, eg. |
String |
getControllingAttributeName()
Get the controlling attribute name |
JPanel |
getLegend(VisualPropertyType type)
|
Properties |
getProperties(String baseKey)
|
Class<?> |
getRangeClass()
Class of mapped object. |
JPanel |
getUI(JDialog parent,
CyNetwork network)
Deprecated. |
void |
removeChangeListener(ChangeListener l)
Remove a ChangeListener from the mapping. |
void |
setControllingAttributeName(String controllingAttrName)
Set controlling attribute of this mapping. |
void |
setControllingAttributeName(String attrName,
CyNetwork network,
boolean preserveMapping)
Deprecated. Will be removed in 2.8. Use setControllingAttributeName(final String controllingAttrName) instead. |
Field Detail |
---|
@Deprecated static final byte EDGE_MAPPING
@Deprecated static final byte NODE_MAPPING
Method Detail |
---|
Class<?> getRangeClass()
Class<?>[] getAcceptedDataClasses()
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.
@Deprecated void setControllingAttributeName(String attrName, CyNetwork network, boolean preserveMapping)
void setControllingAttributeName(String controllingAttrName)
controllingAttrName
- - name of the attribute associated with this mapping.String getControllingAttributeName()
void addChangeListener(ChangeListener l)
l
- ChangeListener to addvoid removeChangeListener(ChangeListener l)
l
- ChangeListener to addObject calculateRangeValue(Map<String,Object> attrBundle)
attrBundle
-
JPanel getLegend(VisualPropertyType type)
Object clone()
void applyProperties(Properties props, String baseKey, ValueParser parser)
Properties getProperties(String baseKey)
@Deprecated JPanel getUI(JDialog parent, CyNetwork network)
parent
- network
-
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |