/*
 * %W% %E% Hamza Yasin
 *
 * Copyright (c) 2017-2018 Miranz Technology. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of Miranz
 * technology. You shall not disclose such Confidential Information and 
 * shall use it only in accordance with the terms of the license agreement 
 * you entered into with Miranz.
 *
 */
package gamemarkstudiio.salaryslips;

import gamemarkstudio.update.updatesalaryslips.SalarySlipClass;
/**
 * @version 1.10 25 Aug 2017
 * @author Hamza Yasin
 */
public class SalarySlipDetail extends javax.swing.JDialog {

    /**
     * Creates new form SalarySlipDetail
     * @param parent
     * @param modal
     * @param salarySlip
     */
    public SalarySlipDetail(java.awt.Frame parent, boolean modal, SalarySlipClass salarySlip) {
        super(parent, modal);
        initComponents();
        
        idLabel.setText(salarySlip.getId()+"");
        nameLabel.setText(salarySlip.getName());
        positionLabel.setText(salarySlip.getPost());
        salaryMonthLabel.setText(salarySlip.getMonthName());
        workingDaysLabel.setText(salarySlip.getTotalWorkingDays()+"");
        advanceLabel.setText(salarySlip.getAdvance()+"");
        deductionLabel.setText(salarySlip.getDeduction()+"");
        netSalaryLabel.setText(salarySlip.getNetSalary()+"");
        issueDateLabel.setText(salarySlip.getDate());
        totalAmountLabel.setText(salarySlip.getGross()+"");
    }
    /**
     * 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() {

        jPanel1 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        idLabel = new javax.swing.JLabel();
        nameLabel = new javax.swing.JLabel();
        positionLabel = new javax.swing.JLabel();
        salaryMonthLabel = new javax.swing.JLabel();
        workingDaysLabel = new javax.swing.JLabel();
        advanceLabel = new javax.swing.JLabel();
        deductionLabel = new javax.swing.JLabel();
        netSalaryLabel = new javax.swing.JLabel();
        issueDateLabel = new javax.swing.JLabel();
        totalAmountLabel = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        closeButton = new javax.swing.JButton();

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

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel2.setFont(new java.awt.Font("Sitka Small", 1, 40)); // NOI18N
        jLabel2.setText("HR MANAGEMENT SYSTEM");
        jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 20, -1, -1));

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(0, 102, 204));
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("Auto Generated Salary Details");
        jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 90, 451, -1));

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel4.setText("ID:");
        jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(31, 185, -1, -1));

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel5.setText("Name:");
        jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(31, 230, -1, -1));

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel6.setText("Position:");
        jPanel1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(31, 275, -1, -1));

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel7.setText("Salary Month:");
        jPanel1.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(31, 320, -1, -1));

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel8.setText("Working Days:");
        jPanel1.add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(31, 365, -1, -1));

        jLabel9.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel9.setText("Advance:");
        jPanel1.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(31, 410, -1, -1));

        jLabel10.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel10.setText("Deduction:");
        jPanel1.add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(31, 459, -1, -1));
        jPanel1.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 122, 1019, 30));

        jLabel11.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel11.setText("Net Salary:");
        jPanel1.add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(636, 185, -1, -1));

        jLabel12.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel12.setText("Issue Date:");
        jPanel1.add(jLabel12, new org.netbeans.lib.awtextra.AbsoluteConstraints(636, 230, -1, -1));

        idLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        idLabel.setText("Issue Date:");
        jPanel1.add(idLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 185, -1, -1));

        nameLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        nameLabel.setText("Issue Date:");
        jPanel1.add(nameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 230, -1, -1));

        positionLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        positionLabel.setText("Issue Date:");
        jPanel1.add(positionLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 275, -1, -1));

        salaryMonthLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        salaryMonthLabel.setText("Issue Date:");
        jPanel1.add(salaryMonthLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 320, -1, -1));

        workingDaysLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        workingDaysLabel.setText("Issue Date:");
        jPanel1.add(workingDaysLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 365, -1, -1));

        advanceLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        advanceLabel.setText("Issue Date:");
        jPanel1.add(advanceLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 410, -1, -1));

        deductionLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        deductionLabel.setText("Issue Date:");
        jPanel1.add(deductionLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 459, -1, -1));

        netSalaryLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        netSalaryLabel.setText("Issue Date:");
        jPanel1.add(netSalaryLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 185, -1, -1));

        issueDateLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        issueDateLabel.setText("Issue Date:");
        jPanel1.add(issueDateLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 230, -1, -1));

        totalAmountLabel.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        totalAmountLabel.setForeground(new java.awt.Color(0, 102, 0));
        totalAmountLabel.setText("Rs/10000000");
        jPanel1.add(totalAmountLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 332, -1, -1));

        jLabel23.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel23.setForeground(new java.awt.Color(0, 102, 0));
        jLabel23.setText("Total Amount:");
        jPanel1.add(jLabel23, new org.netbeans.lib.awtextra.AbsoluteConstraints(636, 332, -1, -1));

        closeButton.setBackground(new java.awt.Color(255, 255, 255));
        closeButton.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        closeButton.setText("Close");
        closeButton.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        closeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closeButtonActionPerformed(evt);
            }
        });
        jPanel1.add(closeButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 494, 1019, -1));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(16, Short.MAX_VALUE))
        );

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

    private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
        this.dispose();
    }//GEN-LAST:event_closeButtonActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel advanceLabel;
    private javax.swing.JButton closeButton;
    private javax.swing.JLabel deductionLabel;
    private javax.swing.JLabel idLabel;
    private javax.swing.JLabel issueDateLabel;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JLabel nameLabel;
    private javax.swing.JLabel netSalaryLabel;
    private javax.swing.JLabel positionLabel;
    private javax.swing.JLabel salaryMonthLabel;
    private javax.swing.JLabel totalAmountLabel;
    private javax.swing.JLabel workingDaysLabel;
    // End of variables declaration//GEN-END:variables
}
