本文整理汇总了Java中org.reactfx.collection.QuasiListChange类的典型用法代码示例。如果您正苦于以下问题:Java QuasiListChange类的具体用法?Java QuasiListChange怎么用?Java QuasiListChange使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
QuasiListChange类属于org.reactfx.collection包,在下文中一共展示了QuasiListChange类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: itemsChanged
import org.reactfx.collection.QuasiListChange; //导入依赖的package包/类
private void itemsChanged(QuasiListChange<?> ch) {
for (QuasiListModification<?> mod : ch) {
targetPosition = targetPosition.transformByChange(mod.getFrom(),
mod.getRemovedSize(),
mod.getAddedSize());
}
requestLayout(); // TODO: could optimize to only request layout if
// target position changed or cells in the viewport
// are affected
}
示例2: itemsChanged
import org.reactfx.collection.QuasiListChange; //导入依赖的package包/类
private void itemsChanged(QuasiListChange<?> ch) {
for(QuasiListModification<?> mod: ch) {
targetPosition = targetPosition.transformByChange(
mod.getFrom(), mod.getRemovedSize(), mod.getAddedSize());
}
requestLayout(); // TODO: could optimize to only request layout if
// target position changed or cells in the viewport
// are affected
}
示例3: listNotifications
import org.reactfx.collection.QuasiListChange; //导入依赖的package包/类
static <E> NotificationAccumulator<LiveList.Observer<? super E, ?>, QuasiListChange<? extends E>, ListModificationSequence<E>> listNotifications() {
return new ListNotifications<>();
}
示例4: initialAccumulator
import org.reactfx.collection.QuasiListChange; //导入依赖的package包/类
@Override
default ListModificationSequence<E> initialAccumulator(
QuasiListChange<? extends E> value) {
return QuasiListChange.safeCast(value);
}
示例5: reduce
import org.reactfx.collection.QuasiListChange; //导入依赖的package包/类
@Override
default ListChangeAccumulator<E> reduce(
ListModificationSequence<E> accum,
QuasiListChange<? extends E> value) {
return accum.asListChangeAccumulator().add(value);
}