Cytoscape 3.0.1 API

org.cytoscape.view.presentation.property
Class BasicVisualLexicon

java.lang.Object
  extended by org.cytoscape.view.presentation.property.BasicVisualLexicon
All Implemented Interfaces:
VisualLexicon

public class BasicVisualLexicon
extends Object
implements VisualLexicon

Basic Implementation of VisualLexicon.


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
protected static Range<Double> ARBITRARY_DOUBLE_RANGE
           
protected static Range<String> ARBITRARY_STRING_RANGE
           
static VisualProperty<Visualizable> EDGE
           
static EdgeBendVisualProperty EDGE_BEND
           
static VisualProperty<String> EDGE_LABEL
           
static VisualProperty<Paint> EDGE_LABEL_COLOR
           
static VisualProperty<Font> EDGE_LABEL_FONT_FACE
           
static VisualProperty<Integer> EDGE_LABEL_FONT_SIZE
           
static VisualProperty<Integer> EDGE_LABEL_TRANSPARENCY
           
static VisualProperty<LineType> EDGE_LINE_TYPE
           
static VisualProperty<Paint> EDGE_PAINT
           
static VisualProperty<Boolean> EDGE_SELECTED
           
static VisualProperty<Paint> EDGE_SELECTED_PAINT
           
static VisualProperty<ArrowShape> EDGE_SOURCE_ARROW_SHAPE
           
static VisualProperty<Paint> EDGE_STROKE_SELECTED_PAINT
           
static VisualProperty<Paint> EDGE_STROKE_UNSELECTED_PAINT
           
static VisualProperty<ArrowShape> EDGE_TARGET_ARROW_SHAPE
           
static VisualProperty<String> EDGE_TOOLTIP
           
static VisualProperty<Integer> EDGE_TRANSPARENCY
           
static VisualProperty<Paint> EDGE_UNSELECTED_PAINT
           
static VisualProperty<Boolean> EDGE_VISIBLE
           
static VisualProperty<Double> EDGE_WIDTH
           
protected static Color MAX_COLOR
           
protected static Color MIN_COLOR
           
static VisualProperty<Visualizable> NETWORK
           
static VisualProperty<Paint> NETWORK_BACKGROUND_PAINT
           
static VisualProperty<Double> NETWORK_CENTER_X_LOCATION
           
static VisualProperty<Double> NETWORK_CENTER_Y_LOCATION
           
static VisualProperty<Double> NETWORK_CENTER_Z_LOCATION
           
static VisualProperty<Double> NETWORK_DEPTH
           
static VisualProperty<Double> NETWORK_HEIGHT
           
static VisualProperty<Double> NETWORK_SCALE_FACTOR
           
static VisualProperty<Double> NETWORK_SIZE
           
static VisualProperty<String> NETWORK_TITLE
           
static VisualProperty<Double> NETWORK_WIDTH
           
static VisualProperty<Visualizable> NODE
           
static VisualProperty<LineType> NODE_BORDER_LINE_TYPE
           
static VisualProperty<Paint> NODE_BORDER_PAINT
           
static VisualProperty<Integer> NODE_BORDER_TRANSPARENCY
           
static VisualProperty<Double> NODE_BORDER_WIDTH
           
static VisualProperty<Double> NODE_DEPTH
           
static VisualProperty<Paint> NODE_FILL_COLOR
           
static VisualProperty<Double> NODE_HEIGHT
           
static VisualProperty<String> NODE_LABEL
           
static VisualProperty<Paint> NODE_LABEL_COLOR
           
static VisualProperty<Font> NODE_LABEL_FONT_FACE
           
static VisualProperty<Integer> NODE_LABEL_FONT_SIZE
           
static VisualProperty<Integer> NODE_LABEL_TRANSPARENCY
           
static VisualProperty<Double> NODE_LABEL_WIDTH
           
static VisualProperty<Boolean> NODE_NESTED_NETWORK_IMAGE_VISIBLE
           
static VisualProperty<Paint> NODE_PAINT
           
static VisualProperty<Boolean> NODE_SELECTED
           
