fdda.core.modelling
Interface ModelManager

All Known Implementing Classes:
ModellingManagerImpl

public interface ModelManager

Interface for the class that manages the model.

Author:
Jörg Rüdenauer

Method Summary
 void addConnection(Project project, Node startNode, Node endNode, Line graphicalRepresentation, boolean directed)
          Adds a connection to a project
 void addNode(Project project, Node graphicalRepresentation)
          Adds a node to a project.
 int getNextID()
          Returns the next ID for a node or a connection.
 void removeConnection(Project project, Connection connection)
          Removes a connection from a project
 void removeNode(Project project, Node node)
          Removes a node from the project.
 

Method Detail

getNextID

public int getNextID()
Returns the next ID for a node or a connection. IDs must be globally unique.

Returns:
the next ID

addNode

public void addNode(Project project,
                    Node graphicalRepresentation)
Adds a node to a project.

Parameters:
project - the project
graphicalRepresentation - the graphical representation of the node

removeNode

public void removeNode(Project project,
                       Node node)
Removes a node from the project. The node mustn't be connected to any other nodes.

Parameters:
project - the project
node - the node
Throws:
IllegalArgumentException - if there are still connections at this node

addConnection

public void addConnection(Project project,
                          Node startNode,
                          Node endNode,
                          Line graphicalRepresentation,
                          boolean directed)
Adds a connection to a project

Parameters:
project - the project
startNode - the first node
endNode - the second node
graphicalRepresentation - the graphical representation of the connection (i.e. a line)
directed - whether the connection shall be directed

removeConnection

public void removeConnection(Project project,
                             Connection connection)
Removes a connection from a project

Parameters:
project - the project
connection - the connection


API documentation for FDDA version 0.9. Generated on 17/02/2004 14:12.