package dotaSoundEditor.Controls;

import dotaSoundEditor.Helpers.Utility;
import javax.swing.JDialog;

public class AboutPanel extends javax.swing.JPanel
{

    private JDialog hostingDialog = null;
    private final String VERSION = "v1.2";
    public AboutPanel(JDialog _hostingDialog)
    {        
        this.hostingDialog = _hostingDialog;
        Utility.setFrameIcon(hostingDialog);
        initComponents();
        versionLabel.setText(VERSION);
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents()
    {

        applicationIcon = new javax.swing.JLabel();
        headerLabel = new javax.swing.JLabel();
        versionLabel = new javax.swing.JLabel();
        descriptionLabel = new javax.swing.JLabel();
        createdByLabel = new javax.swing.JLabel();
        contactLabel = new javax.swing.JLabel();
        okayButton = new javax.swing.JButton();

        setPreferredSize(new java.awt.Dimension(370, 275));

        applicationIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/dotaSoundEditor/resources/editorIconSmall.png"))); // NOI18N
        applicationIcon.setText("jLabel1");
        applicationIcon.setMaximumSize(new java.awt.Dimension(50, 50));
        applicationIcon.setMinimumSize(new java.awt.Dimension(50, 50));
        applicationIcon.setName(""); // NOI18N
        applicationIcon.setPreferredSize(new java.awt.Dimension(50, 50));

        headerLabel.setText("<html><h1>Dota 2 Sound Editor</h1></html>");

        versionLabel.setText("versionLabel");

        descriptionLabel.setText("<html>The Dota 2 Sound Editor is freeware and may be<br>reditributed freely, so long as it has not been<br>tampered with.</html>");

        createdByLabel.setText("Created by PingZing");

        contactLabel.setText("Contact: psychozagal@gmail.com");

        okayButton.setText("Okay");
        okayButton.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                okayButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(applicationIcon, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(createdByLabel)
                    .addComponent(versionLabel)
                    .addComponent(headerLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(okayButton)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(contactLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(descriptionLabel, javax.swing.GroupLayout.Alignment.LEADING))))
                .addContainerGap(64, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(applicationIcon, javax.swing.GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE)
                        .addGap(209, 209, 209))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(headerLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(versionLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(descriptionLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(createdByLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(contactLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(okayButton)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void okayButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_okayButtonActionPerformed
    {//GEN-HEADEREND:event_okayButtonActionPerformed
        this.hostingDialog.dispose();
    }//GEN-LAST:event_okayButtonActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel applicationIcon;
    private javax.swing.JLabel contactLabel;
    private javax.swing.JLabel createdByLabel;
    private javax.swing.JLabel descriptionLabel;
    private javax.swing.JLabel headerLabel;
    private javax.swing.JButton okayButton;
    private javax.swing.JLabel versionLabel;
    // End of variables declaration//GEN-END:variables
}

@@ -233,16 +233,18 @@
  = %22v1.2
+.1
 %22;%0A    p

version update