Package club.ui

Source Code of club.ui.EventEntry

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package club.ui;

import club.beans.ConfigBean;
import club.beans.EventTypeBean;
import club.data.DataConfig;
import club.data.DataEventType;
import club.data.DataEvent;
import club.ulti.Validator;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
*
* @author Quang
*/
public class EventEntry extends javax.swing.JDialog {

    /**
     * Creates new form EventEntry
     */
    public EventEntry(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        initContent();
        this.setLocationRelativeTo(null);
    }
   
    /*
     * manual initial content
     */
   
    private void initContent(){
        initEventType();
        initDate();
    }
    private void initDate(){
        try {
            int year = new java.util.Date().getYear() + 1903;
            calDate.setSelectableDateRange(new java.util.Date(),new SimpleDateFormat("mm-dd-YYYY").parse("12-31-" + year));

        } catch (ParseException ex) {
            Logger.getLogger(EventEntry.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    private void initEventType(){
        eventTypeList = dataType.getAllEventTypes("");
        cbbEventType.removeAllItems();
        for (EventTypeBean bean : eventTypeList){
            cbbEventType.addItem(bean);
        }
    }
   
    private void filterEventType(){
        String query = tfEventFilter.getText().trim();
        eventTypeList = dataType.getAllEventTypes(query);
        cbbEventType.removeAllItems();
        for (EventTypeBean bean : eventTypeList){
            cbbEventType.addItem(bean);
        }
    }
   


    /*
     * Functions
     */
   
    private ArrayList validateAllForm(){
        ArrayList errors = new ArrayList();
        if (!Validator.checkIsNotEmpty(tfName.getText())){
            errors.add("Name can not be empty");
        }
       /* if (!Validator.checkIsNotEmpty(taDescription.getText())){
            errors.add("Description can not be empty");
        }*/
        try{
            if (!Validator.checkFutureDay(calDate.getDate())){
                errors.add("Invalid Starting time! That time has already passed away");
             }
        } catch (Exception e){
            errors.add("You have to choose start time");
        }
       
        if (!Validator.checkPositiveFloat(tfTime.getText())){
            errors.add("Duration can not be empty and must be a positive float value");
        }
        if (!Validator.checkIsNotEmpty(tfVenue.getText())){
            errors.add("Venue can not be empty");
        }
        if (!Validator.checkPositiveDouble(tfFee.getText())){
            errors.add("Fee can not be empty and must be a positive double value");
        }
        try{
            int type = ((EventTypeBean)cbbEventType.getSelectedItem()).getEventType();
        } catch(Exception e){
            errors.add("You have to create a event type first");
        }
        return errors;
    }
    private void addEvent(){
        DataConfig dataConfig = new DataConfig();
        try{
            ConfigBean config = dataConfig.readConfigFile();
            String name = tfName.getText();
            int accountID = config.getAdminID();
            String des = taDescription.getText();
            java.util.Date date = calDate.getDate();
            float duration = Float.parseFloat(tfTime.getText());
            String venue = tfVenue.getText();
            int type = ((EventTypeBean)cbbEventType.getSelectedItem()).getEventType();
            double fee = Double.parseDouble(tfFee.getText());
            int status = 0;
            double cost = 1;
            if (dataEvent.insertEvent(des, date, duration, venue, type, fee, accountID, status, cost, name)){
                JOptionPane.showMessageDialog(this, "Successfully added new event");
                this.dispose();
            } else{
                JOptionPane.showMessageDialog(this, "Error!");
            }
        } catch (Exception e){
            e.printStackTrace();
            JOptionPane.showMessageDialog(this, "Error! Exit application");
            System.exit(0);
        }
       
    }
   
    private void addEventType(){
        String name = tfNewEventType.getText();
        boolean flag = dataType.insertEventType(name);
        if (flag){
            JOptionPane.showMessageDialog(this, "Successfully added new event type");
            tfNewEventType.setText("");
            initEventType();
        } else{
            JOptionPane.showMessageDialog(this, "Error! Existed Type");
        }
    }
    /**
     * 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.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lbDescription = new javax.swing.JLabel();
        lbVenue = new javax.swing.JLabel();
        lbTime = new javax.swing.JLabel();
        tfVenue = new javax.swing.JTextField();
        tfTime = new javax.swing.JTextField();
        btnAddEvent = new javax.swing.JButton();
        btnQuit = new javax.swing.JButton();
        spDescription = new javax.swing.JScrollPane();
        taDescription = new javax.swing.JTextArea();
        jLabel1 = new javax.swing.JLabel();
        lbFee = new javax.swing.JLabel();
        tfFee = new javax.swing.JTextField();
        calDate = new com.toedter.calendar.JDateChooser();
        jPanel1 = new javax.swing.JPanel();
        cbbEventType = new javax.swing.JComboBox();
        lbEventFilter = new javax.swing.JLabel();
        lbEventType = new javax.swing.JLabel();
        tfEventFilter = new javax.swing.JTextField();
        btnAddEventType = new javax.swing.JButton();
        tfNewEventType = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        lbName = new javax.swing.JLabel();
        tfName = new javax.swing.JTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setResizable(false);

        lbDescription.setText("Description");

        lbVenue.setText("Venue");

        lbTime.setText("Duration");

        tfVenue.setToolTipText("Can't be empty");
        tfVenue.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                tfVenueFocusGained(evt);
            }
        });
        tfVenue.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfVenueKeyReleased(evt);
            }
        });

        tfTime.setToolTipText("Must be an integer value");
        tfTime.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                tfTimeFocusGained(evt);
            }
        });
        tfTime.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfTimeKeyReleased(evt);
            }
        });

        btnAddEvent.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/add.png"))); // NOI18N
        btnAddEvent.setText("Add");
        btnAddEvent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddEventActionPerformed(evt);
            }
        });

        btnQuit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/club/icon/cancel.png"))); // NOI18N
        btnQuit.setText("Cancel");
        btnQuit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnQuitActionPerformed(evt);
            }
        });

        taDescription.setColumns(20);
        taDescription.setRows(5);
        taDescription.setToolTipText("Can't be empty");
        taDescription.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                taDescriptionFocusGained(evt);
            }
        });
        taDescription.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                taDescriptionKeyReleased(evt);
            }
        });
        spDescription.setViewportView(taDescription);

        jLabel1.setText("Date");

        lbFee.setText("Fee  ");

        tfFee.setToolTipText("Must be a positive double value");
        tfFee.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                tfFeeFocusGained(evt);
            }
        });
        tfFee.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfFeeKeyReleased(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Type of event"));

        cbbEventType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        lbEventFilter.setText("Filter");

        lbEventType.setText("Event Type");

        tfEventFilter.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                tfEventFilterFocusGained(evt);
            }
        });
        tfEventFilter.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfEventFilterKeyReleased(evt);
            }
        });

        btnAddEventType.setText("Create");
        btnAddEventType.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAddEventTypeActionPerformed(evt);
            }
        });

        tfNewEventType.setToolTipText("");
        tfNewEventType.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                tfNewEventTypeFocusGained(evt);
            }
        });

        jLabel2.setText("You can quickly create new type of event with textbox below.");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbEventType)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                            .addComponent(tfNewEventType, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(btnAddEventType, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGap(61, 61, 61))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                            .addComponent(cbbEventType, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(lbEventFilter)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(tfEventFilter))
                        .addComponent(jLabel2)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(lbEventType)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbbEventType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lbEventFilter)
                    .addComponent(tfEventFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tfNewEventType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAddEventType))
                .addContainerGap(18, Short.MAX_VALUE))
        );

        jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnAddEventType, cbbEventType, tfEventFilter, tfNewEventType});

        lbName.setText("Name");

        tfName.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                tfNameFocusGained(evt);
            }
        });
        tfName.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfNameKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbTime)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lbDescription)
                                            .addComponent(lbName))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(spDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(tfName, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbVenue)
                                    .addComponent(lbFee)
                                    .addComponent(jLabel1))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(tfTime, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(calDate, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(tfVenue, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(tfFee, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(107, 107, 107))))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(63, 63, 63)
                        .addComponent(btnAddEvent, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnQuit, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {tfFee, tfTime, tfVenue});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tfName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lbName))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(spDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addComponent(lbDescription)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(calDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbTime)
                    .addComponent(tfTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbVenue)
                    .addComponent(tfVenue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tfFee, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lbFee))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnQuit, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnAddEvent, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {tfFee, tfName, tfTime, tfVenue});

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnQuitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuitActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_btnQuitActionPerformed

    private void btnAddEventActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddEventActionPerformed
        // TODO add your handling code here:
        if (validateAllForm().isEmpty()){
            addEvent();
        } else{
            Validator.showErrors(validateAllForm());
        }
       
    }//GEN-LAST:event_btnAddEventActionPerformed

    private void btnAddEventTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddEventTypeActionPerformed
        addEventType();
       
    }//GEN-LAST:event_btnAddEventTypeActionPerformed

    private void taDescriptionKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_taDescriptionKeyReleased
        // TODO add your handling code here:
        //Validator.Validate(taDescription, Validator.checkIsNotEmpty(taDescription.getText()));
    }//GEN-LAST:event_taDescriptionKeyReleased

    private void tfTimeKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfTimeKeyReleased
        // TODO add your handling code here:
        Validator.Validate(tfTime, Validator.checkFloat(tfTime.getText()));
    }//GEN-LAST:event_tfTimeKeyReleased

    private void tfVenueKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfVenueKeyReleased
        // TODO add your handling code here:
        Validator.Validate(tfVenue, Validator.checkIsNotEmpty(tfVenue.getText()));
    }//GEN-LAST:event_tfVenueKeyReleased

    private void tfFeeKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfFeeKeyReleased
        // TODO add your handling code here:
        Validator.Validate(tfFee, Validator.checkPositiveDouble(tfFee.getText()));
    }//GEN-LAST:event_tfFeeKeyReleased

    private void tfEventFilterKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfEventFilterKeyReleased
        // TODO add your handling code here:
        filterEventType();
               
    }//GEN-LAST:event_tfEventFilterKeyReleased

    private void tfNameKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfNameKeyReleased
        // TODO add your handling code here:
        Validator.Validate(tfName, Validator.checkIsNotEmpty(tfName.getText()));
    }//GEN-LAST:event_tfNameKeyReleased

    private void tfNameFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tfNameFocusGained
        // TODO add your handling code here:
        tfName.selectAll();
    }//GEN-LAST:event_tfNameFocusGained

    private void taDescriptionFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_taDescriptionFocusGained
        // TODO add your handling code here:
        taDescription.selectAll();
    }//GEN-LAST:event_taDescriptionFocusGained

    private void tfTimeFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tfTimeFocusGained
        // TODO add your handling code here:
        tfTime.selectAll();
    }//GEN-LAST:event_tfTimeFocusGained

    private void tfVenueFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tfVenueFocusGained
        // TODO add your handling code here:
        tfVenue.selectAll();
    }//GEN-LAST:event_tfVenueFocusGained

    private void tfFeeFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tfFeeFocusGained
        // TODO add your handling code here:
        tfFee.selectAll();
    }//GEN-LAST:event_tfFeeFocusGained

    private void tfEventFilterFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tfEventFilterFocusGained
        // TODO add your handling code here:
        tfEventFilter.selectAll();
    }//GEN-LAST:event_tfEventFilterFocusGained

    private void tfNewEventTypeFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_tfNewEventTypeFocusGained
        // TODO add your handling code here:
        tfNewEventType.selectAll();
    }//GEN-LAST:event_tfNewEventTypeFocusGained

    /**
     * @param args the command line arguments
     */
    List<EventTypeBean> eventTypeList;
    DataEvent dataEvent = new DataEvent();
    DataEventType dataType = new DataEventType();
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAddEvent;
    private javax.swing.JButton btnAddEventType;
    private javax.swing.JButton btnQuit;
    private com.toedter.calendar.JDateChooser calDate;
    private javax.swing.JComboBox cbbEventType;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel lbDescription;
    private javax.swing.JLabel lbEventFilter;
    private javax.swing.JLabel lbEventType;
    private javax.swing.JLabel lbFee;
    private javax.swing.JLabel lbName;
    private javax.swing.JLabel lbTime;
    private javax.swing.JLabel lbVenue;
    private javax.swing.JScrollPane spDescription;
    private javax.swing.JTextArea taDescription;
    private javax.swing.JTextField tfEventFilter;
    private javax.swing.JTextField tfFee;
    private javax.swing.JTextField tfName;
    private javax.swing.JTextField tfNewEventType;
    private javax.swing.JTextField tfTime;
    private javax.swing.JTextField tfVenue;
    // End of variables declaration//GEN-END:variables
}
TOP

Related Classes of club.ui.EventEntry

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.