static VisualProperty<Paint> NODE_SELECTED_PAINT
           
static VisualProperty<NodeShape> NODE_SHAPE
           
static VisualProperty<Double> NODE_SIZE
           
static VisualProperty<String> NODE_TOOLTIP
           
static VisualProperty<Integer> NODE_TRANSPARENCY
           
static VisualProperty<Boolean> NODE_VISIBLE
           
static VisualProperty<Double> NODE_WIDTH
           
static VisualProperty<Double> NODE_X_LOCATION
           
static VisualProperty<Double> NODE_Y_LOCATION
           
static VisualProperty<Double> NODE_Z_LOCATION
           
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
BasicVisualLexicon(VisualProperty<NullDataType> rootVisualProperty)
          Constructor for VisualLexicon.
 
Method Summary
 void addBendFactory(BendFactory bendFactory, Map<?,?> props)
           
protected  void addIdentifierMapping(Class<?> type, String id, VisualProperty<?> vp)
          #ASKMIKE
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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

PAINT_RANGE

protected static final Range<Paint> PAINT_RANGE

STRING_SET

protected static final Set<String> STRING_SET

ARBITRARY_STRING_RANGE

protected static final Range<String> ARBITRARY_STRING_RANGE

ARBITRARY_DOUBLE_RANGE

protected static final Range<Double> ARBITRARY_DOUBLE_RANGE

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

NODE_FILL_COLOR

public static final VisualProperty<Paint> NODE_FILL_COLOR

NODE_LABEL_COLOR

public static final VisualProperty<Paint> NODE_LABEL_COLOR

NODE_LABEL

public static final VisualProperty<String> NODE_LABEL

NODE_X_LOCATION

public static final VisualProperty<Double> NODE_X_LOCATION

NODE_Y_LOCATION

public static final VisualProperty<Double> NODE_Y_LOCATION

NODE_SIZE

public static final VisualProperty<Double> NODE_SIZE

NODE_WIDTH

public static final VisualProperty<Double> NODE_WIDTH

NODE_HEIGHT

public static final VisualProperty<Double> NODE_HEIGHT

NODE_VISIBLE

public static final VisualProperty<Boolean> NODE_VISIBLE

NODE_SELECTED

public static final VisualProperty<Boolean> NODE_SELECTED

NODE_NESTED_NETWORK_IMAGE_VISIBLE

public static final VisualProperty<Boolean> NODE_NESTED_NETWORK_IMAGE_VISIBLE

NODE_LABEL_WIDTH

public static final VisualProperty<Double> NODE_LABEL_WIDTH

EDGE_PAINT

public static final VisualProperty<Paint> EDGE_PAINT

EDGE_LABEL_COLOR

public static final VisualProperty<Paint> EDGE_LABEL_COLOR

EDGE_LABEL

public static final VisualProperty<String> EDGE_LABEL

EDGE_WIDTH

public static final VisualProperty<Double> EDGE_WIDTH

EDGE_VISIBLE

public static final VisualProperty<Boolean> EDGE_VISIBLE

EDGE_SELECTED

public static final VisualProperty<Boolean> EDGE_SELECTED

NETWORK_SCALE_FACTOR

public static final VisualProperty<Double> NETWORK_SCALE_FACTOR

NETWORK_CENTER_X_LOCATION

public static final VisualProperty<Double> NETWORK_CENTER_X_LOCATION

NETWORK_CENTER_Y_LOCATION

public static final VisualProperty<Double> NETWORK_CENTER_Y_LOCATION

NETWORK_SIZE

public static final VisualProperty<Double> NETWORK_SIZE

NETWORK_WIDTH

public static final VisualProperty<Double> NETWORK_WIDTH

NETWORK_HEIGHT

public static final VisualProperty<Double> NETWORK_HEIGHT

NETWORK_TITLE

public static final VisualProperty<String> NETWORK_TITLE

NETWORK_BACKGROUND_PAINT

public static final VisualProperty<Paint> NETWORK_BACKGROUND_PAINT

NODE_Z_LOCATION

