/*
 * [Mockup.java]
 *
 * Summary: Mockup: test driver for JColourChooser.
 *
 * Copyright: (c) 2007-2017 Roedy Green, Canadian Mind Products, http://mindprod.com
 *
 * Licence: This software may be copied and used freely for any purpose but military.
 *          http://mindprod.com/contact/nonmil.html
 *
 * Requires: JDK 1.8+
 *
 * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/
 *
 * Version History:
 *  1.0 2007-08-15 initial version, just a mockup. No hooks into application.
 */
package com.mindprod.jcolourchooser;

import com.mindprod.common18.Common18;
import com.mindprod.common18.HybridJ;
import com.mindprod.common18.VersionCheck;

import javax.swing.JApplet;

/**
 * Mockup: test driver for JColourChooser.
 *
 * @author Roedy Green, Canadian Mind Products
 * @version 1.0 2007-08-15 initial version, just a mockup. No hooks into application.
 * @since 2007-08-15
 */
public class Mockup extends JApplet
    {
    /**
     * height of Applet box in pixels. Does not include surrounding frame.
     */
    private static final int APPLET_HEIGHT = 606;

    /**
     * Width of Applet box in pixels.
     */
    private static final int APPLET_WIDTH = 960;

    private static final int FIRST_COPYRIGHT_YEAR = 2007;

    /**
     * undisplayed copyright notice
     */
    @SuppressWarnings( { "UnusedDeclaration" } )
    private static final String EMBEDDED_COPYRIGHT =
            "Copyright: (c) 2007-2017 Roedy Green, Canadian Mind Products, http://mindprod.com";

    @SuppressWarnings( { "UnusedDeclaration" } )
    private static final String RELEASE_DATE = "2007-08-15";

    @SuppressWarnings( { "UnusedDeclaration" } )
    private static final String TITLE_STRING = "JColourChooser Mockup";

    @SuppressWarnings( { "UnusedDeclaration" } )
    private static final String VERSION_STRING = "1.0";

    /**
     * Allow this Applet to run as an application as well.
     *
     * @param args command line arguments ignored.
     */
    public static void main( String args[] )
        {
        HybridJ.fireup( new Mockup(), TITLE_STRING + " " + VERSION_STRING,
                APPLET_WIDTH, APPLET_HEIGHT );
        } // end main

    /**
     * Called by the browser or Applet viewer to inform
     * this Applet that it has been loaded into the system.
     */
    @Override
    public void init()
        {
        if ( !VersionCheck.isJavaVersionOK( 1, 8, 0, this ) )
            {
            return;
            }
        Common18.setLaf();
        this.getContentPane().add( new JColourChooser() );
        this.validate();
        this.setVisible( true );
        }
    }