public void actionPerformed(ActionEvent e) {
Object es = e.getSource();
if (es == cancelButton)
dispose();
else if (es == runButton) {
GromacsPanel gPanel = (GromacsPanel) tabbedPane.getSelectedComponent();
gPanel.updateProjectData();
JSimLogic.getInstance().runCommand(project,
tabbedPane.getSelectedComponent(),
gPanel.isInteractive());
if (tabbedPane.getSelectedIndex() < tabbedPane.getComponents().length - 1)
((GromacsPanel) tabbedPane.getComponent(tabbedPane
.getSelectedIndex() + 1)).updateData();
} else if (es == showButton) {
GromacsPanel gPanel = (GromacsPanel) tabbedPane.getSelectedComponent();
JSimLogic.getInstance().showCommand(project,
tabbedPane.getSelectedComponent(), gPanel.isInteractive());
} else if (es == applyButton) {
Component[] tabComponents = tabbedPane.getComponents();
for (int i = 0; i < tabComponents.length; i++) {
GromacsPanel component = (GromacsPanel) tabComponents[i];
component.updateProjectData();
}
JSimLogic.getInstance().saveProjectSettings(project);
} else if (es == helpButton){
URL helpURL = JSimLogic.getInstance().loadHelpString(tabbedPane.getSelectedComponent());