Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/GenerateSequencesDialog.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/GenerateSequencesDialog.java	(revision 193)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/GenerateSequencesDialog.java	(revision 194)
@@ -3,4 +3,5 @@
 import org.eclipse.swt.widgets.Dialog;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Group;
@@ -14,9 +15,23 @@
 import org.eclipse.swt.layout.GridData;
 
+import de.ugoe.cs.util.console.CommandExecuter;
+
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+
 public class GenerateSequencesDialog extends Dialog {
 
+	private String processName;
+	
+	protected Button btnNumberAll;
+	protected Button btnLengthAll;
+	protected Spinner numberSpinner;
+	protected Spinner iterationsSpinner;
+	protected Spinner minLengthSpinner;
+	protected Spinner maxLengthSpinner;
+	
 	protected Object result;
 	protected Shell shlGenerateSequences;
-	private Text text;
+	private Text sequencesNameText;
 	private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
 
@@ -53,5 +68,5 @@
 	private void createContents() {
 		shlGenerateSequences = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
-		shlGenerateSequences.setSize(201, 248);
+		shlGenerateSequences.setSize(201, 303);
 		shlGenerateSequences.setText("Generate Sequences");
 		shlGenerateSequences.setLayout(new GridLayout(2, false));
@@ -62,6 +77,6 @@
 		group.setLayout(new GridLayout(1, false));
 		
-		text = new Text(group, SWT.BORDER);
-		text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+		sequencesNameText = new Text(group, SWT.BORDER);
+		sequencesNameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
 		
 		Group grpNumber = new Group(shlGenerateSequences, SWT.NONE);
@@ -70,9 +85,30 @@
 		grpNumber.setLayout(new GridLayout(2, false));
 		
-		Spinner spinner = new Spinner(grpNumber, SWT.BORDER);
-		spinner.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
-		
-		Button btnAll = new Button(grpNumber, SWT.CHECK);
-		btnAll.setText("All");
+		numberSpinner = new Spinner(grpNumber, SWT.BORDER);
+		numberSpinner.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
+		numberSpinner.setMinimum(1);
+		numberSpinner.setMaximum(Integer.MAX_VALUE);
+		
+		btnNumberAll = new Button(grpNumber, SWT.CHECK);
+		btnNumberAll.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				numberSpinner.setEnabled(!btnNumberAll.getSelection());
+				btnLengthAll.setEnabled(!btnNumberAll.getSelection());
+				iterationsSpinner.setEnabled(!btnNumberAll.getSelection());
+			}
+		});
+		btnNumberAll.setText("All");
+		
+		Group grpIterations = new Group(shlGenerateSequences, SWT.NONE);
+		grpIterations.setLayout(new GridLayout(1, false));
+		grpIterations.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1));
+		grpIterations.setText("Iterations");;
+		
+		iterationsSpinner = new Spinner(grpIterations, SWT.BORDER);
+		iterationsSpinner.setMinimum(1);
+		iterationsSpinner.setMaximum(Integer.MAX_VALUE);
+		iterationsSpinner.setSelection(100000);
+		iterationsSpinner.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
 		
 		Group grpLength = new Group(shlGenerateSequences, SWT.NONE);
@@ -81,6 +117,13 @@
 		grpLength.setLayout(new GridLayout(4, false));
 		
-		Button btnAll_1 = new Button(grpLength, SWT.CHECK);
-		btnAll_1.setText("All");
+		btnLengthAll = new Button(grpLength, SWT.CHECK);
+		btnLengthAll.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				minLengthSpinner.setEnabled(!btnLengthAll.getSelection());
+				maxLengthSpinner.setEnabled(!btnLengthAll.getSelection());
+			}
+		});
+		btnLengthAll.setText("All");
 		new Label(grpLength, SWT.NONE);
 		new Label(grpLength, SWT.NONE);
@@ -91,6 +134,7 @@
 		label.setText("Min.");
 		
-		Spinner spinner_2 = new Spinner(grpLength, SWT.BORDER);
-		spinner_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+		minLengthSpinner = new Spinner(grpLength, SWT.BORDER);
+		minLengthSpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+		minLengthSpinner.setMinimum(1);
 		
 		Label label_1 = new Label(grpLength, SWT.NONE);
@@ -98,12 +142,68 @@
 		label_1.setText("Max.");
 		
-		Spinner spinner_1 = new Spinner(grpLength, SWT.BORDER);
-		spinner_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
-		spinner_1.setToolTipText("0 means no limitations");
+		maxLengthSpinner = new Spinner(grpLength, SWT.BORDER);
+		maxLengthSpinner.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+		maxLengthSpinner.setToolTipText("0 means no limitations");
+		maxLengthSpinner.setMinimum(1);
 		
 		Button btnGenerate = formToolkit.createButton(shlGenerateSequences, "Generate!", SWT.NONE);
