public class BasicVisualLexicon extends Object implements VisualLexicon
Module: presentation-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>presentation-api</artifactId> </dependency>
Constructor and Description |
---|
BasicVisualLexicon(VisualProperty<NullDataType> rootVisualProperty)
Constructor for VisualLexicon.
|
Modifier and Type | Method and Description |
---|---|
void |
addBendFactory(BendFactory bendFactory,
Map<?,?> props) |
protected void |
addIdentifierMapping(Class<?> type,
String id,
VisualProperty<?> vp) |
protected void |
addVisualProperty(VisualProperty<?> vp,
VisualProperty<?> parent)
Insert a
VisualProperty to the tree. |
Collection<VisualProperty<?>> |
getAllDescendants(VisualProperty<?> prop)
Get collection of visual properties for a given object type (node/edge/network).
|
Set<VisualProperty<?>> |
getAllVisualProperties()
Returns the Set of VisualPropertys supported by this Renderer.
|
VisualProperty<NullDataType> |
getRootVisualProperty()
Get root of this tree.
|
<T> Set<T> |
getSupportedValueRange(VisualProperty<T> vp)
Returns a filtered value range for a
VisualProperty that uses a DiscreteRange . |
VisualLexiconNode |
getVisualLexiconNode(VisualProperty<?> vp)
Get a tree node in for the given VisualProperty.
|
boolean |
isSupported(VisualProperty<?> vp)
Test the given Visual Property is supported in this Lexicon.
|
VisualProperty<?> |
lookup(Class<?> type,
String id)
Returns the appropriate visual property for the descriptive
string.
|
protected final VisualProperty<NullDataType> rootVisualProperty
protected static final Color MIN_COLOR
protected static final Color MAX_COLOR
protected static final Range<Double> NONE_ZERO_POSITIVE_DOUBLE_RANGE
public static final VisualProperty<Visualizable> NETWORK
public static final VisualProperty<Visualizable> NODE
public static final VisualProperty<Visualizable> EDGE
public static final VisualProperty<Paint> NODE_PAINT
public static final VisualProperty<Paint> NODE_FILL_COLOR
public static final VisualProperty<Paint> NODE_LABEL_COLOR
public static final VisualProperty<String> NODE_LABEL
public static final VisualProperty<Double> NODE_X_LOCATION
public static final VisualProperty<Double> NODE_Y_LOCATION
public static final VisualProperty<Double> NODE_SIZE
public static final VisualProperty<Double> NODE_WIDTH
public static final VisualProperty<Double> NODE_HEIGHT
public static final VisualProperty<Boolean> NODE_VISIBLE
public static final VisualProperty<Boolean> NODE_SELECTED
public static final VisualProperty<Boolean> NODE_NESTED_NETWORK_IMAGE_VISIBLE
public static final VisualProperty<Double> NODE_LABEL_WIDTH
public static final VisualProperty<Paint> EDGE_PAINT
public static final VisualProperty<Paint> EDGE_LABEL_COLOR
public static final VisualProperty<String> EDGE_LABEL
public static final VisualProperty<Double> EDGE_WIDTH
public static final VisualProperty<Boolean> EDGE_VISIBLE
public static final VisualProperty<Boolean> EDGE_SELECTED
public static final VisualProperty<Double> NETWORK_SCALE_FACTOR
public static final VisualProperty<Double> NETWORK_CENTER_X_LOCATION
public static final VisualProperty<Double> NETWORK_CENTER_Y_LOCATION
public static final VisualProperty<Double> NETWORK_SIZE
public static final VisualProperty<Double> NETWORK_WIDTH
public static final VisualProperty<Double> NETWORK_HEIGHT
public static final VisualProperty<String> NETWORK_TITLE
public static final VisualProperty<Paint> NETWORK_BACKGROUND_PAINT
public static final VisualProperty<Double> NODE_Z_LOCATION
public static final VisualProperty<Double> NODE_DEPTH
public static final VisualProperty<Double> NETWORK_CENTER_Z_LOCATION
public static final VisualProperty<Double> NETWORK_DEPTH
public static final VisualProperty<NodeShape> NODE_SHAPE
public static final VisualProperty<LineType> NODE_BORDER_LINE_TYPE
public static final VisualProperty<LineType> EDGE_LINE_TYPE
public static final VisualProperty<Paint> NODE_SELECTED_PAINT
public static final VisualProperty<Paint> NODE_BORDER_PAINT
public static final VisualProperty<Double> NODE_BORDER_WIDTH
public static final VisualProperty<String> NODE_TOOLTIP
public static final VisualProperty<Font> NODE_LABEL_FONT_FACE
public static final VisualProperty<Integer> NODE_LABEL_FONT_SIZE
public static final VisualProperty<Integer> NODE_TRANSPARENCY
public static final VisualProperty<Integer> NODE_BORDER_TRANSPARENCY
public static final VisualProperty<Integer> NODE_LABEL_TRANSPARENCY
public static final VisualProperty<String> EDGE_TOOLTIP
public static final VisualProperty<Font> EDGE_LABEL_FONT_FACE
public static final VisualProperty<Integer> EDGE_LABEL_FONT_SIZE
public static final VisualProperty<Paint> EDGE_SELECTED_PAINT
public static final VisualProperty<Paint> EDGE_UNSELECTED_PAINT
public static final VisualProperty<Paint> EDGE_STROKE_SELECTED_PAINT
public static final VisualProperty<Paint> EDGE_STROKE_UNSELECTED_PAINT
public static final VisualProperty<Integer> EDGE_TRANSPARENCY
public static final VisualProperty<Integer> EDGE_LABEL_TRANSPARENCY
public static final VisualProperty<ArrowShape> EDGE_SOURCE_ARROW_SHAPE
public static final VisualProperty<ArrowShape> EDGE_TARGET_ARROW_SHAPE
public static final EdgeBendVisualProperty EDGE_BEND
public static final VisualProperty<Double> EDGE_LABEL_WIDTH
public BasicVisualLexicon(VisualProperty<NullDataType> rootVisualProperty)
rootVisualProperty
- Root of the visual property tree.public final void addBendFactory(BendFactory bendFactory, Map<?,?> props)
public final Set<VisualProperty<?>> getAllVisualProperties()
VisualLexicon
getAllVisualProperties
in interface VisualLexicon
public final Collection<VisualProperty<?>> getAllDescendants(VisualProperty<?> prop)
VisualLexicon
getAllDescendants
in interface VisualLexicon
prop
- any visual propertypublic final VisualProperty<NullDataType> getRootVisualProperty()
VisualLexicon
getRootVisualProperty
in interface VisualLexicon
protected final void addVisualProperty(VisualProperty<?> vp, VisualProperty<?> parent)
VisualProperty
to the tree.vp
- the VisualProperty to insert in the tree.parent
- the parent of the VisualProperty to insert.public final VisualLexiconNode getVisualLexiconNode(VisualProperty<?> vp)
VisualLexicon
getVisualLexiconNode
in interface VisualLexicon
vp
- target VisualProperty in this lexicon.public final VisualProperty<?> lookup(Class<?> type, String id)
VisualLexicon
lookup
in interface VisualLexicon
type
- The type of the visual property sought, which should
(in general) be CyNode.class, CyEdge.class, or CyNetwork.class.id
- A string identifying a particular visual property.public boolean isSupported(VisualProperty<?> vp)
VisualLexicon
isSupported
in interface VisualLexicon
vp
- visual property to be tested.public <T> Set<T> getSupportedValueRange(VisualProperty<T> vp)
VisualLexicon
VisualProperty
that uses a DiscreteRange
.
VisualLexicons may override this method to remove or add values to
a DiscreteRange
for a built-in VisualProperty
from BasicVisualLexicon.getSupportedValueRange
in interface VisualLexicon
vp
- VisualProperty where vp.getRange().isDiscrete() == trueprotected final void addIdentifierMapping(Class<?> type, String id, VisualProperty<?> vp)
type
- id
- vp
- Copyright 2011-2015 Cytoscape Consortium. All rights reserved.