本文整理了Java中javafx.collections.ObservableList.subList()
方法的一些代码示例,展示了ObservableList.subList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObservableList.subList()
方法的具体详情如下:
包路径:javafx.collections.ObservableList
类名称:ObservableList
方法名:subList
暂无
代码示例来源:origin: org.reactfx/reactfx
@Override
public List<E> subList(int fromIndex, int toIndex) {
return delegate.subList(fromIndex, toIndex);
}
}
代码示例来源:origin: org.codehaus.griffon/griffon-javafx
public List<E> subList(int fromIndex, int toIndex) {
return getDelegate().subList(fromIndex, toIndex);
}
代码示例来源:origin: org.fxmisc.easybind/easybind
/**
* Sync the content of the {@code target} list with the {@code source} list.
* @return a subscription that can be used to stop syncing the lists.
*/
public static <T> Subscription listBind(
List<? super T> target,
ObservableList<? extends T> source) {
target.clear();
target.addAll(source);
ListChangeListener<? super T> listener = change -> {
while(change.next()) {
int from = change.getFrom();
int to = change.getTo();
if(change.wasPermutated()) {
target.subList(from, to).clear();
target.addAll(from, source.subList(from, to));
} else {
target.subList(from, from + change.getRemovedSize()).clear();
target.addAll(from, source.subList(from, from + change.getAddedSize()));
}
}
};
source.addListener(listener);
return () -> source.removeListener(listener);
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
while (change.next()) {
if (change.wasPermutated()) {
List<B> beforePermutate = b.subList(change.getFrom(), change.getTo());
for (int i = 0; i < beforePermutate.size(); i++) {
b.set(change.getPermutation(change.getFrom() + i), beforePermutate.get(i));
List<? extends A> updated = a.subList(change.getFrom(), change.getTo());
List<B> updatedMapped = updated.stream().map(map).collect(Collectors.toList());
for (int i = 0; i < updatedMapped.size(); i++) {
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
if (change.wasPermutated()) {
list.subList(change.getFrom(), change.getTo()).clear();
list.addAll(change.getFrom(), transformList(change.getList().subList(change.getFrom(), change.getTo()), converterFunction));
} else {
if (change.wasRemoved()) {
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
if (change.wasPermutated()) {
target.subList(change.getFrom(), change.getTo()).clear();
target.addAll(change.getFrom(), transformList(change.getList().subList(change.getFrom(), change.getTo()), converterFunction));
} else {
if (change.wasRemoved()) {
内容来源于网络,如有侵权,请联系作者删除!