Package casa.lepton
Class OppNodeFactory
java.lang.Object
casa.lepton.OppNodeFactory
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionnewInstance
(String id, org.graphstream.graph.Graph g) Create aOppNode
instance.void
setCoord
(casa.util.geom.CoordCar coord) Set the node location for the subsequent object creations.void
Set the label for the subsequent object creations.void
setProfile
(String profile) Set the profile for the subsequent node creations.
-
Constructor Details
-
OppNodeFactory
Constructor. Initialize the default properties and attributes for the subsequent node creations.- Parameters:
props
- the default node properties
-
-
Method Details
-
newInstance
Create aOppNode
instance.- Specified by:
newInstance
in interfaceorg.graphstream.graph.NodeFactory
- Parameters:
id
- the node id.g
- aOppNetGraph
.- Returns:
- the new node
-
setProfile
Set the profile for the subsequent node creations.- Parameters:
profile
-
-
setLabel
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
-