package com.uvigo.tMaestro.SCOCreator.templates;

import com.uvigo.mhp.*;
import java.awt.*;
import java.awt.event.*;
import org.havi.ui.*;

public class page1_1 extends Page {
    public page1_1() {
        try {
            initComponents();
            activeImage1.setContextManager(mainContextManager);
            courseDelegate.setPage(this);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        mainContextManager = new com.uvigo.mhp.ContextManager();
        courseDelegate = new com.uvigo.mhp.CourseDelegate();
        hPanel1 = new com.uvigo.mhp.ui.HPanel();
        hPanel2 = new com.uvigo.mhp.ui.HPanel();
        hPanel3 = new com.uvigo.mhp.ui.HPanel();
        hLabel2 = new com.uvigo.mhp.ui.HLabel();
        hImage1 = new com.uvigo.mhp.ui.HImage();
        hLabel1 = new com.uvigo.mhp.ui.HLabel();
        hAnimated1 = new com.uvigo.mhp.ui.HAnimated();
        hScrollPane1 = new com.uvigo.mhp.ui.HScrollPane();
        textPanel1 = new com.uvigo.mhp.textPanel.TextPanel();
        hScrollBar1 = new com.uvigo.mhp.ui.HScrollBar();
        activeImage1 = new com.uvigo.mhp.activeImage.ActiveImage();
        hMenu2 = new com.uvigo.mhp.ui.HMenu();

        courseDelegate.setPage(this);

        setLayout(null);

        setBackground(java.awt.Color.orange);
        setBackgroundImageURL("templates/page1_1/fondo1.gif");
        setName("hPage1");
        setOpaque(true);
        hPanel1.setLayout(null);

        hPanel1.setBackgroundImageMode(com.uvigo.mhp.ui.HPanel.IMAGE_DONT_SHOW);
        hPanel1.setName("hPanel1");
        hPanel1.setOpaque(true);
        hPanel2.setLayout(null);

        hPanel2.setBackground(java.awt.Color.magenta);
        hPanel2.setName("hPanel2");
        hPanel2.setOpaque(true);
        hPanel3.setLayout(null);

        hPanel3.setName("hPanel3");
        hLabel2.setName("hLabel2");
        hPanel3.add(hLabel2);
        hLabel2.setBounds(0, 0, 100, 100);

        hImage1.setBackground(java.awt.Color.orange);
        hImage1.setBackgroundMode(org.havi.ui.HVisible.BACKGROUND_FILL);
        hImage1.setName("hImage1");
        hPanel3.add(hImage1);
        hImage1.setBounds(100, 0, 40, 100);

        hPanel2.add(hPanel3);
        hPanel3.setBounds(30, 20, 140, 100);

        hPanel1.add(hPanel2);
        hPanel2.setBounds(140, 60, 200, 130);

        hLabel1.setName("hLabel1");
        hPanel1.add(hLabel1);
        hLabel1.setBounds(30, 100, 40, 16);

        add(hPanel1);
        hPanel1.setBounds(8, 8, 360, 210);

        hAnimated1.setBackground(java.awt.Color.blue);
        hAnimated1.setContentFile("templates/page1_1/anim.xml");
        hAnimated1.setDelay(2);
        hAnimated1.setName("hAnimated1");
        hAnimated1.setRepeatCount(1);
        add(hAnimated1);
        hAnimated1.setBounds(460, 20, 210, 190);

        hScrollPane1.setName("hScrollPane1");
        hScrollPane1.setVerticalScrollControl(hScrollBar1);
        textPanel1.setConfigurationFile("templates/page1_1/texto.xml");
        textPanel1.setContextManager(mainContextManager);
        textPanel1.setName("textPanel1");
        hScrollPane1.setViewportView(textPanel1);

        add(hScrollPane1);
        hScrollPane1.setBounds(20, 380, 670, 170);

        hScrollBar1.setName("hScrollBar1");
        add(hScrollBar1);
        hScrollBar1.setBounds(600, 240, 104, 24);

        activeImage1.setConfigurationFile("templates/page1_1/mundo.xml");
        activeImage1.setContext("");
        activeImage1.setMouseEnabled(true);
        activeImage1.setName("activeImage1");
        add(activeImage1);
        activeImage1.setBounds(200, 240, 260, 130);

        hMenu2.setConfigurationFile("templates/page1_1/menu.xml");
        hMenu2.setContextManager(mainContextManager);
        hMenu2.setName("hMenu");
        add(hMenu2);
        hMenu2.setBounds(40, 230, 200, 120);

    }// </editor-fold>//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private com.uvigo.mhp.activeImage.ActiveImage activeImage1;
    private com.uvigo.mhp.CourseDelegate courseDelegate;
    private com.uvigo.mhp.ui.HAnimated hAnimated1;
    private com.uvigo.mhp.ui.HImage hImage1;
    private com.uvigo.mhp.ui.HLabel hLabel1;
    private com.uvigo.mhp.ui.HLabel hLabel2;
    private com.uvigo.mhp.ui.HMenu hMenu2;
    private com.uvigo.mhp.ui.HPanel hPanel1;
    private com.uvigo.mhp.ui.HPanel hPanel2;
    private com.uvigo.mhp.ui.HPanel hPanel3;
    private com.uvigo.mhp.ui.HScrollBar hScrollBar1;
    private com.uvigo.mhp.ui.HScrollPane hScrollPane1;
    private com.uvigo.mhp.ContextManager mainContextManager;
    private com.uvigo.mhp.textPanel.TextPanel textPanel1;
    // End of variables declaration//GEN-END:variables
    
    
    public static void main(String[] args) {
        HSceneFactory hsFactory = HSceneFactory.getInstance();
        HScene scene = hsFactory.getBestScene(new HSceneTemplate());
        scene.setLayout(new BorderLayout());
        
        Page oPage = new page1_1();
        
        scene.add(oPage);
        
        scene.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        }
        );
        
        if (!java.beans.Beans.isDesignTime()) {
            com.uvigo.tMaestro.SCO.AutoConfigurer oConfigurer = new com.uvigo.tMaestro.SCO.AutoConfigurer();
            com.uvigo.tMaestro.SCO.Adaptation oAdaptation = new com.uvigo.tMaestro.SCO.Adaptation();
            oConfigurer.configure(oPage,oAdaptation.adapt());
        }
        
        scene.setVisible(true);
        scene.validate();
    }
}
