示例#1
0
  @Override
  protected ZOutputConfiguration changeEntry(
      ZOutputConfiguration t, int columnIndex, Object aValue) {
    if (aValue == null) return null;

    switch (columnIndex) {
      case 0:
        try {
          int n = Integer.valueOf(aValue.toString());
          t.setNumber(n);
          return t;
        } catch (Exception e) {
          e.printStackTrace();
        }
        return null;
      case 1:
        t.setGroup(aValue.toString());
        return t;
      case 2:
        t.setName(aValue.toString());
        return t;
      case 3:
        t.setDescription(aValue.toString());
        return t;
    }
    return null;
  }
示例#2
0
 @Override
 protected Object getValueFor(ZOutputConfiguration obj, int columnIndex) {
   switch (columnIndex) {
     case 0:
       return obj.getNumber() + 1;
     case 1:
       return obj.getGroup();
     case 2:
       return obj.getName();
     case 3:
       return obj.getDescription();
     default:
       return "C" + columnIndex;
   }
 }