Example #1
0
 public Widget render(HTMLTable table, Object value, int row, int column) {
   if (value != null && ((Boolean) value)) {
     table.setWidget(row, column, createTrueWidget());
   } else {
     table.setWidget(row, column, createFalseWidget());
   }
   return null;
 }
Example #2
0
 private HTMLTable getTermTable(ArrayList<TermObject> list) {
   HTMLTable table = new Grid(list.size(), 1);
   ArrayList<TermObject> prefList = new ArrayList<TermObject>();
   ArrayList<TermObject> otherList = new ArrayList<TermObject>();
   for (int i = 0; i < list.size(); i++) {
     TermObject tObj = (TermObject) list.get(i);
     if (tObj.isMainLabel()) prefList.add(tObj);
     else otherList.add(tObj);
   }
   for (int i = 0; i < prefList.size(); i++) {
     TermObject tObj = (TermObject) prefList.get(i);
     table.setWidget(i, 0, getFunctionButton(tObj));
   }
   for (int i = 0; i < otherList.size(); i++) {
     TermObject tObj = (TermObject) otherList.get(i);
     table.setWidget(prefList.size() + i, 0, getFunctionButton(tObj));
   }
   table.setWidth("100%");
   return table;
 }