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.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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 ChatProgramm.view;
  6. /**
  7. *
  8. * @author le
  9. */
  10. public class GrafikFrame extends javax.swing.JFrame
  11. {
  12. /**
  13. * @return the gvZeichenflaeche
  14. */
  15. public ChatProgramm.view.GrafikView getGvZeichenflaeche()
  16. {
  17. return gvZeichenflaeche;
  18. }
  19. /**
  20. * @return the FcFileChooser
  21. */
  22. public javax.swing.JFileChooser getFcFileChooser()
  23. {
  24. return FcFileChooser;
  25. }
  26. /**
  27. * @return the btnFileOpen
  28. */
  29. public javax.swing.JButton getBtnFileOpen()
  30. {
  31. return btnFileOpen;
  32. }
  33. /**
  34. * @return the btnFileSave
  35. */
  36. public javax.swing.JButton getBtnFileSave()
  37. {
  38. return btnFileSave;
  39. }
  40. /**
  41. * @return the gZeichenflaeche
  42. */
  43. /**
  44. * Creates new form GrafikFrame
  45. */
  46. public GrafikFrame()
  47. {
  48. initComponents();
  49. }
  50. /**
  51. * This method is called from within the constructor to initialize the form.
  52. * WARNING: Do NOT modify this code. The content of this method is always
  53. * regenerated by the Form Editor.
  54. */
  55. @SuppressWarnings("unchecked")
  56. // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  57. private void initComponents()
  58. {
  59. FcFileChooser = new javax.swing.JFileChooser();
  60. jToolBar1 = new javax.swing.JToolBar();
  61. btnFileOpen = new javax.swing.JButton();
  62. btnFileSave = new javax.swing.JButton();
  63. btnPrint = new javax.swing.JButton();
  64. gvZeichenflaeche = new ChatProgramm.view.GrafikView();
  65. setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  66. jToolBar1.setRollover(true);
  67. btnFileOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mvcgrafik/view/Open24.gif"))); // NOI18N
  68. btnFileOpen.setToolTipText("Open File");
  69. btnFileOpen.setFocusable(false);
  70. btnFileOpen.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  71. btnFileOpen.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  72. jToolBar1.add(btnFileOpen);
  73. btnFileSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mvcgrafik/view/Save24.gif"))); // NOI18N
  74. btnFileSave.setToolTipText("Safe File");
  75. btnFileSave.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  76. btnFileSave.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  77. jToolBar1.add(btnFileSave);
  78. btnPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mvcgrafik/view/Print24.gif"))); // NOI18N
  79. btnPrint.setToolTipText("Print File");
  80. btnPrint.setFocusable(false);
  81. btnPrint.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  82. btnPrint.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  83. jToolBar1.add(btnPrint);
  84. getContentPane().add(jToolBar1, java.awt.BorderLayout.PAGE_START);
  85. getContentPane().add(gvZeichenflaeche, java.awt.BorderLayout.CENTER);
  86. setSize(new java.awt.Dimension(540, 412));
  87. setLocationRelativeTo(null);
  88. }// </editor-fold>//GEN-END:initComponents
  89. /**
  90. * @param args the command line arguments
  91. */
  92. public static void main(String args[])
  93. {
  94. /* Set the Nimbus look and feel */
  95. //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  96. /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  97. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  98. */
  99. try
  100. {
  101. for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
  102. {
  103. if ("Nimbus".equals(info.getName()))
  104. {
  105. javax.swing.UIManager.setLookAndFeel(info.getClassName());
  106. break;
  107. }
  108. }
  109. }
  110. catch (ClassNotFoundException ex)
  111. {
  112. java.util.logging.Logger.getLogger(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  113. }
  114. catch (InstantiationException ex)
  115. {
  116. java.util.logging.Logger.getLogger(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  117. }
  118. catch (IllegalAccessException ex)
  119. {
  120. java.util.logging.Logger.getLogger(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  121. }
  122. catch (javax.swing.UnsupportedLookAndFeelException ex)
  123. {
  124. java.util.logging.Logger.getLogger(GrafikFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  125. }
  126. //</editor-fold>
  127. //</editor-fold>
  128. /* Create and display the form */
  129. java.awt.EventQueue.invokeLater(new Runnable()
  130. {
  131. public void run()
  132. {
  133. new GrafikFrame().setVisible(true);
  134. }
  135. });
  136. }
  137. // Variables declaration - do not modify//GEN-BEGIN:variables
  138. private javax.swing.JFileChooser FcFileChooser;
  139. private javax.swing.JButton btnFileOpen;
  140. private javax.swing.JButton btnFileSave;
  141. private javax.swing.JButton btnPrint;
  142. private ChatProgramm.view.GrafikView gvZeichenflaeche;
  143. private javax.swing.JToolBar jToolBar1;
  144. // End of variables declaration//GEN-END:variables
  145. /**
  146. * @return the btnPrint
  147. */
  148. public javax.swing.JButton getBtnPrint() {
  149. return btnPrint;
  150. }
  151. }