
\section{Introduction to GUI}

The GUI, Graphic User Interface represents a link between the user and the 
Program-Manager. 
The user has the posibility to execute a specially defined simulation. Each simulation has its own name and its own parameters.
The GUI is seperated in 4 classes.

\begin{enumerate}

\item {Main window (CGUIFrame)\\

It is implemented as a JDesktopPane. It contains a menubar and a taskbar for placing 
the following described internal frames. This dynamic taskbar will allow the user to
switch between all windows.}

\item {Controlpanel (InternalFrame)\\

Each simulation has a controlpanel for setting parameters. The GUI receives these parameters from the manager group, which are implemented in the CNV-List.
The user can do all inputs and store them. Now the new values are written back into the CNV-List and given back to the 
manager group. It includes also a progressbar and several infoboards.}
 
\item {Window for statistical graphics (StatInternalFrame)\\

This internal frame works as a JDesktopPane, which includes the JavaBeans from the statistic group.}

\item {Window for other graphics (GFXInternalFrame)\\

This internal frame works as a JDesktopPane, which includes the JavaBeans from the other groups.} 

\end{enumerate}

All GUI-components are inheritated by Javax.swing-class. The CNV-List represents the hub, this will say that all
communication between the groups runs over this form. \\


\section{Use Cases}

\begin{figure}[h]
\centerline{\epsfxsize=10cm
\epsfbox{\GUI/Pics/usecase.eps}}
\end{figure}



\section{Interfaces}
The Gui has only one interface to the manager group.

\subsection{Interface to manager}

\begin{itemize}
\item {signals for start, resume, continue or kill simulation}
\item {signal for save simulation}
\item {receive and return CNV-List}
\item {return simname}
\item {return message}
\item {receive statusfile visualization}
\item {receive error messages}
\end{itemize}

\section{Class Diagrams}


\begin{figure}[h]
\centerline{\epsfxsize=10cm
\epsfbox{\GUI/Pics/klassendiagramm.eps}}
\end{figure}


This is the temporary state of our classdiagramm.


\section{Sequence Diagrams}


\begin{figure}[h]
\centerline{\epsfxsize=10cm
\epsfbox{\GUI/Pics/Sequenzdiagramm.eps}}
\end{figure}



The spezialised sequence-diagram will be implemented as soon as possible.

\subsection{Interaction between GUI \leftrightarrow USER \leftrightarrow
OtherGroups}
\begin {itemize}
\item {User starts program. He has the choice between user-defined and batchmodus}
\item {Program initialization: Interaction between Parameter-Manager and
GUI for default, especially for batchmodus}
\item {Settings by user (e.g. number of agents, number of generations,
simulation-speed...)} 
\item {Settings are forwarded to Program-Manager}
\item {Start simulation}
\item {Start-signal is being forwarded to Parameter-Manager}
\item {Simulation is executing - graphical outputs of simulation and
statistics - datas are received from Parameter-Manager which receives those
from other groups}
\item {If break: waiting - status until continue}
\item {Stop simulation}
\item {Store simulation} 
\end{itemize}

\section{Packages}

\subsection{javax.swing.*}
All components of the GUI as JList, JButton, JTextField, JTextArea, JProgressBar, JScrollPanel, ... are inheritated
from this package.

\begin{itemize}

\item {JList - All parameters, types and groups are parsed out of the CNV-List, put into several vectors and
from there directly read into JLists. The user can now click on each item for selection. On selecting a group only the parameters of the specified group are available.}

\item {JScrollPanel - All JLists and JTextAreas are embedded into JScrollPanels to make sure that a big ammount of parameters 
can be visualized.}    

\item {JProgressBar - The status of the current simulation can also be seen by percentage.} 

\end{itemize}

\section{Visualization}



\begin{figure}[h]
\centerline{\epsfxsize=10cm
\epsfbox{\GUI/Pics/guimain.eps}}
\end{figure}



The window shown above will be the mainwindow, which appears after starting
the program. On the top the dynamic menubar, on the bottom the dynamic
taskbar. For each key in the taskbar a seperate window will appear, which
fits exactly into the mainwindow between menubar and taskbar (Multi Document Interface)
, so that the user is able to control the simulation at any time. The user has the
possibility to start and control up to 10 different simulations. An own
window for statistic visualization and an own window for other graphics
for each simulation can be opened and controlled by using the taskbar. \\



\begin{figure}[h]
\centerline{\epsfxsize=10cm
\epsfbox{\GUI/Pics/guistat.eps}}
\end{figure}



The temporary state of the graphical-visualization-window, as currently
all groups are implementing their own windows, which will then be integrated
dynamically as JavaBeans into the GUI.\\



\begin{figure}[h]
\centerline{\epsfxsize=10cm
\epsfbox{\GUI/Pics/guipanel.eps}}
\end{figure}


The function of the ControlPanel is described above.


\section{Protocols}

Our protocols start at the first of june, when it was decided to change the current GUI into a more dynamically one.

\subsection{2001/06/01}
TOPICS:

\begin{itemize}
\item {The GUI will be changed. It has to become more dynamically. This causes a complete restructuring.}
\item {The change from the GUI into batch mode should be possible to get the possibility of a faster simulation.}
\item {It should also be possible to modify and show as many as required parameters.}
\item {The GUI should be modified to a Multi Document (MDI).}
\item {Every simulation should have its own name.}
\end{itemize}

\subsection{2001/06/08}
TOPICS:
\begin{itemize}
\item {The first points described above are implemented into the new GUI.}
\item {The next point to work out for us was to show the parameters in a different way. It should be possible to select a group and then see the parameters of this group.}
\item {After a short discussion it was fixed, to make the possibility of a stepwise visualization of a simulation.} 
\end{itemize}

\subsection{2001/06/15}
TOPICS:

\begin{itemize}
\item {The first run without GUI was performed.}
\item {The kind of JavaBeans were discussed. We, the GUI group, implemented a design pattern for each visualization.}
\item {The new GUI was presented. The following things were told to be modified.}
\item {A progressbar should be added.}
\item {Value-inputs should be saved seperately.}
\item {Visualization of statusfiles from the manager group.}
\item {Visualization of error messages.}
\end{itemize}

P.S. : The GUI is ready for synchronization with the parameter group.




