// Decompiled by DJ v3.12.12.96 Copyright 2011 Atanas Neshkov  Date: 08/10/2012 8:47:23
// Home Page: http://members.fortunecity.com/neshkov/dj.html http://www.neshkov.com/dj.html - Check often for new version!
// Decompiler options: packimports(3) 
// Source File Name:   BotonPreguntasTipoG.java

package project;

import java.awt.Component;
import java.awt.Cursor;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.Border;

// Referenced classes of package project:
//            ControlDeLasPreguntasTipoG, LabelDeFondoDelFrame2, Crono

public class BotonPreguntasTipoG extends JButton
{

    public BotonPreguntasTipoG(String texto2, ControlDeLasPreguntasTipoG controlDeLasPreguntasTipoG2)
    {
        numero = "";
        controlDeLasPreguntasTipoG = controlDeLasPreguntasTipoG2;
        try
        {
            jbInit();
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        texto = texto2;
        setOpaque(false);
        setFocusPainted(false);
        setText(texto);
        setCursor(new Cursor(12));
    }

    private void jbInit()
        throws Exception
    {
        setAlignmentY(0.0F);
        setBorder(border1);
        setHorizontalAlignment(2);
        setHorizontalTextPosition(2);
        setVerticalAlignment(3);
        setVerticalTextPosition(3);
        addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e)
            {
                this_actionPerformed(e);
            }

        }
);
        addMouseListener(new MouseAdapter() {

            public void mouseExited(MouseEvent e)
            {
                Crono _tmp = controlDeLasPreguntasTipoG.labelDeFondoDelFrame.crono;
                Crono.losBotMeDejan(true);
            }

            public void mouseEntered(MouseEvent mouseevent)
            {
            }

            public void mouseReleased(MouseEvent event)
            {
                Crono _tmp = controlDeLasPreguntasTipoG.labelDeFondoDelFrame.crono;
                Crono.losBotMeDejan(true);
            }

            public void mousePressed(MouseEvent event)
            {
                Crono _tmp = controlDeLasPreguntasTipoG.labelDeFondoDelFrame.crono;
                Crono.losBotMeDejan(false);
            }

        }
);
        border1 = BorderFactory.createEmptyBorder();
    }

    void this_actionPerformed(ActionEvent e)
    {
        setEnabled(false);
        controlDeLasPreguntasTipoG.antepenultimoPinchado = controlDeLasPreguntasTipoG.penultimoPinchado;
        controlDeLasPreguntasTipoG.penultimoPinchado = controlDeLasPreguntasTipoG.ultimoPinchado;
        controlDeLasPreguntasTipoG.ultimoPinchado = numero;
        if(controlDeLasPreguntasTipoG.respuestaDada.compareTo("") == 0)
            controlDeLasPreguntasTipoG.respuestaDada = numero;
        else
            controlDeLasPreguntasTipoG.respuestaDada = controlDeLasPreguntasTipoG.respuestaDada + ", " + numero;
    }

    String texto;
    Border border1;
    ControlDeLasPreguntasTipoG controlDeLasPreguntasTipoG;
    String numero;
}