fdda.core.impl
Class Project

java.lang.Object
  |
  +--fdda.core.impl.Project
All Implemented Interfaces:
Project

class Project
extends Object
implements Project

Implementation of the project interface.

Author:
Jörg Rüdenauer

Field Summary
 
Fields inherited from interface fdda.core.projects.Project
STATE_DEMONSTRATION, STATE_MOD
 
Constructor Summary
Project()
          Constructor
 
Method Summary
 void addConnection(Connection connection)
          Adds a connection to the project
 void addNode(Node node)
          Sets a project-specific option.
 void clear()
          Removes all nodes and connections.
 Iterator connections()
          Returns an iterator over the connections in the project.
 Algorithm getAlgorithm()
          Returns the algorithm that is currently assigned to the project.
 GraphicalSystem getGraphicalSystem()
          Returns the graphical system of the project.
 String getLocation()
          Returns the location where the project is stored, e.g. a file path
 String getName()
          Returns the name of the project.
 int getState()
          Returns the state of the project (modelling or demonstration)
 boolean isLocationKnown()
          Returns whether a storage location for the project is known.
 Iterator nodes()
          Returns an iterator over the nodes in the project.
 void removeConnection(Connection connection)
          Removes a connection from the project
 void removeNode(Node node)
          Removes a node from the project
 void setAlgorithm(Algorithm algorithm)
          Assigns an algorithm to the project.
 void setChanged(boolean changed)
          Sets whether the project was changed since the last save operation.
 void setGraphicalSystem(GraphicalSystem system)
          Sets the graphical system of the project.
 void setLocation(String location)
          Sets the location where the project is stored, e.g. a file path.
 void setName(String name)
          Sets the name of the project
 void setState(int projectState)
          Sets the current state of the project (MOD or DEMONSTRATION)
 boolean wasChanged()
          Returns whether the project was changed since the last save operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Project

public Project()
Constructor

Method Detail

setGraphicalSystem

public void setGraphicalSystem(GraphicalSystem system)
Description copied from interface: Project
Sets the graphical system of the project.

Specified by:
setGraphicalSystem in interface Project
Parameters:
system - the graphical system

getGraphicalSystem

public GraphicalSystem getGraphicalSystem()
Description copied from interface: Project
Returns the graphical system of the project.

Specified by:
getGraphicalSystem in interface Project
Returns:
the graphical system

getName

public String getName()
Description copied from interface: Project
Returns the name of the project.

Specified by:
getName in interface Project
Returns:
the name

getLocation

public String getLocation()
Description copied from interface: Project
Returns the location where the project is stored, e.g. a file path

Specified by:
getLocation in interface Project
Returns:
the location (or null if it is not known).

setName

public void setName(String name)
Sets the name of the project

Parameters:
name - the name

setLocation

public void setLocation(String location)
Description copied from interface: Project
Sets the location where the project is stored, e.g. a file path. Set to null if the location is not known or the project wasn't stored yet.

Specified by:
setLocation in interface Project
Parameters:
location - the location

isLocationKnown

public boolean isLocationKnown()
Description copied from interface: Project
Returns whether a storage location for the project is known. This is not the case for projects the user has newly created.

Specified by:
isLocationKnown in interface Project
Returns:
whether the storage location is known

getState

public int getState()
Description copied from interface: Project
Returns the state of the project (modelling or demonstration)

Specified by:
getState in interface Project
Returns:
the state

setState

public void setState(int projectState)
Sets the current state of the project (MOD or DEMONSTRATION)

Parameters:
projectState - the state

addNode

public void addNode(Node node)
Sets a project-specific option.

Specified by:
addNode in interface Project
Parameters:
node - the node

removeNode

public void removeNode(Node node)
Description copied from interface: Project
Removes a node from the project

Specified by:
removeNode in interface Project
Parameters:
node - the node

nodes

public Iterator nodes()
Description copied from interface: Project
Returns an iterator over the nodes in the project.

Specified by:
nodes in interface Project
Returns:
iterator over the nodes

addConnection

public void addConnection(Connection connection)
Description copied from interface: Project
Adds a connection to the project

Specified by:
addConnection in interface Project
Parameters:
connection - the connection

removeConnection

public void removeConnection(Connection connection)
Description copied from interface: Project
Removes a connection from the project

Specified by:
removeConnection in interface Project
Parameters:
connection - the connection

connections

public Iterator connections()
Description copied from interface: Project
Returns an iterator over the connections in the project.

Specified by:
connections in interface Project
Returns:
iterator over the connections

clear

public void clear()
Description copied from interface: Project
Removes all nodes and connections.

Specified by:
clear in interface Project

wasChanged

public boolean wasChanged()
Description copied from interface: Project
Returns whether the project was changed since the last save operation.

Specified by:
wasChanged in interface Project
Returns:
whether the project was changed

setChanged

public void setChanged(boolean changed)
Description copied from interface: Project
Sets whether the project was changed since the last save operation.

Specified by:
setChanged in interface Project
Parameters:
changed - whether the project was changed

getAlgorithm

public Algorithm getAlgorithm()
Description copied from interface: Project
Returns the algorithm that is currently assigned to the project.

Specified by:
getAlgorithm in interface Project
Returns:
the algorithm

setAlgorithm

public void setAlgorithm(Algorithm algorithm)
Description copied from interface: Project
Assigns an algorithm to the project.

Specified by:
setAlgorithm in interface Project
Parameters:
algorithm - the algorithm


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