package org.domainmath.gui.debugger; import javax.swing.table.DefaultTableModel; public class BreakPointsPanel extends javax.swing.JPanel { private final BreakPointTableModel model; /** * Creates new form BreakPointsPanel */ public BreakPointsPanel() { model =new BreakPointTableModel(); initComponents(); model.addColumn("File"); model.addColumn("Line"); this.jTable1.setShowGrid(false); } public void addBreakpoint(String file,String line){ Object[] breakPoint ={file,line}; model.addRow(breakPoint); } public void removeBreakpoint(int line){ model.removeRow(line); } public void removeAllBreakpoints(){ } class BreakPointTableModel extends DefaultTableModel{ @Override public boolean isCellEditable(int row,int col){ return false; } } /** * 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() { jScrollPane1 = new javax.swing.JScrollPane(); jTable1.setModel(model); jTable1.setRowHeight(20); jTable1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION); jTable1.getTableHeader().setReorderingAllowed(false); jScrollPane1.setViewportView(jTable1); jTable1.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 255, Short.MAX_VALUE) ); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane jScrollPane1; protected final javax.swing.JTable jTable1 = new javax.swing.JTable(); // End of variables declaration//GEN-END:variables }