示例#1
0
    @Override
    public FormattedFuture set(int index, FormattedFuture value) {
      FormattedFuture obsolete = get(index);

      source.set(index, value.getMatch().getValue());

      return obsolete;
    }
示例#2
0
    public void refresh() {
      updates.beginEvent(true);

      for (int i = 0; i < size(); i++) {
        FormattedFuture obsolete = futures.get(i);
        FormattedFuture future =
            new FormattedFuture(
                obsolete.getMatch(), getFormatter(obsolete.getMatch()), getMatchContext());

        // replace and cancel old future
        cancel(futures.set(i, future));

        // submit new future
        submit(future);

        updates.elementUpdated(i, obsolete, future);
      }

      updates.commitEvent();
    }
示例#3
0
 @Override
 public void add(int index, FormattedFuture value) {
   source.add(index, value.getMatch().getValue());
 }