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

/*
 * tabulky.java
 *
 * Created on 16.4.2010, 18:52:58
 */

package cz.vutbr.feec.utko.fojtoval.krypto.windows.data;

import cz.vutbr.feec.utko.fojtoval.krypto.windows.NavrhView;
import cz.vutbr.feec.utko.fojtoval.krypto.windows.NavrhViewEvents;
import javax.swing.JButton;
import javax.swing.JTable;

/**
 * Trida pro zobrazeni sifroveho textu do tabulky (o zadanych rozmerech). Pouze GUI, obsluha je v TextDoTabulkyEvents.
 * @author fojtoval
 */
public class TextDoTabulky extends javax.swing.JFrame {

    /**
     *
     */
    public NavrhView navrhV;
    String pFina;
    int x;
    int y;


    /** Vytvori novy formular tabulky.
     * @param navrhH
     * @param pPFina string ktery se rozepise to tabulky
     * @param x  prvni rozmer tabulky
     * @param y  druhy rozmer tabulky
     */
    public TextDoTabulky(NavrhViewEvents navrhH, String pPFina, int x, int y) {

      this.navrhV = navrhH;
      this.pFina = pPFina;
      this.x = x;
      this.y = y;

      initComponents();
   //   delejTab();

    }

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

        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        zamenaSloupcu = new javax.swing.JButton();
        zamenaRadku = new javax.swing.JButton();
        ulozdookna = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("Form"); // NOI18N

        jScrollPane1.setAutoscrolls(true);
        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jTable1.setName("jTable1"); // NOI18N
        jTable1.setRowSelectionAllowed(false);
        jScrollPane1.setViewportView(jTable1);

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(cz.vutbr.feec.utko.fojtoval.krypto.NavrhApp.class).getContext().getResourceMap(TextDoTabulky.class);
        zamenaSloupcu.setText(resourceMap.getString("zamenaSloupcu.text")); // NOI18N
        zamenaSloupcu.setName("zamenaSloupcu"); // NOI18N

        zamenaRadku.setText(resourceMap.getString("zamenaRadku.text")); // NOI18N
        zamenaRadku.setName("zamenaRadku"); // NOI18N

        ulozdookna.setText(resourceMap.getString("ulozdookna.text")); // NOI18N
        ulozdookna.setName("ulozdookna"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(81, Short.MAX_VALUE)
                .addComponent(zamenaSloupcu)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 80, Short.MAX_VALUE)
                .addComponent(zamenaRadku)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 80, Short.MAX_VALUE)
                .addComponent(ulozdookna, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(81, Short.MAX_VALUE))
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 703, Short.MAX_VALUE)
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {ulozdookna, zamenaRadku, zamenaSloupcu});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(zamenaSloupcu)
                    .addComponent(zamenaRadku)
                    .addComponent(ulozdookna, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(22, 22, 22))
        );

        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {ulozdookna, zamenaRadku, zamenaSloupcu});

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

    /**
    * @param args the command line arguments
    */
    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JButton ulozdookna;
    private javax.swing.JButton zamenaRadku;
    private javax.swing.JButton zamenaSloupcu;
    // End of variables declaration//GEN-END:variables

    /**
     *
     * @return
     */
    public JButton getUlozdookna() {
        return ulozdookna;
    }
    // End of variables declaration

    /**
     *
     * @return
     */
    public JTable getjTable1() {
        return jTable1;
    }
    // End of variables declaration

    /**
     *
     * @return
     */
    public JButton getZamenaRadku() {
        return zamenaRadku;
    }

    /**
     *
     * @return
     */
    public JButton getZamenaSloupcu() {
        return zamenaSloupcu;
    }

}
