/*
 *  RPGeneration - A role playing utility generate interesting things
 *  Copyright (C) 2002 Devon D Jones
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *  The author of this program grants you the ability to use this code
 *  in conjunction with code that is covered under the Open Gaming License
 *
 * TreasureTopPanel.java
 *
 * Created on October 29, 2002, 3:38 PM
 */

package org.evilsoft.gaming.RPGeneration;

/**
 *
 * @author  devon
 */
public class TreasureTopPanel extends TopPanel {

    /** Creates new form TreasureTopPanel */
    public TreasureTopPanel() {
        initComponents();
        initRest();
    }

    /** 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.
     */
    private void initComponents() {//GEN-BEGIN:initComponents
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        cbEncounterLevel = new javax.swing.JComboBox();
        jPanel2 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();

        setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.X_AXIS));

        jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        jLabel1.setText("Encounter Level");
        jPanel1.add(jLabel1);

        cbEncounterLevel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbEncounterLevelActionPerformed(evt);
            }
        });

        jPanel1.add(cbEncounterLevel);

        add(jPanel1);

        jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        add(jPanel2);

        jPanel3.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));

        add(jPanel3);

    }//GEN-END:initComponents

    private void cbEncounterLevelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbEncounterLevelActionPerformed
        // Add your handling code here:
    }//GEN-LAST:event_cbEncounterLevelActionPerformed

    private void initRest() {
        java.util.Vector el = new java.util.Vector();
        for(int i = 1; i <= 20; i++) {
            el.add(new Operation("Set", "EL", i + "", i + ""));
        }
        javax.swing.DefaultComboBoxModel cbModel = new javax.swing.DefaultComboBoxModel(el);
        cbEncounterLevel.setModel(cbModel);
    }

    public String getName() {
        return cbEncounterLevel.getSelectedItem().toString();
    }

    public java.util.ArrayList getOperations() {
        java.util.ArrayList operationList = new java.util.ArrayList();
        operationList.add(cbEncounterLevel.getSelectedItem());
        return operationList;
    }

    public void setTables(java.util.HashMap tables) {
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JComboBox cbEncounterLevel;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables

}