+		btnGenerate.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if("".equals(sequencesNameText.getText())) {
+					MessageBox messageBox = new MessageBox(shlGenerateSequences, SWT.ERROR);
+					messageBox.setText("Error");
+					messageBox.setMessage("Sequences name not defined!");
+					messageBox.open();
+					return;
+				}
+				String sequencesName = sequencesNameText.getText();
+				int number = numberSpinner.getSelection();
+				int minLength = minLengthSpinner.getSelection();
+				int maxLength = maxLengthSpinner.getSelection();
+				int maxIter = iterationsSpinner.getSelection();
+				if( maxIter<=number ) {
+					maxIter = number;
+				}
+				String command = "";
+				if( btnNumberAll.getSelection() ) {
+					if( minLength>maxLength ) {
+						MessageBox messageBox = new MessageBox(shlGenerateSequences, SWT.ERROR);
+						messageBox.setText("Error");
+						messageBox.setMessage("Min. length must be smaller than or equal to max. length!");
+						messageBox.open();
+						return;
+					}
+					command = "generateFixedLengthSequences " + processName + " " + sequencesName + " " + minLength + " " + maxLength + " true";
+				} else {
+					command = "generateRandomSequences " + processName + " " + sequencesName + " " + number + " " + maxIter;
+					if( !btnLengthAll.getSelection() ) {
+						if( minLength>maxLength ) {
+							MessageBox messageBox = new MessageBox(shlGenerateSequences, SWT.ERROR);
+							messageBox.setText("Error");
+							messageBox.setMessage("Min. length must be smaller than or equal to max. length!");
+							messageBox.open();
+							return;
+						}
+						command += " " + minLength + " " + maxLength;
+					}
+				}
+				CommandExecuter.getInstance().exec(command);
+				shlGenerateSequences.dispose();
+			}
+		});
 		
 		Button btnAbort = formToolkit.createButton(shlGenerateSequences, "Abort", SWT.NONE);
-
+		btnAbort.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				shlGenerateSequences.dispose();
+			}
+		});
+
+	}
+	
+	public void setProcessName(String name) {
+		this.processName = name;
 	}
 }
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/ModelPropertiesDialog.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/ModelPropertiesDialog.java	(revision 193)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/ModelPropertiesDialog.java	(revision 194)
@@ -3,4 +3,5 @@
 import org.eclipse.swt.widgets.Dialog;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.List;
@@ -13,6 +14,13 @@
 import org.eclipse.swt.layout.FillLayout;
 
+import de.ugoe.cs.eventbench.models.FirstOrderMarkovModel;
+import de.ugoe.cs.eventbench.models.IStochasticProcess;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+
 public class ModelPropertiesDialog extends Dialog {
 
+	private IStochasticProcess process;
+	
 	protected Object result;
 	protected Shell shlModelProperties;
@@ -63,4 +71,7 @@
 		
 		List list = new List(grpEvents, SWT.BORDER | SWT.V_SCROLL);
+		for( String symbol : process.getSymbolStrings() ) {
+			list.add(symbol);
+		}
 		
 		Group grpStatistics = new Group(shlModelProperties, SWT.NONE);
@@ -75,13 +86,13 @@
 		Label label = new Label(grpStatistics, SWT.RIGHT);
 		label.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
-		label.setText("####");
+		label.setText(""+process.getNumSymbols());
 		
 		Label lblNumTrieLeafs = new Label(grpStatistics, SWT.NONE);
 		lblNumTrieLeafs.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
-		lblNumTrieLeafs.setText("Size (#Trie Leafs)");
+		lblNumTrieLeafs.setText("Size (Flattend FOM)");
 		
 		Label label_1 = new Label(grpStatistics, SWT.RIGHT);
 		label_1.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
-		label_1.setText("####");
+		label_1.setText(""+process.getNumFOMStates());
 		
 		Label lblEntropy = new Label(grpStatistics, SWT.NONE);
@@ -89,9 +100,22 @@
 		lblEntropy.setText("Entropy");
 		
-		Label label_2 = new Label(grpStatistics, SWT.RIGHT);
-		label_2.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
+		final Label label_2 = new Label(grpStatistics, SWT.RIGHT);
+		label_2.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));
 		label_2.setText("####");
 		
 		Button btnCalculateEntropy = new Button(shlModelProperties, SWT.NONE);
+		btnCalculateEntropy.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				if( process instanceof FirstOrderMarkovModel) {
+					label_2.setText(""+((FirstOrderMarkovModel) process).calcEntropy());
+				} else {
+					MessageBox messageBox = new MessageBox(shlModelProperties, SWT.NONE);
+					messageBox.setText("Feature Not Available");
+					messageBox.setMessage("The feature is currently only available for first-order Markov models.");
+					messageBox.open();
+				}
+			}
+		});
 		btnCalculateEntropy.setText("Calculate Entropy");
 		
@@ -100,3 +124,7 @@
 
 	}
