Class NodeShapeVisualProperty

java.lang.Object
org.cytoscape.view.model.AbstractVisualProperty<NodeShape>
org.cytoscape.view.presentation.property.NodeShapeVisualProperty
All Implemented Interfaces:
VisualProperty<NodeShape>

public final class NodeShapeVisualProperty extends AbstractVisualProperty<NodeShape>
Visual Property for NodeShape values. This implementation provides basic default shapes. Other shapes can be provided by the rendering engine.

Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.

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>
  • Field Details

    • RECTANGLE

      public static final NodeShape RECTANGLE
      Rectangular shape.
    • ROUND_RECTANGLE

      public static final NodeShape ROUND_RECTANGLE
      Rectangular shape with rounded corners.
    • TRIANGLE

      public static final NodeShape TRIANGLE
      Triangular shape.
    • PARALLELOGRAM

      public static final NodeShape PARALLELOGRAM
      Parallelogram shape.
    • DIAMOND

      public static final NodeShape DIAMOND
      Diamond shape.
    • ELLIPSE

      public static final NodeShape ELLIPSE
      Ellipse shape.
    • HEXAGON

      public static final NodeShape HEXAGON
      Hexagonal shape.
    • OCTAGON

      public static final NodeShape OCTAGON
      Octagonal shape.
  • Constructor Details

    • NodeShapeVisualProperty

      public NodeShapeVisualProperty(NodeShape defaultValue, String id, String displayName, Class<? extends CyIdentifiable> modelDataType)
      Constructor.
      Parameters:
      defaultValue - The default NodeShape value.
      id - A machine readable string identifying this visual property used for XML serialization.
      displayName - A human readable string used for displays and user interfaces.
      modelDataType - The model data type associated with this visual property, e.g. CyNode, CyEdge, or CyNetwork.
  • Method Details

    • toSerializableString

      public String toSerializableString(NodeShape value)
      Description copied from interface: VisualProperty
      Returns a string of the specified value suitable for serializing to XML other text output.
      Parameters:
      value - the specified value.
      Returns:
      a string of the specified value suitable for serializing to XML other text output.
    • parseSerializableString

      public NodeShape parseSerializableString(String value)
      Description copied from interface: VisualProperty
      Returns an object of type T given a string serialized from the getSerializableString(T value) method.
      Parameters:
      value - a string serialized from the getSerializableString(T value) method.
      Returns:
      an object of type T given a string serialized from the getSerializableString(T value) method.
    • isDefaultShape

      public static boolean isDefaultShape(NodeShape shape)
      Returns true if the specified shape is one of the possible default shape values.
      Parameters:
      shape - the node shape to be checked.
      Returns:
      True if the specified shape is one of the possible default shape values.