public static final VisualProperty<Double> NODE_Z_LOCATION

NODE_DEPTH

public static final VisualProperty<Double> NODE_DEPTH

NETWORK_CENTER_Z_LOCATION

public static final VisualProperty<Double> NETWORK_CENTER_Z_LOCATION

NETWORK_DEPTH

public static final VisualProperty<Double> NETWORK_DEPTH

NODE_SHAPE

public static final VisualProperty<NodeShape> NODE_SHAPE

NODE_BORDER_LINE_TYPE

public static final VisualProperty<LineType> NODE_BORDER_LINE_TYPE

EDGE_LINE_TYPE

public static final VisualProperty<LineType> EDGE_LINE_TYPE

NODE_SELECTED_PAINT

public static final VisualProperty<Paint> NODE_SELECTED_PAINT

NODE_BORDER_PAINT

public static final VisualProperty<Paint> NODE_BORDER_PAINT

NODE_BORDER_WIDTH

public static final VisualProperty<Double> NODE_BORDER_WIDTH

NODE_TOOLTIP

public static final VisualProperty<String> NODE_TOOLTIP

NODE_LABEL_FONT_FACE

public static final VisualProperty<Font> NODE_LABEL_FONT_FACE

NODE_LABEL_FONT_SIZE

public static final VisualProperty<Integer> NODE_LABEL_FONT_SIZE

NODE_TRANSPARENCY

public static final VisualProperty<Integer> NODE_TRANSPARENCY

NODE_BORDER_TRANSPARENCY

public static final VisualProperty<Integer> NODE_BORDER_TRANSPARENCY

NODE_LABEL_TRANSPARENCY

public static final VisualProperty<Integer> NODE_LABEL_TRANSPARENCY

EDGE_TOOLTIP

public static final VisualProperty<String> EDGE_TOOLTIP

EDGE_LABEL_FONT_FACE

public static final VisualProperty<Font> EDGE_LABEL_FONT_FACE

EDGE_LABEL_FONT_SIZE

public static final VisualProperty<Integer> EDGE_LABEL_FONT_SIZE

EDGE_SELECTED_PAINT

public static final VisualProperty<Paint> EDGE_SELECTED_PAINT

EDGE_UNSELECTED_PAINT

public static final VisualProperty<Paint> EDGE_UNSELECTED_PAINT

EDGE_STROKE_SELECTED_PAINT

public static final VisualProperty<Paint> EDGE_STROKE_SELECTED_PAINT

EDGE_STROKE_UNSELECTED_PAINT

public static final VisualProperty<Paint> EDGE_STROKE_UNSELECTED_PAINT

EDGE_TRANSPARENCY

public static final VisualProperty<Integer> EDGE_TRANSPARENCY

EDGE_LABEL_TRANSPARENCY

public static final VisualProperty<Integer> EDGE_LABEL_TRANSPARENCY

EDGE_SOURCE_ARROW_SHAPE

public static final VisualProperty<ArrowShape> EDGE_SOURCE_ARROW_SHAPE

EDGE_TARGET_ARROW_SHAPE

public static final VisualProperty<ArrowShape> EDGE_TARGET_ARROW_SHAPE

EDGE_BEND

public static final EdgeBendVisualProperty EDGE_BEND
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 interface VisualLexicon
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 interface VisualLexicon
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 interface VisualLexicon
Returns:
root node.

addVisualProperty

protected final void addVisualProperty(VisualProperty<?> vp,
                                       VisualProperty<?> parent)
Insert a VisualProperty 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 interface VisualLexicon
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 interface VisualLexicon
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 final boolean isSupported(VisualProperty<?> vp)
Description copied from interface: VisualLexicon
Test the given Visual Property is supported in this Lexicon.

Specified by:
isSupported in interface VisualLexicon
Parameters:
vp - visual property to be tested.
Returns:
true if this lexicon supports the given vp.

addIdentifierMapping

protected final void addIdentifierMapping(Class<?> type,
                                          String id,
                                          VisualProperty<?> vp)
#ASKMIKE

Parameters:
type -
id -
vp -

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.