Cytoscape 3.0.1 API

org.cytoscape.view.vizmap.mappings
Interface ValueTranslator<V,T>

Type Parameters:
V - Data type of the column used for mapping
T - Type of Visual Property range value. Such as Color, Number, String.

public interface ValueTranslator<V,T>

Translate given table value to a Visual Property value. This will be used by Passthrough Mapping.


Method Summary
 Class<T> getTranslatedValueType()
          Returns compatible input data type.
 T translate(V inputValue)
          Convert input value to Visual Property value.
 

Method Detail

translate

T translate(V inputValue)
Convert input value to Visual Property value. For example, if this is a translator from text representation of color to Color object, inputValue is a String value and return value is a Color build from the given string.

Parameters:
inputValue - table value of type V.
Returns:
translated Visual Property value.

getTranslatedValueType

Class<T> getTranslatedValueType()
Returns compatible input data type.

Returns:
data type of input value.

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.