Пример #1
0
 void showMembers(final int parentid) {
   final Criterion levelcriterion =
       new Criterion(MillerTreeView.LEVEL, OperatorId.EQUALS, level);
   final Criterion parentcriterion =
       new Criterion(MillerTreeView.PARENT_ID, OperatorId.EQUALS, parentid);
   levelcriterion.addCriteria(parentcriterion);
   filterData(levelcriterion);
 }
Пример #2
0
 @Override
 public void setDataSource(final DataSource datasource) {
   super.setDataSource(datasource);
   final Criterion levelcriterion =
       new Criterion(MillerTreeView.LEVEL, OperatorId.EQUALS, level);
   if (level != 0) {
     final Criterion parentcriterion =
         new Criterion(MillerTreeView.PARENT_ID, OperatorId.EQUALS, 0);
     levelcriterion.addCriteria(parentcriterion);
   }
   filterData(levelcriterion);
   final ArrayList<ListGridField> newfields = new ArrayList<ListGridField>();
   for (final ListField field : ListField.values()) {
     final ListGridField newfield = new ListGridField(field.toString());
     newfield.setTitle(Integer.toString(level));
     newfield.setAlign(Alignment.LEFT);
     hideField(field.toString());
     newfields.add(newfield);
   }
   setFields(newfields.toArray(new ListGridField[0]));
 }