コード例 #1
0
  @Override
  public Object getValueAt(int rowIndex, int columnIndex) {
    if (useCases != null && !useCases.isEmpty()) {
      RMNode node = useCases.get(rowIndex).getRmNode();
      RMRecord record = node.getData();

      switch (columnIndex) {
        case FILE_COLUMN_INDEX:
          return record.getLogSource();
        case TIMESTAMP_COLUMN_INDEX:
          return record.getLogTimeStamp();
        case ELAPSEDTIME_COLUMN_INDEX:
          return record.getElapsedTime();
        case TYPE_COLUMN_INDEX:
          return record.getTypeCmp();
        case REQUESTID_COLUMN_INDEX:
          return record.getCurrentCmp().getReqid();
        case DETAILS_COLUMN_INDEX:
          return record.getDetailCmp();
        default:
          return "Invalid column";
      }
    }
    return "No RootCases";
  }
コード例 #2
0
 @Override
 public Class<?> getColumnClass(int columnIndex) {
   if (useCases != null && !useCases.isEmpty()) {
     RMNode node = useCases.get(0).getRmNode();
     RMRecord record = node.getData();
     switch (columnIndex) {
       case FILE_COLUMN_INDEX:
         return String.class;
       case TIMESTAMP_COLUMN_INDEX:
         return record.getLogTimeStamp().getClass();
       case ELAPSEDTIME_COLUMN_INDEX:
         return Long.class;
       case TYPE_COLUMN_INDEX:
         return record.getTypeCmp().getClass();
       case REQUESTID_COLUMN_INDEX:
         return Long.class;
       case DETAILS_COLUMN_INDEX:
         return record.getDetailCmp().getClass();
       default:
         return String.class;
     }
   }
   return String.class;
 }