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.

GrafikFrame.java 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /*
  2. * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
  3. * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
  4. */
  5. package mvcgrafik.view;
  6. /**
  7. *
  8. * @author le
  9. */
  10. public class GrafikFrame extends javax.swing.JFrame
  11. {
  12. /**
  13. * @return the gZeichenflaeche
  14. */
  15. public mvcgrafik.view.GrafikView getgZeichenflaeche()
  16. {
  17. return gZeichenflaeche;
  18. }
  19. /**
  20. * Creates new form GrafikFrame
  21. */
  22. public GrafikFrame()
  23. {
  24. initComponents();
  25. }
  26. /**
  27. * This method is called from within the constructor to initialize the form.
  28. * WARNING: Do NOT modify this code. The content of this method is always
  29. * regenerated by the Form Editor.
  30. */
  31. @SuppressWarnings("unchecked")
  32. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  33. private void initComponents() {
  34. gZeichenflaeche = new mvcgrafik.view.GrafikView();
  35. jMenuBar1 = new javax.swing.JMenuBar();
  36. jMenu1 = new javax.swing.JMenu();
  37. miSave = new javax.swing.JMenuItem();
  38. miOpen = new javax.swing.JMenuItem();
  39. jMenu2 = new javax.swing.JMenu();
  40. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  41. gZeichenflaeche.setLayout(new java.awt.BorderLayout());
  42. getContentPane().add(gZeichenflaeche, java.awt.BorderLayout.CENTER);
  43. jMenu1.setText("File");
  44. miSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_DOWN_MASK));
  45. miSave.setText("Speichern");
  46. miSave.addActionListener(new java.awt.event.ActionListener() {
  47. public void actionPerformed(java.awt.event.ActionEvent evt) {
  48. miSaveActionPerformed(evt);
  49. }
  50. });
  51. jMenu1.add(miSave);
  52. miOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_DOWN_MASK));
  53. miOpen.setText("Öffnen");
  54. miOpen.addActionListener(new java.awt.event.ActionListener() {
  55. public void actionPerformed(java.awt.event.ActionEvent evt) {
  56. miOpenActionPerformed(evt);
  57. }
  58. });
  59. jMenu1.add(miOpen);
  60. jMenuBar1.add(jMenu1);
  61. jMenu2.setText("Edit");
  62. jMenuBar1.add(jMenu2);
  63. setJMenuBar(jMenuBar1);
  64. setSize(new java.awt.Dimension(540, 412));
  65. setLocationRelativeTo(null);
  66. }// </editor-fold>//GEN-END:initComponents
  67. private void miSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miSaveActionPerformed
  68. // TODO add your handling code here:
  69. }//GEN-LAST:event_miSaveActionPerformed
  70. private void miOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miOpenActionPerformed
  71. // TODO add your handling code here:
  72. }//GEN-LAST:event_miOpenActionPerformed
  73. /**
  74. * @param args the command line arguments
  75. */
  76. public static void main(String args[])
  77. {
  78. /* Set the Nimbus look and feel */
  79. //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  80. /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  81. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  82. */
  83. try
  84. {
  85. for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
  86. {
  87. if ("Nimbus".equals(info.getName()))
  88. {
  89. javax.swing.UIManager.setLookAndFeel(info.getClassName());
  90. break;
  91. }
  92. }
  93. }
  94. catch (ClassNotFoundException ex)
  95. {
  96. java.util.logging.Logger.getLogger(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  97. }
  98. catch (InstantiationException ex)
  99. {
  100. java.util.logging.Logger.getLogger(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  101. }
  102. catch (IllegalAccessException ex)
  103. {
  104. java.util.logging.Logger.getLogger(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  105. }
  106. catch (javax.swing.UnsupportedLookAndFeelException ex)
  107. {
  108. java.util.logging.Logger.getLogger(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  109. }
  110. //</editor-fold>
  111. /* Create and display the form */
  112. java.awt.EventQueue.invokeLater(new Runnable()
  113. {
  114. public void run()
  115. {
  116. new GrafikFrame().setVisible(true);
  117. }
  118. });
  119. }
  120. // Variables declaration - do not modify//GEN-BEGIN:variables
  121. private mvcgrafik.view.GrafikView gZeichenflaeche;
  122. private javax.swing.JMenu jMenu1;
  123. private javax.swing.JMenu jMenu2;
  124. private javax.swing.JMenuBar jMenuBar1;
  125. private javax.swing.JMenuItem miOpen;
  126. private javax.swing.JMenuItem miSave;
  127. // End of variables declaration//GEN-END:variables
  128. /**
  129. * @return the miOpen
  130. */
  131. public javax.swing.JMenuItem getMiOpen() {
  132. return miOpen;
  133. }
  134. /**
  135. * @return the miSave
  136. */
  137. public javax.swing.JMenuItem getMiSave() {
  138. return miSave;
  139. }
  140. }