123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- /*
- * 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 view;
-
- /**
- *
- * @author endresma66479
- */
- public class ContentTable extends javax.swing.JPanel
- {
- /**
- * @return the jTable
- */
- public javax.swing.JTable getjTable()
- {
- return jTable;
- }
- /**
- * @return the ctmiAdd_popup
- */
- public javax.swing.JMenuItem getCtmiAdd_popup()
- {
- return ctmiAdd_popup;
- }
-
- /**
- * @return the ctmiDelRow_popup
- */
- public javax.swing.JMenuItem getCtmiDelRow_popup()
- {
- return ctmiDelRow_popup;
- }
- /**
- * @return the btnAdd
- */
- public javax.swing.JButton getBtnAdd()
- {
- return btnAdd;
- }
-
- /**
- * @return the btnDel
- */
- public javax.swing.JButton getBtnDel()
- {
- return btnDel;
- }
-
-
- /**
- * Creates new form ContentTable
- */
- public ContentTable()
- {
- 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()
- {
-
- jPopupMenu1 = new javax.swing.JPopupMenu();
- ctmiAdd_popup = new javax.swing.JMenuItem();
- ctmiDelRow_popup = new javax.swing.JMenuItem();
- jScrollPane1 = new javax.swing.JScrollPane();
- jTable = new javax.swing.JTable();
- jToolBar1 = new javax.swing.JToolBar();
- btnAdd = new javax.swing.JButton();
- btnDel = new javax.swing.JButton();
-
- ctmiAdd_popup.setMnemonic('a');
- ctmiAdd_popup.setText("add a line");
- ctmiAdd_popup.setToolTipText("add a line");
- jPopupMenu1.add(ctmiAdd_popup);
-
- ctmiDelRow_popup.setMnemonic('d');
- ctmiDelRow_popup.setText("delete");
- ctmiDelRow_popup.setToolTipText("delete this line");
- jPopupMenu1.add(ctmiDelRow_popup);
-
- setPreferredSize(new java.awt.Dimension(600, 300));
- setLayout(new java.awt.BorderLayout());
-
- jTable.setModel(new javax.swing.table.DefaultTableModel(
- new Object [][]
- {
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null},
- {null, null, null, null, null, null}
- },
- new String []
- {
- "Nachname", "Name", "Strasse, Nr.", "PLZ", "Ort", "Telefonnr."
- }
- ));
- jTable.setComponentPopupMenu(jPopupMenu1);
- jScrollPane1.setViewportView(jTable);
-
- add(jScrollPane1, java.awt.BorderLayout.CENTER);
-
- jToolBar1.setRollover(true);
-
- btnAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/icons/RowInsertAfter24.gif"))); // NOI18N
- btnAdd.setToolTipText("add entry");
- btnAdd.setFocusable(false);
- btnAdd.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnAdd.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- jToolBar1.add(btnAdd);
-
- btnDel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/icons/RowDelete24.gif"))); // NOI18N
- btnDel.setToolTipText("delete entry");
- btnDel.setFocusable(false);
- btnDel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- btnDel.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- jToolBar1.add(btnDel);
-
- add(jToolBar1, java.awt.BorderLayout.PAGE_END);
- }// </editor-fold>//GEN-END:initComponents
-
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnAdd;
- private javax.swing.JButton btnDel;
- private javax.swing.JMenuItem ctmiAdd_popup;
- private javax.swing.JMenuItem ctmiDelRow_popup;
- private javax.swing.JPopupMenu jPopupMenu1;
- private javax.swing.JScrollPane jScrollPane1;
- private javax.swing.JTable jTable;
- private javax.swing.JToolBar jToolBar1;
- // End of variables declaration//GEN-END:variables
- }
|