Class BasicVisualLexicon
- java.lang.Object
-
- org.cytoscape.view.presentation.property.BasicVisualLexicon
-
- All Implemented Interfaces:
VisualLexicon
public class BasicVisualLexicon extends Object implements VisualLexicon
Basic Implementation of 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>
Cytoscape Backwards Compatibility (Abstract Class): This class is abstract and meant to be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
-
-
Field Summary
Fields Modifier and Type Field 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 Documentationstatic 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 Documentationstatic 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 Documentationstatic 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 Documentationstatic 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 Documentationstatic 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 Documentationstatic VisualProperty<Double>
NETWORK_DEPTH
TODO Documentationstatic 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 Documentationstatic VisualProperty<Double>
NODE_BORDER_WIDTH
TODO Documentationstatic VisualProperty<Double>
NODE_DEPTH
TODO Documentationstatic 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 Documentationstatic 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
See {@see BasicVisualLexicon#NODE_TRANSPARENCY}static VisualProperty<Paint>
NODE_PAINT
The color of the whole node, including its border, label and selected paint.static VisualProperty<Boolean>
NODE_SELECTED
TODO Documentationstatic VisualProperty<Paint>
NODE_SELECTED_PAINT
TODO Documentationstatic 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 Summary
Constructors Constructor Description BasicVisualLexicon(VisualProperty<NullDataType> rootVisualProperty)
Constructor for VisualLexicon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBendFactory(BendFactory bendFactory, Map<?,?> props)
protected void
addIdentifierMapping(Class<?> type, String id, VisualProperty<?> vp)
protected void
addVisualProperty(VisualProperty<?> vp, VisualProperty<?> parent)
Insert aVisualProperty
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 aVisualProperty
that uses aDiscreteRange
.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.
-
-
-
Field Detail
-
rootVisualProperty
protected final VisualProperty<NullDataType> rootVisualProperty
The Root of this tree.
-
MIN_COLOR
protected static final Color MIN_COLOR
-
MAX_COLOR
protected static final Color MAX_COLOR
-
NONE_ZERO_POSITIVE_DOUBLE_RANGE
protected static final Range<Double> NONE_ZERO_POSITIVE_DOUBLE_RANGE
-
NETWORK
public static final VisualProperty<Visualizable> NETWORK
-
NODE
public static final VisualProperty<Visualizable> NODE
-
EDGE
public static final VisualProperty<Visualizable> EDGE
-
NODE_PAINT
public static final VisualProperty<Paint> NODE_PAINT
The color of the whole node, including its border, label and selected paint.Property Type: {@see java.awt.Color}
Property Range: A non-null color
-
NODE_FILL_COLOR
public static final VisualProperty<Paint> NODE_FILL_COLOR
The color of the node.Property Type: {@see java.awt.Color}
Property Range: A non-null color
-
NODE_LABEL_COLOR
public static final VisualProperty<Paint> NODE_LABEL_COLOR
The color of the node label.Property Type: {@see java.awt.Color}
Property Range: A non-null color
-
NODE_LABEL
public static final VisualProperty<String> NODE_LABEL
The text used for the node label.Property Type: {@see java.lang.String}
Property Range: Any string
-
NODE_X_LOCATION
public static final VisualProperty<Double> NODE_X_LOCATION
X location of the node. Default value of this will be ignored. The value will be used only when mapping function is defined.Property Type: {@see java.lang.Double}
Property Range: {@see java.lang.Double#NEGATIVE_INFINITY} <= value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NODE_Y_LOCATION
public static final VisualProperty<Double> NODE_Y_LOCATION
Y location of the node. Default value of this will be ignored. The value will be used only when mapping function is defined.Property Type: {@see java.lang.Double}
Property Range: {@see java.lang.Double#NEGATIVE_INFINITY} <= value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NODE_SIZE
public static final VisualProperty<Double> NODE_SIZE
The size of the node. Width and height will be equal. This property is mutually exclusive of Node Height and Node Width.Property Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NODE_WIDTH
public static final VisualProperty<Double> NODE_WIDTH
The width of the node. Width will be independent of height. This property is mutually exclusive of Node Size.Property Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NODE_HEIGHT
public static final VisualProperty<Double> NODE_HEIGHT
The height of the node. Height will be independent of width. This property is mutually exclusive of Node Size.Property Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NODE_VISIBLE
public static final VisualProperty<Boolean> NODE_VISIBLE
Hides the node if set to false. By default, this value is set to true.Property Type: {@see java.lang.Boolean}
Property Range: true or false
-
NODE_SELECTED
public static final VisualProperty<Boolean> NODE_SELECTED
TODO DocumentationProperty Type: {@see java.lang.Boolean}
Property Range: true or false
-
NODE_NESTED_NETWORK_IMAGE_VISIBLE
public static final 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).Property Type: {@see java.lang.Boolean}
Property Range: true or false
-
NODE_LABEL_WIDTH
public static final VisualProperty<Double> NODE_LABEL_WIDTH
The maximum width of the node label. If the node label is wider than the specified width, Cytoscape will automatically wrap the label on space characters. Cytoscape will not hyphenate words, meaning that if a single word (i.e. no spaces) is longer than maximum width, the word will be displayed beyond the maximum width.Property Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NODE_SELECTED_PAINT
public static final VisualProperty<Paint> NODE_SELECTED_PAINT
TODO DocumentationProperty Type: {@see java.awt.Color}
Property Range: A non-null color
-
NODE_BORDER_PAINT
public static final VisualProperty<Paint> NODE_BORDER_PAINT
The color of the border of the node.Property Type: {@see java.awt.Color}
Property Range: A non-null color
-
NODE_BORDER_WIDTH
public static final VisualProperty<Double> NODE_BORDER_WIDTH
TODO DocumentationProperty Type: {@see java.lang.Double}
Property Range: 0 <= value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NODE_TOOLTIP
public static final VisualProperty<String> NODE_TOOLTIP
The text of the tooltip that appears when a mouse hovers over the node.Property Type: {@see java.lang.String}
Property Range: Any string
-
NODE_LABEL_FONT_FACE
public static final VisualProperty<Font> NODE_LABEL_FONT_FACE
The font used for the node label.Property Type: {@see java.awt.Font}
Property Range: Any font available in the local graphics environment
-
NODE_LABEL_FONT_SIZE
public static final VisualProperty<Integer> NODE_LABEL_FONT_SIZE
The size of the font used for the node label.Property Type: {@see java.lang.Integer}
Property Range: 1 <= value <= {@see java.lang.Integer#MAX_VALUE}
-
NODE_TRANSPARENCY
public static final VisualProperty<Integer> NODE_TRANSPARENCY
The opacity of the color of the node. Zero means totally transparent, and 255 means totally opaque.Property Type: {@see java.lang.Integer}
Property Range: 0 <= value <= 255
-
NODE_OPACITY
public static final VisualProperty<Integer> NODE_OPACITY
See {@see BasicVisualLexicon#NODE_TRANSPARENCY}
-
NODE_BORDER_TRANSPARENCY
public static final VisualProperty<Integer> NODE_BORDER_TRANSPARENCY
TODO DocumentationProperty Type: {@see java.lang.Integer}
Property Range: 0 <= value <= 255
-
NODE_LABEL_TRANSPARENCY
public static final VisualProperty<Integer> NODE_LABEL_TRANSPARENCY
TODO DocumentationProperty Type: {@see java.lang.Integer}
Property Range: 0 <= value <= 255
-
NODE_SHAPE
public static final VisualProperty<NodeShape> NODE_SHAPE
The shape of the node.Additional Details: {@see org.cytoscape.view.presentation.property.NodeShapeVisualProperty}
-
NODE_BORDER_LINE_TYPE
public static final VisualProperty<LineType> NODE_BORDER_LINE_TYPE
The type of line used for the border of the node.Additional Details: {@see org.cytoscape.view.presentation.property.LineTypeVisualProperty}
-
EDGE_PAINT
public static final VisualProperty<Paint> EDGE_PAINT
The color of the whole edge (including the stroke and arrows) when it is selected or unselected.Property Type: {@see java.awt.Color}
Property Range: A non-null color
-
EDGE_LABEL_COLOR
public static final VisualProperty<Paint> EDGE_LABEL_COLOR
TODO DocumentationProperty Type: {@see java.awt.Color}
Property Range: A non-null color
-
EDGE_LABEL
public static final VisualProperty<String> EDGE_LABEL
The text used for the edge label.Property Type: {@see java.lang.String}
Property Range: Any string
-
EDGE_WIDTH
public static final VisualProperty<Double> EDGE_WIDTH
The width of the edge line.Property Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
EDGE_VISIBLE
public static final VisualProperty<Boolean> EDGE_VISIBLE
Hides the edge if set to false. By default, this value is set to true.Property Type: {@see java.lang.Boolean}
Property Range: true or false
-
EDGE_SELECTED
public static final VisualProperty<Boolean> EDGE_SELECTED
TODO DocumentationProperty Type: {@see java.lang.Boolean}
Property Range: true or false
-
EDGE_LINE_TYPE
public static final VisualProperty<LineType> EDGE_LINE_TYPE
The type of stoke used to render the line (solid, dashed, etc.)Additional Details: {@see org.cytoscape.view.presentation.property.LineTypeVisualProperty}
-
EDGE_TOOLTIP
public static final VisualProperty<String> EDGE_TOOLTIP
The text of the tooltip that appears when a mouse hovers over the edge.Property Type: {@see java.lang.String}
Property Range: Any string
-
EDGE_LABEL_FONT_FACE
public static final VisualProperty<Font> EDGE_LABEL_FONT_FACE
The font used for the edge label.Property Type: {@see java.awt.Font}
Property Range: Any font available in the local graphics environment
-
EDGE_LABEL_FONT_SIZE
public static final VisualProperty<Integer> EDGE_LABEL_FONT_SIZE
The size of the font used for the edge label.Property Type: {@see java.lang.Integer}
Property Range: 1 <= value <= {@see java.lang.Integer#MAX_VALUE}
-
EDGE_LABEL_TRANSPARENCY
public static final VisualProperty<Integer> EDGE_LABEL_TRANSPARENCY
The opacity of the color of the edge label. Zero means totally transparent, and 255 means totally opaque.Property Type: {@see java.lang.Integer}
Property Range: 0 <= value <= 255
-
EDGE_SELECTED_PAINT
public static final VisualProperty<Paint> EDGE_SELECTED_PAINT
The color of the whole edge (stroke and arrows) when selected.Property Type: {@see java.awt.Color}
Property Range: A non-null color
-
EDGE_UNSELECTED_PAINT
public static final VisualProperty<Paint> EDGE_UNSELECTED_PAINT
The color of the whole edge (stroke and arrows) when it is not selected.Property Type: {@see java.awt.Color}
Property Range: A non-null color
-
EDGE_STROKE_SELECTED_PAINT
public static final VisualProperty<Paint> EDGE_STROKE_SELECTED_PAINT
The color of the edge line when selected.Property Type: {@see java.awt.Color}
Property Range: A non-null color
-
EDGE_STROKE_UNSELECTED_PAINT
public static final VisualProperty<Paint> EDGE_STROKE_UNSELECTED_PAINT
The color of the edge line.Property Type: {@see java.awt.Color}
Property Range: A non-null color
-
EDGE_TRANSPARENCY
public static final VisualProperty<Integer> EDGE_TRANSPARENCY
The opacity of the of the edge. Zero means totally transparent, and 255 means totally opaque.Property Type: {@see java.lang.Integer}
Property Range: 0 <= value <= 255
-
EDGE_SOURCE_ARROW_SHAPE
public static final VisualProperty<ArrowShape> EDGE_SOURCE_ARROW_SHAPE
The shape of the arrow on the source node end of the edge.Additional Details: {@see org.cytoscape.view.presentation.property.ArrowShapeVisualProperty}
-
EDGE_TARGET_ARROW_SHAPE
public static final VisualProperty<ArrowShape> EDGE_TARGET_ARROW_SHAPE
The shape of the arrow on the target node end of the edge.Additional Details: {@see org.cytoscape.view.presentation.property.ArrowShapeVisualProperty}
-
EDGE_SOURCE_ARROW_SIZE
public static final VisualProperty<Double> EDGE_SOURCE_ARROW_SIZE
TODO DocumentationProperty Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
EDGE_TARGET_ARROW_SIZE
public static final VisualProperty<Double> EDGE_TARGET_ARROW_SIZE
TODO DocumentationProperty Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
EDGE_BEND
public static final EdgeBendVisualProperty EDGE_BEND
If Edge Bend is defined, edges will be rendered as straight or curved lines. If this value is set to true, edges will be drawn as curved lines.
-
EDGE_LABEL_WIDTH
public static final VisualProperty<Double> EDGE_LABEL_WIDTH
TODO DocumentationProperty Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NETWORK_SCALE_FACTOR
public static final VisualProperty<Double> NETWORK_SCALE_FACTOR
The zoom level of the network view.Property Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NETWORK_CENTER_X_LOCATION
public static final VisualProperty<Double> NETWORK_CENTER_X_LOCATION
The X location of network view center.Property Type: {@see java.lang.Double}
Property Range: {@see java.lang.Double#NEGATIVE_INFINITY} <= value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NETWORK_CENTER_Y_LOCATION
public static final VisualProperty<Double> NETWORK_CENTER_Y_LOCATION
The Y location of network view center.Property Type: {@see java.lang.Double}
Property Range: {@see java.lang.Double#NEGATIVE_INFINITY} <= value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NETWORK_SIZE
public static final VisualProperty<Double> NETWORK_SIZE
The size (width and height) of the network view.Property Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NETWORK_WIDTH
public static final VisualProperty<Double> NETWORK_WIDTH
The width of the network view.Property Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NETWORK_HEIGHT
public static final VisualProperty<Double> NETWORK_HEIGHT
The height of the network view.Property Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NETWORK_TITLE
public static final VisualProperty<String> NETWORK_TITLE
The title of the network view.Property Type: {@see java.lang.String}
Property Range: Any string
-
NETWORK_BACKGROUND_PAINT
public static final VisualProperty<Paint> NETWORK_BACKGROUND_PAINT
The background color of the network view.Property Type: {@see java.awt.Color}
Property Range: A non-null color
-
NODE_Z_LOCATION
public static final VisualProperty<Double> NODE_Z_LOCATION
Z location of the node. Default value of this will be ignored. The value will be used only when mapping function is defined.Property Type: {@see java.lang.Double}
Property Range: {@see java.lang.Double#NEGATIVE_INFINITY} <= value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NODE_DEPTH
public static final VisualProperty<Double> NODE_DEPTH
TODO DocumentationProperty Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NETWORK_CENTER_Z_LOCATION
public static final VisualProperty<Double> NETWORK_CENTER_Z_LOCATION
TODO DocumentationProperty Type: {@see java.lang.Double}
Property Range: {@see java.lang.Double#NEGATIVE_INFINITY} <= value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
NETWORK_DEPTH
public static final VisualProperty<Double> NETWORK_DEPTH
TODO DocumentationProperty Type: {@see java.lang.Double}
Property Range: 0 < value <= {@see java.lang.Double#POSITIVE_INFINITY}
-
-
Constructor Detail
-
BasicVisualLexicon
public BasicVisualLexicon(VisualProperty<NullDataType> rootVisualProperty)
Constructor for VisualLexicon. The parameters are required for all lexicons.- Parameters:
rootVisualProperty
- Root of the visual property tree.
-
-
Method Detail
-
addBendFactory
public final void addBendFactory(BendFactory bendFactory, Map<?,?> props)
-
getAllVisualProperties
public final Set<VisualProperty<?>> getAllVisualProperties()
Description copied from interface:VisualLexicon
Returns the Set of VisualPropertys supported by this Renderer.- Specified by:
getAllVisualProperties
in interfaceVisualLexicon
- Returns:
- Set of all visual properties
-
getAllDescendants
public final Collection<VisualProperty<?>> getAllDescendants(VisualProperty<?> prop)
Description copied from interface:VisualLexicon
Get collection of visual properties for a given object type (node/edge/network).- Specified by:
getAllDescendants
in interfaceVisualLexicon
- Parameters:
prop
- any visual property- Returns:
- Collection of visual properties for the type.
-
getRootVisualProperty
public final VisualProperty<NullDataType> getRootVisualProperty()
Description copied from interface:VisualLexicon
Get root of this tree. To traverse this tree, use this node as the entry point.- Specified by:
getRootVisualProperty
in interfaceVisualLexicon
- Returns:
- root node.
-
addVisualProperty
protected final void addVisualProperty(VisualProperty<?> vp, VisualProperty<?> parent)
Insert aVisualProperty
to the tree.- Parameters:
vp
- the VisualProperty to insert in the tree.parent
- the parent of the VisualProperty to insert.
-
getVisualLexiconNode
public final VisualLexiconNode getVisualLexiconNode(VisualProperty<?> vp)
Description copied from interface:VisualLexicon
Get a tree node in for the given VisualProperty.- Specified by:
getVisualLexiconNode
in interfaceVisualLexicon
- Parameters:
vp
- target VisualProperty in this lexicon.- Returns:
- tree node for the VisualProperty in this lexicon.
-
lookup
public final VisualProperty<?> lookup(Class<?> type, String id)
Description copied from interface:VisualLexicon
Returns the appropriate visual property for the descriptive string. The string is generally expected to be descriptive identifier from a file format (e.g. XGMML, GML) that can be mapped to a VisualProperty by the implementer of the VisualLexicon. This method will return null if no match is found.- Specified by:
lookup
in interfaceVisualLexicon
- Parameters:
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.- Returns:
- A VisualProperty identified by the input string or null if no match is found.
-
isSupported
public boolean isSupported(VisualProperty<?> vp)
Description copied from interface:VisualLexicon
Test the given Visual Property is supported in this Lexicon.- Specified by:
isSupported
in interfaceVisualLexicon
- Parameters:
vp
- visual property to be tested.- Returns:
- true if this lexicon supports the given vp.
-
getSupportedValueRange
public <T> Set<T> getSupportedValueRange(VisualProperty<T> vp)
Description copied from interface:VisualLexicon
Returns a filtered value range for aVisualProperty
that uses aDiscreteRange
. VisualLexicons may override this method to remove or add values to aDiscreteRange
for a built-inVisualProperty
from BasicVisualLexicon.- Specified by:
getSupportedValueRange
in interfaceVisualLexicon
- Parameters:
vp
- VisualProperty where vp.getRange().isDiscrete() == true
-
addIdentifierMapping
protected final void addIdentifierMapping(Class<?> type, String id, VisualProperty<?> vp)
- Parameters:
type
-id
-vp
-
-
-