123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- /*
- * 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 mvcgrafik.view;
-
- /**
- *
- * @author hd
- */
- public class GrafikMenuView extends javax.swing.JFrame
- {
-
- /**
- * Creates new form GrafikMenuView
- */
- public GrafikMenuView()
- {
- 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();
- jPanel1 = new javax.swing.JPanel();
- grafikView1 = new mvcgrafik.view.GrafikView();
- jMenuBar1 = new javax.swing.JMenuBar();
- jMenu1 = new javax.swing.JMenu();
- btnOpen = new javax.swing.JMenuItem();
- btnSafe = new javax.swing.JMenuItem();
- jMenu2 = new javax.swing.JMenu();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-
- javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
- jPanel1.setLayout(jPanel1Layout);
- jPanel1Layout.setHorizontalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(grafikView1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
- );
- jPanel1Layout.setVerticalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(grafikView1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)
- );
-
- getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
-
- jMenu1.setText("File");
-
- btnOpen.setText("Open");
- btnOpen.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- btnOpenActionPerformed(evt);
- }
- });
- jMenu1.add(btnOpen);
-
- btnSafe.setText("Safe");
- btnSafe.addActionListener(new java.awt.event.ActionListener()
- {
- public void actionPerformed(java.awt.event.ActionEvent evt)
- {
- btnSafeActionPerformed(evt);
- }
- });
- jMenu1.add(btnSafe);
-
- jMenuBar1.add(jMenu1);
-
- jMenu2.setText("Edit");
- jMenuBar1.add(jMenu2);
-
- setJMenuBar(jMenuBar1);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnOpenActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnOpenActionPerformed
- {//GEN-HEADEREND:event_btnOpenActionPerformed
- // TODO add your handling code here:
- }//GEN-LAST:event_btnOpenActionPerformed
-
- private void btnSafeActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSafeActionPerformed
- {//GEN-HEADEREND:event_btnSafeActionPerformed
- // TODO add your handling code here:
- }//GEN-LAST:event_btnSafeActionPerformed
-
- /**
- * @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(GrafikMenuView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- catch (InstantiationException ex)
- {
- java.util.logging.Logger.getLogger(GrafikMenuView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- catch (IllegalAccessException ex)
- {
- java.util.logging.Logger.getLogger(GrafikMenuView.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- }
- catch (javax.swing.UnsupportedLookAndFeelException ex)
- {
- java.util.logging.Logger.getLogger(GrafikMenuView.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 GrafikMenuView().setVisible(true);
- }
- });
- }
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JMenuItem btnOpen;
- private javax.swing.JMenuItem btnSafe;
- private mvcgrafik.view.GrafikView grafikView1;
- private javax.swing.JFileChooser jFileChooser1;
- private javax.swing.JMenu jMenu1;
- private javax.swing.JMenu jMenu2;
- private javax.swing.JMenuBar jMenuBar1;
- private javax.swing.JPanel jPanel1;
- // End of variables declaration//GEN-END:variables
-
- /**
- * @return the grafikView1
- */
- public mvcgrafik.view.GrafikView getGrafikView1()
- {
- return grafikView1;
- }
-
- /**
- * @return the jFileChooser1
- */
- public javax.swing.JFileChooser getjFileChooser1()
- {
- return jFileChooser1;
- }
-
- /**
- * @return the btnOpen
- */
- public javax.swing.JMenuItem getBtnOpen()
- {
- return btnOpen;
- }
-
- /**
- * @return the btnSafe
- */
- public javax.swing.JMenuItem getBtnSafe()
- {
- return btnSafe;
- }
- }
|