Class GraphElement

java.lang.Object
org.praxislive.project.GraphElement
Direct Known Subclasses:
GraphElement.Command, GraphElement.Comment, GraphElement.Component, GraphElement.Connection, GraphElement.Property

Elements of a graph tree.
  • Method Details

    • command

      public static GraphElement.Command command(String command)
      Create a Command element from the given script line. The command must be a single line of script with a plain first token.
      Parameters:
      command - script line
      Returns:
      command element
      Throws:
      IllegalArgumentException - if the command fails to parse according to the rules
    • comment

      public static GraphElement.Comment comment(String text)
      Create a Comment element from the given text.
      Parameters:
      text - comment text
      Returns:
      comment element
    • connection

      public static GraphElement.Connection connection(String sourceComponent, String sourcePort, String targetComponent, String targetPort)
      Create a Connection element between the given source component ID and port ID, and target component ID and port ID.
      Parameters:
      sourceComponent - source component ID
      sourcePort - source port ID
      targetComponent - target component ID
      targetPort - target port ID
      Returns:
      connection element
    • property

      public static GraphElement.Property property(org.praxislive.core.Value value)
      Create a property element of the given value.
      Parameters:
      value - property value
      Returns:
      property element