Cytoscape 3.0.1 API

org.cytoscape.view.model
Interface View<S>

Type Parameters:
S - the base (model-level) object for which this is a View. For example, CyNode or CyEdge. In the future versions, Attributes can be this parameter.
All Superinterfaces:
CyIdentifiable
All Known Subinterfaces:
CyNetworkView

public interface View<S>
extends CyIdentifiable

The base interface that defines methods used to set visual properties for nodes, edges, and networks. Think of it as a row in the view-model table.


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.

Field Summary
 
Fields inherited from interface org.cytoscape.model.CyIdentifiable
SUID
 
Method Summary
 void clearValueLock(VisualProperty<?> vp)
          Clear value lock for given VisualProperty.
 S getModel()
          Get source data structure, such as CyNode, CyEdge, etc.
<T> T
getVisualProperty(VisualProperty<T> vp)
          Get the actual value for the given visual property.
 boolean isDirectlyLocked(VisualProperty<?> vp)
          Returns true if the given VisualProperty's value has been locked.
 boolean isSet(VisualProperty<?> vp)
          Indicates whether or not the passed visual property is set with a non-null value.
 boolean isValueLocked(VisualProperty<?> vp)
          Returns true if the value of the given VisualProperty or one of its ancestors is locked.
<T,V extends T>
void
setLockedValue(VisualProperty<? extends T> vp, V value)
          Set locked value.
<T,V extends T>
void
setVisualProperty(VisualProperty<? extends T> vp, V value)
          Assign a value to the given Visual Property of this view.
 
Methods inherited from interface org.cytoscape.model.CyIdentifiable
getSUID
 

Method Detail

setVisualProperty

<T,V extends T> void setVisualProperty(VisualProperty<? extends T> vp,
                                       V value)
Assign a value to the given Visual Property of this view.

Type Parameters:
T - Data type of the visual property. This can be subclasses of type T.
V - Value of the visual property. This can be subclasses of T.
Parameters:
vp - the VisualProperty (Node Color, Edge Width, etc.)
value - actual value stored in this visual property.

getVisualProperty

<T> T getVisualProperty(VisualProperty<T> vp)
Get the actual value for the given visual property.

Type Parameters:
T - Object type of the Visual Property (Color, Double, ...)
Parameters:
vp - the VisualProperty.
Returns:
Value associated with this View and Visual Property pair.

isSet

boolean isSet(VisualProperty<?> vp)
Indicates whether or not the passed visual property is set with a non-null value.

Parameters:
vp - the VisualProperty.
Returns:
true if the view has a non-null value for the VisualProperty.

setLockedValue

<T,V extends T> void setLockedValue(VisualProperty<? extends T> vp,
                                    V value)
Set locked value. This value will be used to bypass the style.

Type Parameters:
T - Data type of the visual property. This can be subclasses of type T.
V - Value of the visual property. This can be subclasses of T.
Parameters:
vp - the VisualProperty
value - the value that will bypass the style

isValueLocked

boolean isValueLocked(VisualProperty<?> vp)
Returns true if the value of the given VisualProperty or one of its ancestors is locked.

Parameters:
vp - the VisualProperty
Returns:
true if value of the given VisualProperty value or one of its ancestors is locked.

clearValueLock

void clearValueLock(VisualProperty<?> vp)
Clear value lock for given VisualProperty.

Parameters:
vp - the VisualProperty.

getModel

S getModel()
Get source data structure, such as CyNode, CyEdge, etc.

Returns:
Data object of this view.

isDirectlyLocked

boolean isDirectlyLocked(VisualProperty<?> vp)
Returns true if the given VisualProperty's value has been locked. directly.

Parameters:
vp - the VisualProperty
Returns:
true if the given VisualProperty's value has been locked.

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.