コード例 #1
0
 public Object getValueAt(int rowIndex, int column) {
   if (rowIndex >= hits.size()) {
     // Feature row
     CDDFeature feature = features.get(rowIndex - hits.size());
     switch (column) {
       case 0:
         return feature.getAccession();
       case 1:
         return feature.getFeatureType() + " feature";
       case 2:
         return feature.getFeatureSite();
       case 3:
         return shown.get(rowIndex);
     }
   } else {
     // Hits row
     CDDHit hit = hits.get(rowIndex);
     switch (column) {
       case 0:
         return "<html>" + NetUtils.makeCDDLink(hit.getName(), hit.getAccession()) + "</html>";
       case 1:
         return hit.getHitType() + " domain";
       case 2:
         return "" + hit.getFrom() + "-" + hit.getTo();
       case 3:
         return shown.get(rowIndex);
     }
   }
   return null;
 }
コード例 #2
0
 public String getURLLink(int rowIndex, int column) {
   if (!hasLink(rowIndex, column)) return null;
   return NetUtils.makeCDDURL(hits.get(rowIndex).getAccession());
 }