示例#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;
 }
示例#2
0
  public String getColumnName(int columnIndex) {
    if (set != null) {
      return set.getColumnName(columnIndex);
    }

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

    return 0;
  }
示例#4
0
 public Class getColumnClass(int columnIndex) {
   try {
     return set.getTypeClass(columnIndex);
   } catch (Exception e) {
     e.printStackTrace();
   }
   return String.class;
 }
示例#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));
  }