Package org.cytoscape.view.model
Interface VisualProperty<T>
-
- Type Parameters:
T
- the dataType of the VisualProperty, i.e. what kind of objects are the values
- All Known Implementing Classes:
AbstractVisualProperty
,ArrowShapeVisualProperty
,BooleanVisualProperty
,DefaultVisualizableVisualProperty
,DoubleVisualProperty
,EdgeBendVisualProperty
,FontVisualProperty
,IntegerVisualProperty
,LineTypeVisualProperty
,NodeShapeVisualProperty
,NullVisualProperty
,PaintVisualProperty
,StringVisualProperty
public interface VisualProperty<T>
An object which represents a type of visual entity, such as node color, size, etc. Visual Property itself does NOT have any hierarchy/dependency. It will be implemented in VisualLexicon.Module:
viewmodel-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>viewmodel-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
getDefault()
The default value of this property.String
getDisplayName()
Returns a short string suitable for presentation to humans.String
getIdString()
Returns a short string used to identify this visual property and suitable for serializing to XML and other text formats.Range<T>
getRange()
Returns theRange
of this VisualProperty.Class<? extends CyIdentifiable>
getTargetDataType()
VisualProperty is always associated with a data type.T
parseSerializableString(String value)
Returns an object of type T given a string serialized from the getSerializableString(T value) method.boolean
shouldIgnoreDefault()
In some cases, default value from visual style is not suitable, such as x, y, z location of nodes.String
toSerializableString(T value)
Returns a string of the specified value suitable for serializing to XML other text output.
-
-
-
Method Detail
-
getRange
Range<T> getRange()
Returns theRange
of this VisualProperty.- Returns:
- the
Range
of this VisualProperty.
-
getDefault
T getDefault()
The default value of this property. This value is immutable.- Returns:
- The default value of this property.
-
getIdString
String getIdString()
Returns a short string used to identify this visual property and suitable for serializing to XML and other text formats.- Returns:
- A short string used to identify this visual property and suitable for serialization.
-
getDisplayName
String getDisplayName()
Returns a short string suitable for presentation to humans. Should not be used for serialization.- Returns:
- A short string suitable for presentation to humans.
-
toSerializableString
String toSerializableString(T value)
Returns a string of the specified value suitable for serializing to XML other text output.- Parameters:
value
- the specified value.- Returns:
- a string of the specified value suitable for serializing to XML other text output.
-
parseSerializableString
T parseSerializableString(String value)
Returns an object of type T given a string serialized from the getSerializableString(T value) method.- Parameters:
value
- a string serialized from the getSerializableString(T value) method.- Returns:
- an object of type T given a string serialized from the getSerializableString(T value) method.
-
shouldIgnoreDefault
boolean shouldIgnoreDefault()
In some cases, default value from visual style is not suitable, such as x, y, z location of nodes. If this flag is on, it will be ignored and it will be controlled by mapping only.- Returns:
- true if the default value should be ignored (as with x,y,z locations) and false otherwise.
-
getTargetDataType
Class<? extends CyIdentifiable> getTargetDataType()
VisualProperty is always associated with a data type. For example, EDGE_COLOR is associated withCyEdge
data object. In that case, this returns Class<CyEdge>. For now, return data types are CyNode, CyEdge, and CyNetwork.- Returns:
- target data type of this visual property. CyNode, CyEdge, or CyNetwork.
-
-