+	
+	public void setStochasticProcess(IStochasticProcess process) {
+		this.process = process;
+	}
 }
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/ModelsTabComposite.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/ModelsTabComposite.java	(revision 193)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/ModelsTabComposite.java	(revision 194)
@@ -5,8 +5,14 @@
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.layout.GridData;
 
 import de.ugoe.cs.eventbench.data.GlobalDataContainer;
+import de.ugoe.cs.eventbench.models.FirstOrderMarkovModel;
+import de.ugoe.cs.eventbench.models.IDotCompatible;
+import de.ugoe.cs.eventbench.models.IStochasticProcess;
+import de.ugoe.cs.util.console.CommandExecuter;
+
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -29,8 +35,28 @@
 		setLayout(new GridLayout(5, false));
 		
-		modelList = new List(this, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);
+		modelList = new List(this, SWT.BORDER | SWT.V_SCROLL);
 		modelList.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 5, 1));
 		
 		Button btnShow = new Button(this, SWT.NONE);
+		btnShow.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				String[] selectedStrings = modelList.getSelection();
+				if( selectedStrings.length==0 ) {
+					SWTHelpers.noSelectionError(getShell());
+					return;
+				}
+				IStochasticProcess process = (IStochasticProcess) GlobalDataContainer.getInstance().getData(selectedStrings[0]);
+				if( process instanceof FirstOrderMarkovModel ) {
+					String command = "showMarkovModel " + selectedStrings[0];
+					CommandExecuter.getInstance().exec(command);
+				} else {
+					MessageBox messageBox = new MessageBox(getShell(), SWT.NONE);
+					messageBox.setText("Feature Not Available");
+					messageBox.setMessage("The feature is currently only available for first-order Markov models.");
+					messageBox.open();
+				}
+			}
+		});
 		btnShow.setText("Visualize");
 		
@@ -49,10 +75,56 @@
 		
 		Button btnGenSequences = new Button(this, SWT.NONE);
+		btnGenSequences.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				String[] selectedStrings = modelList.getSelection();
+				if( selectedStrings.length==0 ) {
+					SWTHelpers.noSelectionError(getShell());
+					return;
+				}
+				GenerateSequencesDialog generateSequencesDialog = new GenerateSequencesDialog(getShell(), SWT.NONE);
+				generateSequencesDialog.setProcessName(selectedStrings[0]);
+				generateSequencesDialog.open();
+			}
+		});
 		btnGenSequences.setText("Gen. Sequences");
 		
 		Button btnProperties = new Button(this, SWT.NONE);
+		btnProperties.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				String[] selectedStrings = modelList.getSelection();
+				if( selectedStrings.length==0 ) {
+					SWTHelpers.noSelectionError(getShell());
+					return;
+				}
+				IStochasticProcess process = (IStochasticProcess) GlobalDataContainer.getInstance().getData(selectedStrings[0]);
+				ModelPropertiesDialog modelPropertiesDialog = new ModelPropertiesDialog(getShell(), SWT.NONE);
+				modelPropertiesDialog.setStochasticProcess(process);
+				modelPropertiesDialog.open();
+			}
+		});
 		btnProperties.setText("Properties");
 		
 		Button btnCreateDot = new Button(this, SWT.NONE);
+		btnCreateDot.addSelectionListener(new SelectionAdapter() {
+			@Override
+			public void widgetSelected(SelectionEvent e) {
+				String[] selectedStrings = modelList.getSelection();
+				if( selectedStrings.length==0 ) {
+					SWTHelpers.noSelectionError(getShell());
+					return;
+				}
+				IStochasticProcess process = (IStochasticProcess) GlobalDataContainer.getInstance().getData(selectedStrings[0]);
+				String command = "";
+				if( process instanceof IDotCompatible ) {
+					command = "printDot ";
+				} else {
+					command = "printTrieDot ";
+				}
+				command += selectedStrings[0];
+				CommandExecuter.getInstance().exec(command);
+			}
+		});
 		btnCreateDot.setText("Create DOT");
 	}
Index: trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/TrainModelDialog.java
===================================================================
--- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/TrainModelDialog.java	(revision 193)
+++ trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/swt/TrainModelDialog.java	(revision 194)
@@ -17,5 +17,4 @@
 
 import de.ugoe.cs.util.console.CommandExecuter;
-import de.ugoe.cs.util.console.Console;
 
 public class TrainModelDialog extends Dialog {
@@ -172,4 +171,5 @@
 					messageBox.setText("Error");
 					messageBox.setMessage("No modelname defined!");
+					messageBox.open();
 					return;
 				}
@@ -189,4 +189,5 @@
 						messageBox.setText("Error");
 						messageBox.setMessage("Min. Order must be smaller than or equal to max. order!");
+						messageBox.open();
 						return;
 					}
@@ -196,4 +197,5 @@
 						messageBox.setText("Error");
 						messageBox.setMessage("Escape probability must be in [0,1]!");
+						messageBox.open();
 						return;
 					}
