Package org.eclipse.core.databinding.observable.list

Examples of org.eclipse.core.databinding.observable.list.ListDiff


        checkForComodification();
        if (lastIndex == -1)
          throw new IllegalStateException();

        iterator.remove(); // stay in sync
        ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(
            lastIndex, false, lastElement));

        updateList(list, diff);

        lastElement = null;
View Full Code Here


    if (oldIndex == newIndex)
      return list.get(oldIndex);

    Object element = list.get(oldIndex);

    ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(
        oldIndex, false, element), Diffs.createListDiffEntry(newIndex,
        true, element));
    updateList(list, diff);

    return element;
View Full Code Here

    int index = list.indexOf(o);
    if (index == -1)
      return false;

    ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(index,
        false, o));
    updateList(list, diff);

    return true;
  }
View Full Code Here

      public void add(Object o) {
        checkRealm();
        checkForComodification();
        int index = iterator.nextIndex();

        ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(
            index, true, o));
        updateList(list, diff);

        iterator.add(o); // keep in sync

        lastElement = null;
        lastIndex = -1;
        expectedModCount = modCount;
      }

      public void set(Object o) {
        checkRealm();
        checkForComodification();

        ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(
            lastIndex, false, lastElement), Diffs
            .createListDiffEntry(lastIndex, true, o));
        updateList(list, diff);

        iterator.set(o);

        lastElement = o;
        expectedModCount = modCount;
      }

      public void remove() {
        checkRealm();
        checkForComodification();
        if (lastIndex == -1)
          throw new IllegalStateException();

        ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(
            lastIndex, false, lastElement));
        updateList(list, diff);

        iterator.remove(); // keep in sync
View Full Code Here

    checkRealm();

    List list = getList();
    Object element = list.get(index);

    ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(index,
        false, element));
    updateList(list, diff);

    return element;
  }
View Full Code Here

    checkRealm();

    List list = getList();
    Object oldElement = list.get(index);

    ListDiff diff = Diffs.createListDiff(Diffs.createListDiffEntry(index,
        false, oldElement), Diffs.createListDiffEntry(index, true, o));
    updateList(list, diff);

    return oldElement;
  }
View Full Code Here

      Object element = it.next();
      entries[offsetIndex] = Diffs.createListDiffEntry(index
          + offsetIndex, true, element);
      offsetIndex++;
    }
    ListDiff diff = Diffs.createListDiff(entries);

    updateList(list, diff);

    return true;
  }
View Full Code Here

    }

    if (entries.isEmpty())
      return false;

    ListDiff diff = Diffs.createListDiff((ListDiffEntry[]) entries
        .toArray(new ListDiffEntry[entries.size()]));
    updateList(list, diff);

    return true;
  }
View Full Code Here

    }

    if (entries.isEmpty())
      return false;

    ListDiff diff = Diffs.createListDiff((ListDiffEntry[]) entries
        .toArray(new ListDiffEntry[entries.size()]));
    updateList(list, diff);

    return true;
  }
View Full Code Here

      // always report 0 as the remove index
      int index = it.previousIndex();
      Object element = it.previous();
      entries.add(Diffs.createListDiffEntry(index, false, element));
    }
    ListDiff diff = Diffs.createListDiff((ListDiffEntry[]) entries
        .toArray(new ListDiffEntry[entries.size()]));

    updateList(list, diff);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.databinding.observable.list.ListDiff

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.