@Override
	public void actionPerformed(ActionEvent e) {
		if (e.getSource() == tfBtn) {
			editTf();
		} else if (e.getSource() == cancelBtn) {
			ok = false;
			setVisible(false);
		} else if (e.getSource() == paramBtn) {
			ParameterManager pm = new ParameterManager(params);
			pm.setVisible(true);
			params = pm.getParams();
		} else if (e.getSource() == okBtn) {
			xFormula = fodTools.getFormula();
			yFormula = outTools.getFormula();
			title = titleField.getText();
			ok = true;
			setVisible(false);
		} else if (e.getSource() == titleField) {
			title = titleField.getText();
			setTitle("Editing " + title);
		} else if (e.getSource() == setInitBtn) {
			if (x0 == null
					|| x0.getRowDimension() != fodTools.getFormula().length)
				x0 = new ColumnMatrix(fodTools.getFormula().length);
			MatrixDialog sd = new MatrixDialog(x0, "Initial State", "x");
			if (sd.isOk()) {
				x0 = sd.getDataMatrix();
			}
		}
	}