// Decompiled by DJ v3.12.12.96 Copyright 2011 Atanas Neshkov  Date: 08/10/2012 8:47:30
// 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:   ComboSeleccionModulos.java

package project;

import java.awt.*;
import java.util.Vector;
import javax.swing.*;
import javax.swing.border.Border;

// Referenced classes of package project:
//            JComboBox1_actionAdapter, AccederADatos

public class ComboSeleccionModulos extends JComboBox
{

    public ComboSeleccionModulos()
    {
        f1 = new Font("Arial", 0, 12);
        borde = BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.black, 1), BorderFactory.createEmptyBorder(0, 2, 0, 0));
        password = null;
        principal();
    }

    public ComboSeleccionModulos(Vector vector)
    {
        super(vector);
        f1 = new Font("Arial", 0, 12);
        borde = BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.black, 1), BorderFactory.createEmptyBorder(0, 2, 0, 0));
        password = null;
        principal();
    }

    public static void main(String args[])
    {
        ComboSeleccionModulos comboSeleccionModulos1 = new ComboSeleccionModulos();
    }

    private void principal()
    {
        if(AccederADatos.leer("h.demo").compareToIgnoreCase("No") == 0)
            setEditable(true);
        setFont(f1);
        setPreferredSize(new Dimension(200, 20));
        addActionListener(new JComboBox1_actionAdapter(this));
        setCursor(new Cursor(12));
    }

    public String darTexto()
    {
        if(getSelectedIndex() <= 0)
            return String.valueOf(getEditor().getItem());
        if(getSelectedIndex() > 0)
            return String.valueOf(getItemAt(getSelectedIndex()));
        else
            return "";
    }

    public void recibirObjetos(JPasswordField pass)
    {
        password = pass;
    }

    Font f1;
    Border borde;
    JTextField password;
}