|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263 |
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package prfourgui.View;
-
- /**
- *
- * @author baumannan68085
- */
- public class AdressbuchView extends javax.swing.JFrame
- {
-
- /**
- * @return the toolUndo
- */
- public javax.swing.JButton getToolUndo() {
- return toolUndo;
- }
-
- /**
- * @param toolUndo the toolUndo to set
- */
- public void setToolUndo(javax.swing.JButton toolUndo) {
- this.toolUndo = toolUndo;
- }
-
- /**
- * Creates new form AdressbuchView
- */
- public AdressbuchView()
- {
- 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() {
-
- jFileChooser1 = new javax.swing.JFileChooser();
- toolBar = new javax.swing.JToolBar();
- toolAdd = new javax.swing.JButton();
- toolRemove = new javax.swing.JButton();
- toolUndo = new javax.swing.JButton();
- adressTable2 = new prfourgui.View.AdressTable();
- pnStatus = new javax.swing.JScrollPane();
- txtStatus = new javax.swing.JTextArea();
- mnuMain = new javax.swing.JMenuBar();
- mnuDatei = new javax.swing.JMenu();
- mnuOpen = new javax.swing.JMenuItem();
- mnuSave = new javax.swing.JMenuItem();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-
- toolBar.setRollover(true);
-
- toolAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/prfourgui/Icons/New24.gif"))); // NOI18N
- toolAdd.setMnemonic('A');
- toolAdd.setToolTipText("Add Address");
- toolAdd.setFocusable(false);
- toolAdd.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- toolAdd.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- toolBar.add(toolAdd);
-
- toolRemove.setIcon(new javax.swing.ImageIcon(getClass().getResource("/prfourgui/Icons/Delete24.gif"))); // NOI18N
- toolRemove.setMnemonic('R');
- toolRemove.setToolTipText("Remove Address");
- toolRemove.setFocusable(false);
- toolRemove.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- toolRemove.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- toolBar.add(toolRemove);
-
- toolUndo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/prfourgui/Icons/Undo24.gif"))); // NOI18N
- toolUndo.setToolTipText("Undo");
- toolUndo.setFocusable(false);
- toolUndo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- toolUndo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- toolBar.add(toolUndo);
-
- getContentPane().add(toolBar, java.awt.BorderLayout.NORTH);
- getContentPane().add(adressTable2, java.awt.BorderLayout.CENTER);
-
- txtStatus.setColumns(20);
- txtStatus.setRows(5);
- pnStatus.setViewportView(txtStatus);
-
- getContentPane().add(pnStatus, java.awt.BorderLayout.PAGE_END);
-
- mnuDatei.setMnemonic('D');
- mnuDatei.setText("Datei");
-
- mnuOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
- mnuOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/prfourgui/Icons/Open24.gif"))); // NOI18N
- mnuOpen.setMnemonic('O');
- mnuOpen.setText("Open");
- mnuOpen.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- mnuOpenActionPerformed(evt);
- }
- });
- mnuDatei.add(mnuOpen);
-
- mnuSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
- mnuSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/prfourgui/Icons/Save24.gif"))); // NOI18N
- mnuSave.setMnemonic('S');
- mnuSave.setText("Save");
- mnuSave.setToolTipText("");
- mnuDatei.add(mnuSave);
-
- mnuMain.add(mnuDatei);
-
- setJMenuBar(mnuMain);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void mnuOpenActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_mnuOpenActionPerformed
- {//GEN-HEADEREND:event_mnuOpenActionPerformed
- // TODO add your handling code here:
- }//GEN-LAST:event_mnuOpenActionPerformed
-
- /**
- * @param args the command line arguments
- */
- public static void main(String args[])
- {
- /* Set the Nimbus look and feel */
- //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
- /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
- * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
- */
- try
- {
- for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
- {
- if ("Nimbus".equals(info.getName()))
- {
- javax.swing.UIManager.setLookAndFeel(info.getClassName());
- break;
- }
- }
- }
- catch (ClassNotFoundException ex)
- {
- java.util.logging.Logger.getLogger(AdressbuchView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- catch (InstantiationException ex)
- {
- java.util.logging.Logger.getLogger(AdressbuchView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- catch (IllegalAccessException ex)
- {
- java.util.logging.Logger.getLogger(AdressbuchView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- catch (javax.swing.UnsupportedLookAndFeelException ex)
- {
- java.util.logging.Logger.getLogger(AdressbuchView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- //</editor-fold>
-
- /* Create and display the form */
- java.awt.EventQueue.invokeLater(new Runnable()
- {
- public void run()
- {
- new AdressbuchView().setVisible(true);
- }
- });
- }
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private prfourgui.View.AdressTable adressTable2;
- private javax.swing.JFileChooser jFileChooser1;
- private javax.swing.JMenu mnuDatei;
- private javax.swing.JMenuBar mnuMain;
- private javax.swing.JMenuItem mnuOpen;
- private javax.swing.JMenuItem mnuSave;
- private javax.swing.JScrollPane pnStatus;
- private javax.swing.JButton toolAdd;
- private javax.swing.JToolBar toolBar;
- private javax.swing.JButton toolRemove;
- private javax.swing.JButton toolUndo;
- private javax.swing.JTextArea txtStatus;
- // End of variables declaration//GEN-END:variables
-
- /**
- * @return the mnuOpen
- */
- public javax.swing.JMenuItem getMnuOpen()
- {
- return mnuOpen;
- }
-
- /**
- * @return the mnuSave
- */
- public javax.swing.JMenuItem getMnuSave()
- {
- return mnuSave;
- }
-
- /**
- * @return the toolAdd
- */
- public javax.swing.JButton getToolAdd()
- {
- return toolAdd;
- }
-
- /**
- * @return the toolRemove
- */
- public javax.swing.JButton getToolRemove()
- {
- return toolRemove;
- }
-
- /**
- * @return the jFileChooser1
- */
- public javax.swing.JFileChooser getjFileChooser1()
- {
- return jFileChooser1;
- }
-
- /**
- * @return the txtStatus
- */
- public javax.swing.JTextArea getTxtStatus()
- {
- return txtStatus;
- }
-
- /**
- * @param txtStatus the txtStatus to set
- */
- public void setTxtStatus(javax.swing.JTextArea txtStatus)
- {
- this.txtStatus = txtStatus;
- }
-
- /**
- * @return the adressTable2
- */
- public prfourgui.View.AdressTable getAdressTable2()
- {
- return adressTable2;
- }
-
- /**
- * @param adressTable2 the adressTable2 to set
- */
- public void setAdressTable2(prfourgui.View.AdressTable adressTable2)
- {
- this.adressTable2 = adressTable2;
- }
- }
|