package de.nplusc.upidgen;




import de.nplusc.izc.tools.IOtools.fileFormatParsers.ico.BadIcoResException;
import de.nplusc.izc.tools.IOtools.fileFormatParsers.ico.Ico;
import de.nplusc.izc.tools.UiToolz.BootStrap;
import java.io.IOException;
import java.util.HashMap;
import javax.swing.UIManager;
import javax.swing.plaf.IconUIResource;

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

/*
 * Ifatzeh.java
 *
 * Created on 01.12.2011, 18:47:36
 */
/**
 *
 * @author LH
 */
public class Ifatzeh extends javax.swing.JFrame {
        public static Ifatzeh sel;
        public static IfatzehRTR upid;
        public static IfatzehAR arights;
        public static ArightsCatEditor arce;
        public static DependencyManager depman;
        public static ArightsFlagDependencys arightsflag;
        
        
        
        
        
    /** Creates new form Ifatzeh */
    public Ifatzeh() {
        initComponents();
    }

    /** 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()
    {

        VIT1BG = new javax.swing.ButtonGroup();
        NSE1BG = new javax.swing.ButtonGroup();
        NSE2BG = new javax.swing.ButtonGroup();
        ALZRBG = new javax.swing.ButtonGroup();
        ArightsBG = new javax.swing.ButtonGroup();
        NonsellableBG = new javax.swing.ButtonGroup();
        GaveAWayBG = new javax.swing.ButtonGroup();
        MDFYBG = new javax.swing.ButtonGroup();
        btnUPIDs = new javax.swing.JButton();
        btnArights = new javax.swing.JButton();
        bntnArce = new javax.swing.JButton();
        btndepman = new javax.swing.JButton();
        btnFlagDeps = new javax.swing.JButton();
        exit = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        btnUPIDs.setText("UPIDs");
        btnUPIDs.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                btnUPIDsActionPerformed(evt);
            }
        });

        btnArights.setText("Arights");
        btnArights.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                btnArightsActionPerformed(evt);
            }
        });

        bntnArce.setText("Modify Arights-Categories");
        bntnArce.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                bntnArceActionPerformed(evt);
            }
        });

        btndepman.setText("Dependencys");
        btndepman.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                btndepmanActionPerformed(evt);
            }
        });

        btnFlagDeps.setText("Modify Arights-Flagdeps");
        btnFlagDeps.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                btnFlagDepsActionPerformed(evt);
            }
        });

        exit.setText("System.exit(0)");
        exit.addActionListener(new java.awt.event.ActionListener()
        {
            public void actionPerformed(java.awt.event.ActionEvent evt)
            {
                exitActionPerformed(evt);
            }
        });

        jLabel1.setText("Select the dsired Module");

        jButton1.setText("ToBeSet");

        jButton2.setText("ToBeSet");

        jButton3.setText("ToBeSet");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(46, 46, 46)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(btnUPIDs, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnArights, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(bntnArce, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(btndepman, javax.swing.GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE)
                            .addComponent(btnFlagDeps, javax.swing.GroupLayout.DEFAULT_SIZE, 233, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(exit, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnUPIDs, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btndepman, javax.swing.GroupLayout.Alignment.TRAILING, 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, false)
                            .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnFlagDeps, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)
                            .addComponent(btnArights, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(exit, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(bntnArce, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jButton2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

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

    private void btnUPIDsActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnUPIDsActionPerformed
    {//GEN-HEADEREND:event_btnUPIDsActionPerformed
       upid.setVisible(true);
       this.setVisible(false);
    }//GEN-LAST:event_btnUPIDsActionPerformed

    private void btnArightsActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnArightsActionPerformed
    {//GEN-HEADEREND:event_btnArightsActionPerformed
        arights.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_btnArightsActionPerformed

    private void exitActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_exitActionPerformed
    {//GEN-HEADEREND:event_exitActionPerformed
        System.exit(0);
    }//GEN-LAST:event_exitActionPerformed

    private void bntnArceActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_bntnArceActionPerformed
    {//GEN-HEADEREND:event_bntnArceActionPerformed
        arce.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_bntnArceActionPerformed

    private void btndepmanActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btndepmanActionPerformed
    {//GEN-HEADEREND:event_btndepmanActionPerformed
        depman.setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_btndepmanActionPerformed

    private void btnFlagDepsActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnFlagDepsActionPerformed
    {//GEN-HEADEREND:event_btnFlagDepsActionPerformed
       arightsflag.setVisible(true);
       this.setVisible(false);
    }//GEN-LAST:event_btnFlagDepsActionPerformed
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
                                try {
	    UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
	} catch( Exception e ) { 
	    //e.printStackTrace();
	}
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                
                
                sel = new Ifatzeh();
                upid =new IfatzehRTR();
                arights = new IfatzehAR();
                arce = new ArightsCatEditor();
                depman = new DependencyManager();
                arightsflag = new ArightsFlagDependencys();
                try
                {
                    Ico i = new Ico("T:\\icns\\iZtools-others\\upidtk.ico");
                    sel.setIconImages(i.getImages());
                    upid.setIconImages(i.getImages());
                    arights.setIconImages(i.getImages());
                    arce.setIconImages(i.getImages());
                    depman.setIconImages(i.getImages());
                    arightsflag.setIconImages(i.getImages());
                    
                }
                catch (BadIcoResException|IOException ex)
                {

                }
                new BootStrap(sel,true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup ALZRBG;
    private javax.swing.ButtonGroup ArightsBG;
    private javax.swing.ButtonGroup GaveAWayBG;
    private javax.swing.ButtonGroup MDFYBG;
    private javax.swing.ButtonGroup NSE1BG;
    private javax.swing.ButtonGroup NSE2BG;
    private javax.swing.ButtonGroup NonsellableBG;
    private javax.swing.ButtonGroup VIT1BG;
    private javax.swing.JButton bntnArce;
    private javax.swing.JButton btnArights;
    private javax.swing.JButton btnFlagDeps;
    private javax.swing.JButton btnUPIDs;
    private javax.swing.JButton btndepman;
    private javax.swing.JButton exit;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
}
