Beispiel #1
0
 public Object getValueAt(int rowIndex, int columnIndex) {
   if (set != null) {
     try {
       set.setRow(offset + rowIndex);
       Object o = set.getObject(columnIndex);
       if (o == null) {
         return "";
       }
       return o.toString();
     } catch (Exception e) {
       e.printStackTrace();
     }
   }
   return null;
 }
Beispiel #2
0
  public String getColumnName(int columnIndex) {
    if (set != null) {
      return set.getColumnName(columnIndex);
    }

    return null;
  }
Beispiel #3
0
  public int getColumnCount() {
    if (set != null) {
      return set.getColumnCount();
    }

    return 0;
  }
Beispiel #4
0
 public Class getColumnClass(int columnIndex) {
   try {
     return set.getTypeClass(columnIndex);
   } catch (Exception e) {
     e.printStackTrace();
   }
   return String.class;
 }
Beispiel #5
0
  public void setResultSet(DiskResultSet rset) throws Exception {
    set = rset;

    max = rset.getRowCount();

    table.setModel(model);
    table.setModel(this);

    offset = 0;
    scrollBar.setValue(0);
    scrollBar.setMaximum((max < window ? 0 : max - window));
  }