Esempio n. 1
0
 /**
  * A table row where each cell represents a different table. Cells from this row may span multiple
  * columns of rows below.
  */
 ImmutableList<UITableCell> tableRow() {
   List<UITableCell> out = Lists.newArrayList();
   for (DBTable table : results.tables) {
     int width = 0;
     for (DBColumn c : results.columns) {
       if (table.equals(c.table)) {
         width++;
       }
     }
     out.add(detail(nameCell(table), width));
   }
   return ImmutableList.copyOf(out);
 }
 String tablesOn(DatabasesPage page, Database database) {
   StringBuilder out = new StringBuilder();
   int i = 0;
   for (DBTable table : page.tables.get(database)) {
     out.append(table.linkTo() + " ");
     i++;
     if (i > 20) {
       out.append("...");
       return out.toString();
     }
   }
   return out.toString();
 }
Esempio n. 3
0
 /** Return a string to go in a table name cell. */
 String nameCell(DBTable table) {
   log.args(table);
   Label text = Label.of(table.name);
   URIObject target = table.linkTo().getTarget();
   return "Table : " + Link.textTarget(text, target).toString();
 }