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>
Modifier and Type | Field and Description |
---|---|
protected static Range<Double> |
ARBITRARY_DOUBLE_RANGE |
protected static Range<String> |
ARBITRARY_STRING_RANGE |
static VisualProperty<Visualizable> |
EDGE |
static EdgeBendVisualProperty |
EDGE_BEND
If Edge Bend is defined, edges will be rendered as straight or curved lines.
|
static VisualProperty<String> |
EDGE_LABEL
The text used for the edge label.
|
static VisualProperty<Paint> |
EDGE_LABEL_COLOR
TODO Documentation
|
static VisualProperty<Font> |
EDGE_LABEL_FONT_FACE
The font used for the edge label.
|
static VisualProperty<Integer> |
EDGE_LABEL_FONT_SIZE
The size of the font used for the edge label.
|
static VisualProperty<Integer> |
EDGE_LABEL_TRANSPARENCY
The opacity of the color of the edge label.
|
static VisualProperty<Double> |
EDGE_LABEL_WIDTH
TODO Documentation
|
static VisualProperty<LineType> |
EDGE_LINE_TYPE
The type of stoke used to render the line (solid, dashed, etc.)
|
static VisualProperty<Paint> |
EDGE_PAINT
The color of the whole edge (including the stroke and arrows) when it is selected or
unselected.
|
static VisualProperty<Boolean> |
EDGE_SELECTED
TODO Documentation
|
static VisualProperty<Paint> |
EDGE_SELECTED_PAINT
The color of the whole edge (stroke and arrows) when selected.
|
static VisualProperty<ArrowShape> |
EDGE_SOURCE_ARROW_SHAPE
The shape of the arrow on the source node end of the edge.
|
static VisualProperty<Double> |
EDGE_SOURCE_ARROW_SIZE
TODO Documentation
|
static VisualProperty<Paint> |
EDGE_STROKE_SELECTED_PAINT
The color of the edge line when selected.
|
static VisualProperty<Paint> |
EDGE_STROKE_UNSELECTED_PAINT
The color of the edge line.
|
static VisualProperty<ArrowShape> |
EDGE_TARGET_ARROW_SHAPE
The shape of the arrow on the target node end of the edge.
|
static VisualProperty<Double> |
EDGE_TARGET_ARROW_SIZE
TODO Documentation
|
static VisualProperty<String> |
EDGE_TOOLTIP
The text of the tooltip that appears when a mouse hovers over the edge.
|
static VisualProperty<Integer> |
EDGE_TRANSPARENCY
The opacity of the of the edge.
|
static VisualProperty<Paint> |
EDGE_UNSELECTED_PAINT
The color of the whole edge (stroke and arrows) when it is not selected.
|
static VisualProperty<Boolean> |
EDGE_VISIBLE
Hides the edge if set to false.
|
static VisualProperty<Double> |
EDGE_WIDTH
The width of the edge line.
|
protected static Color |
MAX_COLOR |
protected static Color |
MIN_COLOR |
static VisualProperty<Visualizable> |
NETWORK |
static VisualProperty<Paint> |
NETWORK_BACKGROUND_PAINT
The background color of the network view.
|
static VisualProperty<Double> |
NETWORK_CENTER_X_LOCATION
The X location of network view center.
|
static VisualProperty<Double> |
NETWORK_CENTER_Y_LOCATION
The Y location of network view center.
|
static VisualProperty<Double> |
NETWORK_CENTER_Z_LOCATION
TODO Documentation
|
static VisualProperty<Double> |
NETWORK_DEPTH
TODO Documentation
|
static VisualProperty<Double> |
NETWORK_HEIGHT
The height of the network view.
|
static VisualProperty<Double> |
NETWORK_SCALE_FACTOR
The zoom level of the network view.
|
static VisualProperty<Double> |
NETWORK_SIZE
The size (width and height) of the network view.
|
static VisualProperty<String> |
NETWORK_TITLE
The title of the network view.
|
static VisualProperty<Double> |
NETWORK_WIDTH
The width of the network view.
|
static VisualProperty<Visualizable> |
NODE |
static VisualProperty<LineType> |
NODE_BORDER_LINE_TYPE
The type of line used for the border of the node.
|
static VisualProperty<Paint> |
NODE_BORDER_PAINT
The color of the border of the node.
|
static VisualProperty<Integer> |
NODE_BORDER_TRANSPARENCY
TODO Documentation
|
static VisualProperty<Double> |
NODE_BORDER_WIDTH
TODO Documentation
|
static VisualProperty<Double> |
NODE_DEPTH
TODO Documentation
|
static VisualProperty<Paint> |
NODE_FILL_COLOR
The color of the node.
|
static VisualProperty<Double> |
NODE_HEIGHT
The height of the node.
|
static VisualProperty<String> |
NODE_LABEL
The text used for the node label.
|
static VisualProperty<Paint> |
NODE_LABEL_COLOR
The color of the node label.
|
static VisualProperty<Font> |
NODE_LABEL_FONT_FACE
The font used for the node label.
|
static VisualProperty<Integer> |
NODE_LABEL_FONT_SIZE
The size of the font used for the node label.
|
static VisualProperty<Integer> |
NODE_LABEL_TRANSPARENCY
TODO Documentation
|
static VisualProperty<Double> |
NODE_LABEL_WIDTH
The maximum width of the node label.
|
static VisualProperty<Boolean> |
NODE_NESTED_NETWORK_IMAGE_VISIBLE
A boolean value that indicates whether a nested network should be visualized (assuming
a nested network is present for the specified node).
|
static VisualProperty<Integer> |
NODE_OPACITY
|
static VisualProperty<Paint> |
NODE_PAINT
The color of the whole node, including its border, label and selected paint.
|
static VisualProperty<Boolean> |
NODE_SELECTED
TODO Documentation
|
static VisualProperty<Paint> |
NODE_SELECTED_PAINT
TODO Documentation
|
static VisualProperty<NodeShape> |
NODE_SHAPE
The shape of the node.
|
static VisualProperty<Double> |
NODE_SIZE
The size of the node.
|
static VisualProperty<String> |
NODE_TOOLTIP
The text of the tooltip that appears when a mouse hovers over the node.
|
static VisualProperty<Integer> |
NODE_TRANSPARENCY
The opacity of the color of the node.
|
static VisualProperty<Boolean> |
NODE_VISIBLE
Hides the node if set to false.
|
static VisualProperty<Double> |
NODE_WIDTH
The width of the node.
|
static VisualProperty<Double> |
NODE_X_LOCATION
X location of the node.
|
static VisualProperty<Double> |
NODE_Y_LOCATION
Y location of the node.
|
static VisualProperty<Double> |
NODE_Z_LOCATION
Z location of the node.
|
protected static Range<Double> |
NONE_ZERO_POSITIVE_DOUBLE_RANGE |
protected static Range<Paint> |
PAINT_RANGE |
protected VisualProperty<NullDataType> |
rootVisualProperty
The Root of this tree.
|
protected static Set<String> |
STRING_SET |
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
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<Paint> NODE_FILL_COLOR
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<Paint> NODE_LABEL_COLOR
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<String> NODE_LABEL
Property Type: String
Property Range: Any string
public static final VisualProperty<Double> NODE_X_LOCATION
Property Type: Double
Property Range: Double.NEGATIVE_INFINITY
<= value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NODE_Y_LOCATION
Property Type: Double
Property Range: Double.NEGATIVE_INFINITY
<= value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NODE_SIZE
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NODE_WIDTH
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NODE_HEIGHT
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Boolean> NODE_VISIBLE
Property Type: Boolean
Property Range: true or false
public static final VisualProperty<Boolean> NODE_SELECTED
Property Type: Boolean
Property Range: true or false
public static final VisualProperty<Boolean> NODE_NESTED_NETWORK_IMAGE_VISIBLE
Property Type: Boolean
Property Range: true or false
public static final VisualProperty<Double> NODE_LABEL_WIDTH
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Paint> NODE_SELECTED_PAINT
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<Paint> NODE_BORDER_PAINT
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<Double> NODE_BORDER_WIDTH
Property Type: Double
Property Range: 0 <= value <= Double.POSITIVE_INFINITY
public static final VisualProperty<String> NODE_TOOLTIP
Property Type: String
Property Range: Any string
public static final VisualProperty<Font> NODE_LABEL_FONT_FACE
Property Type: Font
Property Range: Any font available in the local graphics environment
public static final VisualProperty<Integer> NODE_LABEL_FONT_SIZE
Property Type: Integer
Property Range: 1 <= value <= Integer.MAX_VALUE
public static final VisualProperty<Integer> NODE_TRANSPARENCY
Property Type: Integer
Property Range: 0 <= value <= 255
public static final VisualProperty<Integer> NODE_OPACITY
public static final VisualProperty<Integer> NODE_BORDER_TRANSPARENCY
Property Type: Integer
Property Range: 0 <= value <= 255
public static final VisualProperty<Integer> NODE_LABEL_TRANSPARENCY
Property Type: Integer
Property Range: 0 <= value <= 255
public static final VisualProperty<NodeShape> NODE_SHAPE
Additional Details: NodeShapeVisualProperty
public static final VisualProperty<LineType> NODE_BORDER_LINE_TYPE
Additional Details: LineTypeVisualProperty
public static final VisualProperty<Paint> EDGE_PAINT
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<Paint> EDGE_LABEL_COLOR
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<String> EDGE_LABEL
Property Type: String
Property Range: Any string
public static final VisualProperty<Double> EDGE_WIDTH
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Boolean> EDGE_VISIBLE
Property Type: Boolean
Property Range: true or false
public static final VisualProperty<Boolean> EDGE_SELECTED
Property Type: Boolean
Property Range: true or false
public static final VisualProperty<LineType> EDGE_LINE_TYPE
Additional Details: LineTypeVisualProperty
public static final VisualProperty<String> EDGE_TOOLTIP
Property Type: String
Property Range: Any string
public static final VisualProperty<Font> EDGE_LABEL_FONT_FACE
Property Type: Font
Property Range: Any font available in the local graphics environment
public static final VisualProperty<Integer> EDGE_LABEL_FONT_SIZE
Property Type: Integer
Property Range: 1 <= value <= Integer.MAX_VALUE
public static final VisualProperty<Integer> EDGE_LABEL_TRANSPARENCY
Property Type: Integer
Property Range: 0 <= value <= 255
public static final VisualProperty<Paint> EDGE_SELECTED_PAINT
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<Paint> EDGE_UNSELECTED_PAINT
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<Paint> EDGE_STROKE_SELECTED_PAINT
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<Paint> EDGE_STROKE_UNSELECTED_PAINT
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<Integer> EDGE_TRANSPARENCY
Property Type: Integer
Property Range: 0 <= value <= 255
public static final VisualProperty<ArrowShape> EDGE_SOURCE_ARROW_SHAPE
Additional Details: ArrowShapeVisualProperty
public static final VisualProperty<ArrowShape> EDGE_TARGET_ARROW_SHAPE
Additional Details: ArrowShapeVisualProperty
public static final VisualProperty<Double> EDGE_SOURCE_ARROW_SIZE
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> EDGE_TARGET_ARROW_SIZE
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final EdgeBendVisualProperty EDGE_BEND
public static final VisualProperty<Double> EDGE_LABEL_WIDTH
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NETWORK_SCALE_FACTOR
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NETWORK_CENTER_X_LOCATION
Property Type: Double
Property Range: Double.NEGATIVE_INFINITY
<= value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NETWORK_CENTER_Y_LOCATION
Property Type: Double
Property Range: Double.NEGATIVE_INFINITY
<= value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NETWORK_SIZE
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NETWORK_WIDTH
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NETWORK_HEIGHT
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<String> NETWORK_TITLE
Property Type: String
Property Range: Any string
public static final VisualProperty<Paint> NETWORK_BACKGROUND_PAINT
Property Type: Color
Property Range: A non-null color
public static final VisualProperty<Double> NODE_Z_LOCATION
Property Type: Double
Property Range: Double.NEGATIVE_INFINITY
<= value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NODE_DEPTH
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NETWORK_CENTER_Z_LOCATION
Property Type: Double
Property Range: Double.NEGATIVE_INFINITY
<= value <= Double.POSITIVE_INFINITY
public static final VisualProperty<Double> NETWORK_DEPTH
Property Type: Double
Property Range: 0 < value <= Double.POSITIVE_INFINITY
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.