gui
Class Project

java.lang.Object
  |
  +--gui.Project
All Implemented Interfaces:
java.io.Serializable

public class Project
extends java.lang.Object
implements java.io.Serializable

The Project keeps the SFC and a reference to the connected editor frame. It also keeps the name and status flags of the SFC.

Version:
$Revision: 1.22 $
Author:
Hans Theman and Ingo Schiller
See Also:
Serialized Form

Constructor Summary
Project()
          The standard constructor.
 
Method Summary
 void clearModified()
          Sets the editor modified flag.
 void exportSFC(java.io.File _file)
           
 Editor getEditor()
          Retruns the project editor.
 java.lang.String getName()
          Retruns the project name.
 SFC getSFC()
          Retruns the project SFC.
 boolean hasEditor()
           
static Project importSFC(java.io.File _file)
          The import sfc routine
 boolean isChecked()
          Return the projet checked flag.
 boolean isModified()
          Returns the editor modified flag.
 boolean isNamed()
           
 boolean isOnlyBool()
          Returns the project isOnlyBool flag.
 void restoreEnvironment()
           
 void setChecked(boolean status)
          Sets the project checked flag.
 void setEditor(Editor editor)
          Sets the editor in the project.
 void setEnvironment()
           
 void setName(java.lang.String _name)
          Sets the name of the project.
 void setOnlyBool(boolean status)
          Sets the project welldefined flag.
 void setSFC(SFC _sfc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Project

public Project()
The standard constructor. It generates an empty SFC. All parameters of the SFC are null! The name is set to "unknown".
Method Detail

restoreEnvironment

public void restoreEnvironment()

setEnvironment

public void setEnvironment()

isNamed

public boolean isNamed()

hasEditor

public boolean hasEditor()

isChecked

public boolean isChecked()
Return the projet checked flag.
Returns:
is_checked Indicates whether the project SFC is checked.

setChecked

public void setChecked(boolean status)
Sets the project checked flag.
Parameters:
status - The checked status of the SFC in the project.

isOnlyBool

public boolean isOnlyBool()
Returns the project isOnlyBool flag.
Returns:
is_only_bool The status of the SFC of the project.

setOnlyBool

public void setOnlyBool(boolean status)
Sets the project welldefined flag.
Parameters:
status - The specified status of the SFC of the project.

getName

public java.lang.String getName()
Retruns the project name.
Returns:
name The name of the project.

getEditor

public Editor getEditor()
Retruns the project editor. If no editor is specified in the project, null is returned.
Returns:
editor The connected editor.

getSFC

public SFC getSFC()
Retruns the project SFC.
Returns:
sfc The SFC that belongs to the project.

setSFC

public void setSFC(SFC _sfc)

exportSFC

public void exportSFC(java.io.File _file)
               throws java.lang.Exception

importSFC

public static Project importSFC(java.io.File _file)
                         throws java.lang.Exception
The import sfc routine

setName

public void setName(java.lang.String _name)
Sets the name of the project. So far a editor is present in the project, the name is also set in the editor.
Parameters:
_name - The desired name of the project.

setEditor

public void setEditor(Editor editor)
Sets the editor in the project. While connecting an editor to the project, the project name is set in it.
Parameters:
_editor - The editor in which the project is opened.

isModified

public boolean isModified()
Returns the editor modified flag. This function is part of the editor interface.
Returns:
isModified The editor's modified status

clearModified

public void clearModified()
Sets the editor modified flag. This function is part of the editor interface.