Exemplo n.º 1
0
 // <editor-fold defaultstate="collapsed" desc="Render Table">
 public void setModelTable(DefaultTableModel model) {
   if (model == null) {
     DefaultTableModel dtm = (DefaultTableModel) getModel();
     for (int i = 0; i < this.getRowCount(); i++) {
       dtm.removeRow(i);
     }
     renderTable(renderKolom);
     CommonToolkit.setTitleAndWidthColumn(this, null, kolomWidth);
   } else {
     setModel(new DefaultTableModel(new Object[][] {}, new Object[] {}));
     setModel(model);
     renderTable(renderKolom);
     CommonToolkit.setTitleAndWidthColumn(this, null, kolomWidth);
   }
 }
Exemplo n.º 2
0
 public void doit(
     String query,
     HashMap<String, String> render,
     HashMap<String, String> select,
     HashMap<String, String> insert,
     HashMap<String, String> update,
     DefaultTableModel dtm,
     int[] cellWidth,
     boolean diwarnai) {
   this.sql = query;
   this.renderKolom = render;
   this.selectKolom = select;
   this.insertKolom = insert;
   this.updateKolom = update;
   this.kolomWidth = cellWidth;
   this.model = dtm;
   selectTabel(dtm);
   if (cellWidth == null) {
   } else {
     CommonToolkit.setTitleAndWidthColumn(this, null, cellWidth);
   }
   if (diwarnai) {
     CommonToolkit.setCCellRenderer(this);
   }
   Function.setTableSearchAble(this);
 }