Interface VisualLexicon

All Known Implementing Classes:
AbstractVisualLexicon, BasicTableVisualLexicon, BasicVisualLexicon

public interface VisualLexicon
A RenderingEngine should provide one, immutable lexicon implementing this interface. This is a pre-defined tree of VisualProperties designed by the RenderingEngine developer.

Module: viewmodel-api

To use this in your app, include the following dependency in your POM:


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.
  • Method Details

    • getRootVisualProperty

      VisualProperty<NullDataType> getRootVisualProperty()
      Get root of this tree. To traverse this tree, use this node as the entry point.
      root node.
    • getAllVisualProperties

      Set<VisualProperty<?>> getAllVisualProperties()
      Returns the Set of VisualPropertys supported by this Renderer.
      Set of all visual properties
    • lookup

      VisualProperty<?> lookup(Class<?> type, String identifier)
      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.
      type - The type of the visual property sought, which should (in general) be CyNode.class, CyEdge.class, or CyNetwork.class.
      identifier - A string identifying a particular visual property.
      A VisualProperty identified by the input string or null if no match is found.
    • getVisualLexiconNode

      VisualLexiconNode getVisualLexiconNode(VisualProperty<?> vp)
      Get a tree node in for the given VisualProperty.
      vp - target VisualProperty in this lexicon.
      tree node for the VisualProperty in this lexicon.
      IllegalArgumentException - If vp does not exist in the lexicon.
    • getAllDescendants

      Collection<VisualProperty<?>> getAllDescendants(VisualProperty<?> prop)
      Get collection of visual properties for a given object type (node/edge/network).
      prop - any visual property
      Collection of visual properties for the type.
    • isSupported

      boolean isSupported(VisualProperty<?> vp)
      Test the given Visual Property is supported in this Lexicon.
      vp - visual property to be tested.
      true if this lexicon supports the given vp.
    • getSupportedValueRange

      <T> Set<T> getSupportedValueRange(VisualProperty<T> vp)
      Returns a filtered value range for a 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.
      vp - VisualProperty where vp.getRange().isDiscrete() == true