/*
    WizardPanelTemplate

    Notes: 
     1. This is a very simple class that shows you how to display a text message
        and change the "Next" button to show other text.
     2. To see an example of interacting with the user, see RegisterPanel.java
     3. To see an example of how to execute some Java commands without interacting
        with the user, see VersionPanel.java
     4. To see an example of how to start another program, see ExampleCommand.java 
     5. You can enter this class into any of the fields on the Custom panel.
     6. You are welcome to adapt this class to meet your needs as long as you 
        only use it with the JExpress product

    Copyright (C) 1998-2012 DeNova
    
*/


import javax.swing.JLabel;
import java.awt.BorderLayout;

import com.denova.io.ErrorLog;
import com.denova.ui.Fonts;
import com.denova.ui.WizardPanel;
import com.denova.util.PropertyList;



public class WizardPanelTemplate extends WizardPanel {

    public WizardPanelTemplate (PropertyList properties) {

        super (properties);

        setLayout ( new BorderLayout () );

        // look at other examples, such as RegisterPanel.java,
        // to see how to really do something useful with an
        // interactive style panel
        JLabel myLabel = new JLabel( "Hello World" );
        myLabel.setFont(Fonts.Bold);
        add ( myLabel, BorderLayout. CENTER );
     }

    public void userCanceled () {
        // if you want to make note that the user canceled
        // while interacting with your panel, add this method
        ErrorLog.getLog().write ( "User cancelled installation." );
    }

    public String getNextButtonLabel () {
               
        // if you want to change the "Next" button       // add this method with the appropriate text
        return "Move on";
    }

    public boolean isPreviousButtonEnabled () {
        // if you don't want the user to
        // be able to back up in the wizard,
        // then add this member function so it returns false;
	    return true;
	}

    /** 
     * Enter the panel. 
     *
     * Do not call this method; only the wizard should call it.
     */
    public synchronized void enter()
    {
        // you can interact with the user *only* when
        // the Wizard has called this method

        // enter() may be called multiple times as the user moves
        // back and forth through the panels so if you only want to 
        // execute the commands one time, then set a static to guard your code

        // there is nothing to do since the panel will automatically
        // display the message and wait for the user to press the Next button

        // see the other sample java classes for more involved examples
    }
}