You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AdressbuchView.java 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package prfourgui.View;
  7. /**
  8. *
  9. * @author baumannan68085
  10. */
  11. public class AdressbuchView extends javax.swing.JFrame
  12. {
  13. /**
  14. * Creates new form AdressbuchView
  15. */
  16. public AdressbuchView()
  17. {
  18. initComponents();
  19. }
  20. /**
  21. * This method is called from within the constructor to initialize the form.
  22. * WARNING: Do NOT modify this code. The content of this method is always
  23. * regenerated by the Form Editor.
  24. */
  25. @SuppressWarnings("unchecked")
  26. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  27. private void initComponents()
  28. {
  29. jFileChooser1 = new javax.swing.JFileChooser();
  30. toolBar = new javax.swing.JToolBar();
  31. toolAdd = new javax.swing.JButton();
  32. toolRemove = new javax.swing.JButton();
  33. adressTable2 = new prfourgui.View.AdressTable();
  34. pnStatus = new javax.swing.JScrollPane();
  35. txtStatus = new javax.swing.JTextArea();
  36. mnuMain = new javax.swing.JMenuBar();
  37. mnuDatei = new javax.swing.JMenu();
  38. mnuOpen = new javax.swing.JMenuItem();
  39. mnuSave = new javax.swing.JMenuItem();
  40. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  41. toolBar.setRollover(true);
  42. toolAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/prfourgui/Icons/New24.gif"))); // NOI18N
  43. toolAdd.setMnemonic('A');
  44. toolAdd.setToolTipText("Add Address");
  45. toolAdd.setFocusable(false);
  46. toolAdd.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  47. toolAdd.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  48. toolBar.add(toolAdd);
  49. toolRemove.setIcon(new javax.swing.ImageIcon(getClass().getResource("/prfourgui/Icons/Delete24.gif"))); // NOI18N
  50. toolRemove.setMnemonic('R');
  51. toolRemove.setToolTipText("Remove Address");
  52. toolRemove.setFocusable(false);
  53. toolRemove.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  54. toolRemove.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  55. toolBar.add(toolRemove);
  56. getContentPane().add(toolBar, java.awt.BorderLayout.NORTH);
  57. getContentPane().add(adressTable2, java.awt.BorderLayout.CENTER);
  58. txtStatus.setColumns(20);
  59. txtStatus.setRows(5);
  60. pnStatus.setViewportView(txtStatus);
  61. getContentPane().add(pnStatus, java.awt.BorderLayout.PAGE_END);
  62. mnuDatei.setMnemonic('D');
  63. mnuDatei.setText("Datei");
  64. mnuOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
  65. mnuOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/prfourgui/Icons/Open24.gif"))); // NOI18N
  66. mnuOpen.setMnemonic('O');
  67. mnuOpen.setText("Open");
  68. mnuOpen.addActionListener(new java.awt.event.ActionListener()
  69. {
  70. public void actionPerformed(java.awt.event.ActionEvent evt)
  71. {
  72. mnuOpenActionPerformed(evt);
  73. }
  74. });
  75. mnuDatei.add(mnuOpen);
  76. mnuSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
  77. mnuSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/prfourgui/Icons/Save24.gif"))); // NOI18N
  78. mnuSave.setMnemonic('S');
  79. mnuSave.setText("Save");
  80. mnuSave.setToolTipText("");
  81. mnuDatei.add(mnuSave);
  82. mnuMain.add(mnuDatei);
  83. setJMenuBar(mnuMain);
  84. pack();
  85. }// </editor-fold>//GEN-END:initComponents
  86. private void mnuOpenActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_mnuOpenActionPerformed
  87. {//GEN-HEADEREND:event_mnuOpenActionPerformed
  88. // TODO add your handling code here:
  89. }//GEN-LAST:event_mnuOpenActionPerformed
  90. /**
  91. * @param args the command line arguments
  92. */
  93. public static void main(String args[])
  94. {
  95. /* Set the Nimbus look and feel */
  96. //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  97. /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  98. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  99. */
  100. try
  101. {
  102. for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
  103. {
  104. if ("Nimbus".equals(info.getName()))
  105. {
  106. javax.swing.UIManager.setLookAndFeel(info.getClassName());
  107. break;
  108. }
  109. }
  110. }
  111. catch (ClassNotFoundException ex)
  112. {
  113. java.util.logging.Logger.getLogger(AdressbuchView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  114. }
  115. catch (InstantiationException ex)
  116. {
  117. java.util.logging.Logger.getLogger(AdressbuchView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  118. }
  119. catch (IllegalAccessException ex)
  120. {
  121. java.util.logging.Logger.getLogger(AdressbuchView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  122. }
  123. catch (javax.swing.UnsupportedLookAndFeelException ex)
  124. {
  125. java.util.logging.Logger.getLogger(AdressbuchView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  126. }
  127. //</editor-fold>
  128. /* Create and display the form */
  129. java.awt.EventQueue.invokeLater(new Runnable()
  130. {
  131. public void run()
  132. {
  133. new AdressbuchView().setVisible(true);
  134. }
  135. });
  136. }
  137. // Variables declaration - do not modify//GEN-BEGIN:variables
  138. private prfourgui.View.AdressTable adressTable2;
  139. private javax.swing.JFileChooser jFileChooser1;
  140. private javax.swing.JMenu mnuDatei;
  141. private javax.swing.JMenuBar mnuMain;
  142. private javax.swing.JMenuItem mnuOpen;
  143. private javax.swing.JMenuItem mnuSave;
  144. private javax.swing.JScrollPane pnStatus;
  145. private javax.swing.JButton toolAdd;
  146. private javax.swing.JToolBar toolBar;
  147. private javax.swing.JButton toolRemove;
  148. private javax.swing.JTextArea txtStatus;
  149. // End of variables declaration//GEN-END:variables
  150. /**
  151. * @return the mnuOpen
  152. */
  153. public javax.swing.JMenuItem getMnuOpen()
  154. {
  155. return mnuOpen;
  156. }
  157. /**
  158. * @return the mnuSave
  159. */
  160. public javax.swing.JMenuItem getMnuSave()
  161. {
  162. return mnuSave;
  163. }
  164. /**
  165. * @return the toolAdd
  166. */
  167. public javax.swing.JButton getToolAdd()
  168. {
  169. return toolAdd;
  170. }
  171. /**
  172. * @return the toolRemove
  173. */
  174. public javax.swing.JButton getToolRemove()
  175. {
  176. return toolRemove;
  177. }
  178. /**
  179. * @return the jFileChooser1
  180. */
  181. public javax.swing.JFileChooser getjFileChooser1()
  182. {
  183. return jFileChooser1;
  184. }
  185. /**
  186. * @return the txtStatus
  187. */
  188. public javax.swing.JTextArea getTxtStatus()
  189. {
  190. return txtStatus;
  191. }
  192. /**
  193. * @param txtStatus the txtStatus to set
  194. */
  195. public void setTxtStatus(javax.swing.JTextArea txtStatus)
  196. {
  197. this.txtStatus = txtStatus;
  198. }
  199. }