package org.dgpf.gui.wizards;
import java.awt.CardLayout;
import java.awt.HeadlessException;
import java.awt.event.ActionListener;
import org.dgpf.gui.Frame;
import org.dgpf.gui.dialogs.DialogBase;
/**
* An abstract wizard dialog that serves as superclass for all DGPF wizard
* dialogs.
*
* @author Alexander Podlich
*/
public abstract class WizardBase extends DialogBase implements
ActionListener
{
/**
* Default constructor.
*
* @param p_parent
* is the parent frame.
* @param p_caption
* Dialog window caption.
* @param p_info_text
* Text that appears at top of the dialog window.
* @param p_modal
* Whether user interaction with other frames of the application
* should be blocked while the dialog is open.
* @throws HeadlessException
*/
public WizardBase(Frame p_parent, String p_caption, String p_info_text,
boolean p_modal) throws HeadlessException
{
super(p_parent, p_caption, p_info_text, DialogBase.WIZARD_BTNS,
p_modal, new CardLayout());
setPrvBtnEnbl(false);
setNxtBtnEnbl(false);
setFnshBtnEnbl(false);
}
/**
* @param p_val
* The enable-status of the previous button.
*/
public void setPrvBtnEnbl(boolean p_val)
{
this.m_btn_prev.setEnabled(p_val);
}
/**
* @param p_val
* The enable-status of the previous button.
*/
public void setNxtBtnEnbl(boolean p_val)
{
this.m_btn_next.setEnabled(p_val);
}
/**
* @param p_val
* The enable-status of the finish button.
*/
public void setFnshBtnEnbl(boolean p_val)
{
this.m_btn_finish.setEnabled(p_val);
}
}