/* * Filename: ControlPanel.java * * Author: Raf Van de Plas * * Contact: * Snail-mail: K.U.Leuven * ESAT-SCD * Kasteelpark Arenberg 10 * B-3001 Leuven-Heverlee * Belgium * Tel: +32 16 327927 * Fax: +32 16 321970 * Gsm: +32 474 243046 * E-mail: raf.vandeplas@esat.kuleuven.ac.be * WWW: http://www.esat.kuleuven.ac.be/~dna/BioI/ * * * Created on: Dec 8, 2003 * * Changed on: Dec 8, 2003 * * Version: 0.1 * * Description: * none * */ import javax.swing.*; import java.awt.*; /** * @author rvdplas * * To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public class ControlPanel extends JPanel { private ControllingListener controllingListener = null; private JButton nextButton = null; private JButton backButton = null; private JButton finishButton = null; public ControlPanel(ControllingListener controllingListener) { super(); this.controllingListener = controllingListener; this.initVisualComponents(); } public void initVisualComponents() { this.setLayout(new GridLayout(1,3)); this.nextButton = new JButton("Next"); this.nextButton.setActionCommand("next"); this.nextButton.addActionListener(this.controllingListener); this.nextButton.setToolTipText("Go to next dialog."); ToolTipManager.sharedInstance().registerComponent(this.nextButton); this.add(nextButton); this.backButton = new JButton("Back"); this.backButton.setActionCommand("back"); this.backButton.addActionListener(this.controllingListener); this.backButton.setToolTipText("Go to previous dialog."); ToolTipManager.sharedInstance().registerComponent(this.backButton); this.add(backButton); this.finishButton = new JButton("Finish"); this.finishButton.setActionCommand("finish"); this.finishButton.addActionListener(this.controllingListener); this.finishButton.setToolTipText("Finish the wizard."); ToolTipManager.sharedInstance().registerComponent(this.finishButton); this.add(finishButton); } }