コード例 #1
0
ファイル: CurrentCriteria.java プロジェクト: juriad/artique
  /**
   * Sets a new {@link ListFilter} to be shown.
   *
   * @param listFilter new {@link ListFilter}
   */
  public void setListFilter(ListFilter listFilter) {
    if (listFilter == null) {
      listFilter = new ListFilter();
    }

    ListFiltersConstants constants = I18n.getListFiltersConstants();

    ReadState read = ReadState.get(listFilter.getRead());
    readState.setText(constants.getString("readState_" + read.name()));

    Date fromDate = listFilter.getStartFrom();
    if (fromDate != null) {
      fromLabel.setVisible(true);
      from.setVisible(true);
      from.setValue(fromDate);
    } else {
      fromLabel.setVisible(false);
      from.setVisible(false);
    }

    Date toDate = listFilter.getEndTo();
    if (toDate != null) {
      toLabel.setVisible(true);
      to.setVisible(true);
      to.setValue(toDate);
    } else {
      toLabel.setVisible(false);
      to.setVisible(false);
    }

    ListFilterOrder order = listFilter.getOrder();
    if (order == null) {
      order = ListFilterOrder.getDefault();
    }

    ordered.setText(constants.getString("listFilterOrder_" + order.name()));
  }
コード例 #2
0
 @Override
 public void setLastLearned(Date date) {
   lastupdate.setValue(date);
 }