Package casa.lepton

Class OppNodeFactory

java.lang.Object
casa.lepton.OppNodeFactory
All Implemented Interfaces:
org.graphstream.graph.NodeFactory

public class OppNodeFactory extends Object implements org.graphstream.graph.NodeFactory
Class used to dynamically create OppNode instances. The newInstance(String, Graph) method is called by the Graph.addNode(String) method. Setters (setProfile(String), setCoord(CoordCar)) allow to set the nodes properties for subsequent creations
  • Constructor Details

    • OppNodeFactory

      public OppNodeFactory(OppNodeProperties props)
      Constructor. Initialize the default properties and attributes for the subsequent node creations.
      Parameters:
      props - the default node properties
  • Method Details

    • newInstance

      public OppNode newInstance(String id, org.graphstream.graph.Graph g)
      Create a OppNode instance.
      Specified by:
      newInstance in interface org.graphstream.graph.NodeFactory
      Parameters:
      id - the node id.
      g - a OppNetGraph.
      Returns:
      the new node
    • setProfile

      public void setProfile(String profile)
      Set the profile for the subsequent node creations.
      Parameters:
      profile -
    • setLabel

      public void setLabel(String label)
      Set the label for the subsequent object creations.
      Parameters:
      label - node label
    • setCoord

      public void setCoord(casa.util.geom.CoordCar coord)
      Set the node location for the subsequent object creations.
      Parameters:
      coord - node location