SFE.GUI
Class Program

java.lang.Object
  extended by SFE.GUI.Program

public class Program
extends java.lang.Object

Program A Program includes all program data. It is composed of: name, description, constants, types, functions. All programs include primitive types, must types (input, output, etc.) and must functions (output). A program renders itself by the generateCode() method. Initialize with: Program(name, description)


Field Summary
 javax.swing.DefaultListModel constants
           
 javax.swing.DefaultListModel functions
           
 java.lang.Object globalLock
           
 java.lang.String outputFilename
           
 ProgramDocument programDesc
           
 ProgramDocument programDoc
           
 ProgramDocument programName
           
 javax.swing.DefaultListModel types
           
 
Constructor Summary
Program(java.lang.String name, java.lang.String description)
          Create a new Program
 
Method Summary
 java.lang.String generateCode()
          Generate and get the whole program code
 void init(java.lang.String name, java.lang.String description)
          Initialize program.
 void setCodePanel(CodeWndPanel c)
          Update code panel where this program will be shown
 java.lang.String toString()
          Get the string representation
 void updateDoc()
          Update the program Document object with the program code Also, if shown in a window, take care of restoring the position
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

programName

public ProgramDocument programName

programDesc

public ProgramDocument programDesc

programDoc

public ProgramDocument programDoc

types

public javax.swing.DefaultListModel types

constants

public javax.swing.DefaultListModel constants

functions

public javax.swing.DefaultListModel functions

outputFilename

public java.lang.String outputFilename

globalLock

public java.lang.Object globalLock
Constructor Detail

Program

public Program(java.lang.String name,
               java.lang.String description)
Create a new Program

Parameters:
name - Program name
description - Program description (commented)
Method Detail

init

public void init(java.lang.String name,
                 java.lang.String description)
Initialize program. Here program default types and functions are declared. Used also to cleanup existing program.

Parameters:
name - Program name
description - Program description (commented)

generateCode

public java.lang.String generateCode()
Generate and get the whole program code

Returns:
The program code as a string

toString

public java.lang.String toString()
Get the string representation

Overrides:
toString in class java.lang.Object

setCodePanel

public void setCodePanel(CodeWndPanel c)
Update code panel where this program will be shown


updateDoc

public void updateDoc()
Update the program Document object with the program code Also, if shown in a window, take care of restoring the position