T - the generic type for this AbstractVisualProperty.public abstract class AbstractVisualProperty<T> extends Object implements VisualProperty<T>
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>| Modifier and Type | Field and Description |
|---|---|
protected boolean |
shouldIgnoreDefault
If this is true, default value will be ignored by VizMapper.
|
| Constructor and Description |
|---|
AbstractVisualProperty(T defaultValue,
Range<T> range,
String id,
String displayName,
Class<? extends CyIdentifiable> targetObjectDataType)
Constructor to set all immutable fields.
|
| Modifier and Type | Method and 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 the
Range of this VisualProperty. |
Class<? extends CyIdentifiable> |
getTargetDataType()
VisualProperty is always associated with a data type.
|
boolean |
shouldIgnoreDefault()
In some cases, default value from visual style is not suitable, such as x, y, z location of nodes.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitparseSerializableString, toSerializableStringprotected boolean shouldIgnoreDefault
public AbstractVisualProperty(T defaultValue, Range<T> range, String id, String displayName, Class<? extends CyIdentifiable> targetObjectDataType)
defaultValue - default value for this visual property.range - the Range for the visual property.id - unique string for serialization.displayName - human-readable name for this visual property.targetObjectDataType - the type of the target object for this visual property.public Range<T> getRange()
VisualPropertyRange of this VisualProperty.getRange in interface VisualProperty<T>Range of this VisualProperty.public T getDefault()
VisualPropertygetDefault in interface VisualProperty<T>public String getIdString()
VisualPropertygetIdString in interface VisualProperty<T>public String getDisplayName()
VisualPropertygetDisplayName in interface VisualProperty<T>public boolean shouldIgnoreDefault()
VisualPropertyshouldIgnoreDefault in interface VisualProperty<T>public Class<? extends CyIdentifiable> getTargetDataType()
VisualPropertyCyEdge data object. In that case, this returns Class<CyEdge>.
For now, return data types are CyNode, CyEdge, and CyNetwork.getTargetDataType in interface VisualProperty<T>Copyright 2011 Cytoscape Consortium. All rights reserved.