java/SuperPostak/src/cz/frantovo/superPostak/ZobrazovacAdres.java
author František Kučera <franta-hg@frantovo.cz>
Sat, 28 Feb 2009 17:57:14 +0100
changeset 3 03d27d3b3f7b
parent 0 e76872ad5226
child 5 bea5d9e11d37
permissions -rw-r--r--
Drobnosti a Substance LaF
     1 package cz.frantovo.superPostak;
     2 
     3 import cz.frantovo.postak.InternetAddressKomu;
     4 import java.util.Collection;
     5 
     6 /**
     7  *
     8  * @author  fiki
     9  */
    10 public class ZobrazovacAdres extends javax.swing.JDialog {
    11 
    12     private static final long serialVersionUID = 5084215476284985170L;
    13 
    14     /** Creates new form ZobrazovacAdres */
    15     public ZobrazovacAdres(java.awt.Frame parent, boolean modal) {
    16         super(parent, modal);
    17         initComponents();
    18         panelAdres.setEditovatelny(false);
    19     }
    20 
    21     public void setAdresy(Collection<InternetAddressKomu> adresy) {
    22         panelAdres.setAdresy(adresy);
    23     }
    24 
    25     /** This method is called from within the constructor to
    26      * initialize the form.
    27      * WARNING: Do NOT modify this code. The content of this method is
    28      * always regenerated by the Form Editor.
    29      */
    30     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    31     private void initComponents() {
    32 
    33         panelAdres = new cz.frantovo.superPostak.PanelPrijemcu();
    34 
    35         setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    36         setTitle("Seznam adres");
    37 
    38         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    39         getContentPane().setLayout(layout);
    40         layout.setHorizontalGroup(
    41             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    42             .addComponent(panelAdres, javax.swing.GroupLayout.DEFAULT_SIZE, 422, Short.MAX_VALUE)
    43         );
    44         layout.setVerticalGroup(
    45             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    46             .addComponent(panelAdres, javax.swing.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE)
    47         );
    48 
    49         pack();
    50     }// </editor-fold>//GEN-END:initComponents
    51 
    52     /**
    53      * @param args the command line arguments
    54      */
    55     public static void main(String args[]) {
    56         java.awt.EventQueue.invokeLater(new Runnable() {
    57 
    58             public void run() {
    59                 ZobrazovacAdres dialog = new ZobrazovacAdres(new javax.swing.JFrame(), true);
    60                 dialog.addWindowListener(new java.awt.event.WindowAdapter() {
    61 
    62                     @Override
    63                     public void windowClosing(java.awt.event.WindowEvent e) {
    64                         System.exit(0);
    65                     }
    66                 });
    67                 dialog.setVisible(true);
    68             }
    69         });
    70     }
    71     // Variables declaration - do not modify//GEN-BEGIN:variables
    72     private cz.frantovo.superPostak.PanelPrijemcu panelAdres;
    73     // End of variables declaration//GEN-END:variables
    74 }