123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- /*
- * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
- * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
- */
- package mvcgrafik.view;
-
- /**
- *
- * @author le
- */
- public class GrafikFrame extends javax.swing.JFrame
- {
- /**
- * @return the gZeichenflaeche
- */
- public mvcgrafik.view.GrafikView getgZeichenflaeche()
- {
- return gZeichenflaeche;
- }
-
- /**
- * Creates new form GrafikFrame
- */
- public GrafikFrame()
- {
- 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() {
-
- gZeichenflaeche = new mvcgrafik.view.GrafikView();
- jMenuBar1 = new javax.swing.JMenuBar();
- jMenu1 = new javax.swing.JMenu();
- miSave = new javax.swing.JMenuItem();
- miOpen = new javax.swing.JMenuItem();
- jMenu2 = new javax.swing.JMenu();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-
- gZeichenflaeche.setLayout(new java.awt.BorderLayout());
- getContentPane().add(gZeichenflaeche, java.awt.BorderLayout.CENTER);
-
- jMenu1.setText("File");
-
- miSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_DOWN_MASK));
- miSave.setText("Speichern");
- miSave.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- miSaveActionPerformed(evt);
- }
- });
- jMenu1.add(miSave);
-
- miOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_DOWN_MASK));
- miOpen.setText("Öffnen");
- miOpen.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- miOpenActionPerformed(evt);
- }
- });
- jMenu1.add(miOpen);
-
- jMenuBar1.add(jMenu1);
-
- jMenu2.setText("Edit");
- jMenuBar1.add(jMenu2);
-
- setJMenuBar(jMenuBar1);
-
- setSize(new java.awt.Dimension(540, 412));
- setLocationRelativeTo(null);
- }// </editor-fold>//GEN-END:initComponents
-
- private void miSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miSaveActionPerformed
- // TODO add your handling code here:
- }//GEN-LAST:event_miSaveActionPerformed
-
- private void miOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miOpenActionPerformed
- // TODO add your handling code here:
- }//GEN-LAST:event_miOpenActionPerformed
-
- /**
- * @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(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- catch (InstantiationException ex)
- {
- java.util.logging.Logger.getLogger(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- catch (IllegalAccessException ex)
- {
- java.util.logging.Logger.getLogger(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- catch (javax.swing.UnsupportedLookAndFeelException ex)
- {
- java.util.logging.Logger.getLogger(GrafikFrame.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 GrafikFrame().setVisible(true);
- }
- });
- }
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private mvcgrafik.view.GrafikView gZeichenflaeche;
- private javax.swing.JMenu jMenu1;
- private javax.swing.JMenu jMenu2;
- private javax.swing.JMenuBar jMenuBar1;
- private javax.swing.JMenuItem miOpen;
- private javax.swing.JMenuItem miSave;
- // End of variables declaration//GEN-END:variables
-
- /**
- * @return the miOpen
- */
- public javax.swing.JMenuItem getMiOpen() {
- return miOpen;
- }
-
- /**
- * @return the miSave
- */
- public javax.swing.JMenuItem getMiSave() {
- return miSave;
- }
- }
|