Class AbstractVisualMappingFunction<K,V>
java.lang.Object
org.cytoscape.view.vizmap.mappings.AbstractVisualMappingFunction<K,V>
- Type Parameters:
K
- Generic type of the attribute mapped.V
- Generic type of theVisualProperty
used in this mapping.
- All Implemented Interfaces:
VisualMappingFunction<K,V>
public abstract class AbstractVisualMappingFunction<K,V>
extends Object
implements VisualMappingFunction<K,V>
A base class for visual mapping functions where all fields are immutable.
Cytoscape Backwards Compatibility (Abstract Class): This class is abstract and meant to be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
Module: vizmap-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>vizmap-api</artifactId> </dependency>
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
Mapping attribute name.Type of attribute.protected CyEventHelper
protected VisualProperty<V>
Visual Property used in this mapping. -
Constructor Summary
ConstructorDescriptionAbstractVisualMappingFunction(String columnName, Class<K> columnType, VisualProperty<V> vp, CyEventHelper eventHelper)
Constructs this AbstractVisualMappingFunction. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply(CyRow row, View<? extends CyIdentifiable> view)
Apply mapping to the view model.Returns attribute name used in this mapping.Returns data type of mapping attribute.Visual Property associated with this function.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cytoscape.view.vizmap.VisualMappingFunction
getMappedValue
-
Field Details
-
columnName
Mapping attribute name. -
columnType
Type of attribute. -
vp
Visual Property used in this mapping. -
eventHelper
-
-
Constructor Details
-
AbstractVisualMappingFunction
public AbstractVisualMappingFunction(String columnName, Class<K> columnType, VisualProperty<V> vp, CyEventHelper eventHelper)Constructs this AbstractVisualMappingFunction.- Parameters:
columnName
- Mapping attribute column name.columnType
- Type of attribute column.vp
- Visual Property used in this mapping.
-
-
Method Details
-
getMappingColumnName
Description copied from interface:VisualMappingFunction
Returns attribute name used in this mapping. This field is immutable.- Specified by:
getMappingColumnName
in interfaceVisualMappingFunction<K,V>
- Returns:
- name of attribute (a column name in data table) associated with this mapping.
-
getMappingColumnType
Description copied from interface:VisualMappingFunction
Returns data type of mapping attribute.- Specified by:
getMappingColumnType
in interfaceVisualMappingFunction<K,V>
- Returns:
- data type of controlling attribute.
-
getVisualProperty
Description copied from interface:VisualMappingFunction
Visual Property associated with this function. This field is immutable.- Specified by:
getVisualProperty
in interfaceVisualMappingFunction<K,V>
- Returns:
- VisualProperty used in this mapping.
-
apply
Description copied from interface:VisualMappingFunction
Apply mapping to the view model. Once this method is called, Cytoscape updates the view model and fires proper events.- Specified by:
apply
in interfaceVisualMappingFunction<K,V>
- Parameters:
row
- The data row used to create the visual property value for the specified view.view
- target View model to be updated. View should be one of the following: Node, Edge, or Network.
-