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 theVisualPropertyused 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
FieldsModifier and TypeFieldDescriptionprotected final StringMapping attribute name.Type of attribute.protected final CyEventHelperprotected final VisualProperty<V>Visual Property used in this mapping. -
Constructor Summary
ConstructorsConstructorDescriptionAbstractVisualMappingFunction(String columnName, Class<K> columnType, VisualProperty<V> vp, CyEventHelper eventHelper) Constructs this AbstractVisualMappingFunction. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(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, waitMethods 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:VisualMappingFunctionReturns attribute name used in this mapping. This field is immutable.- Specified by:
getMappingColumnNamein interfaceVisualMappingFunction<K,V> - Returns:
- name of attribute (a column name in data table) associated with this mapping.
-
getMappingColumnType
Description copied from interface:VisualMappingFunctionReturns data type of mapping attribute.- Specified by:
getMappingColumnTypein interfaceVisualMappingFunction<K,V> - Returns:
- data type of controlling attribute.
-
getVisualProperty
Description copied from interface:VisualMappingFunctionVisual Property associated with this function. This field is immutable.- Specified by:
getVisualPropertyin interfaceVisualMappingFunction<K,V> - Returns:
- VisualProperty used in this mapping.
-
apply
Description copied from interface:VisualMappingFunctionApply mapping to the view model. Once this method is called, Cytoscape updates the view model and fires proper events.- Specified by:
applyin 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.
-