本文整理汇总了Java中org.reactfx.collection.LiveList类的典型用法代码示例。如果您正苦于以下问题:Java LiveList类的具体用法?Java LiveList怎么用?Java LiveList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LiveList类属于org.reactfx.collection包,在下文中一共展示了LiveList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Navigator
import org.reactfx.collection.LiveList; //导入依赖的package包/类
public Navigator(
CellListManager<T, C> cellListManager,
CellPositioner<T, C> positioner,
OrientationHelper orientation,
ObjectProperty<Gravity> gravity,
SizeTracker sizeTracker) {
this.cellListManager = cellListManager;
this.cells = cellListManager.getLazyCellList();
this.positioner = positioner;
this.orientation = orientation;
this.gravity = gravity;
this.sizeTracker = sizeTracker;
this.itemsSubscription = LiveList.observeQuasiChanges(cellListManager.getLazyCellList(), this::itemsChanged);
Bindings.bindContent(getChildren(), cellListManager.getNodes());
// When gravity changes, we must redo our layout:
gravity.addListener((prop, oldVal, newVal) -> requestLayout());
}
示例2: Navigator
import org.reactfx.collection.LiveList; //导入依赖的package包/类
public Navigator(CellListManager<C> cellListManager,
CellPositioner<C> positioner, SizeTracker sizeTracker) {
this.cellListManager = cellListManager;
this.cells = cellListManager.getLazyCellList();
this.positioner = positioner;
this.sizeTracker = sizeTracker;
this.itemsSubscription = LiveList.observeQuasiChanges(cellListManager.getLazyCellList(),
this::itemsChanged);
Bindings.bindContent(getChildren(), cellListManager.getNodes());
}
示例3: CellListManager
import org.reactfx.collection.LiveList; //导入依赖的package包/类
public CellListManager(ObservableList<JsonNode> items,
Function<? super JsonNode, ? extends C> cellFactory) {
this.cellPool = new CellPool<>(cellFactory);
this.cells = LiveList.map(items, this::cellForItem)
.memoize();
this.presentCells = cells.memoizedItems();
this.cellNodes = presentCells.map(Cell::getNode);
this.presentCellsSubscription = presentCells.observeQuasiModifications(this::presentCellsChanged);
}
示例4: MarkedLineNumberFactory
import org.reactfx.collection.LiveList; //导入依赖的package包/类
private MarkedLineNumberFactory(StyledTextArea<?, ?> area, IntFunction<String> format) {
this.area = area;
nParagraphs = LiveList.sizeOf(area.getParagraphs());
this.format = format;
lineMarkFactory.set(defaultLineMarkFactory());
graphicsMapperFactory.set(defaultGraphicsMapperFactory());
}
示例5: DiffLineNumberFactory
import org.reactfx.collection.LiveList; //导入依赖的package包/类
private DiffLineNumberFactory(
StyledTextArea<?, ?> area,
IntFunction<String> format,
List<Pair<Integer, Integer>> highlightList) {
nParagraphs = LiveList.sizeOf(area.getParagraphs());
this.format = format;
this.highlightList = highlightList;
}
示例6: CellListManager
import org.reactfx.collection.LiveList; //导入依赖的package包/类
public CellListManager(
ObservableList<T> items,
Function<? super T, ? extends C> cellFactory) {
this.cellPool = new CellPool<>(cellFactory);
this.cells = LiveList.map(items, this::cellForItem).memoize();
this.presentCells = cells.memoizedItems();
this.cellNodes = presentCells.map(Cell::getNode);
this.presentCellsSubscription = presentCells.observeQuasiModifications(this::presentCellsChanged);
}
示例7: simpleChangesOf
import org.reactfx.collection.LiveList; //导入依赖的package包/类
/**
* Use only when the subscriber does not cause {@code list} modification
* of the underlying list.
*/
public static <T> EventStream<ListModification<? extends T>> simpleChangesOf(ObservableList<T> list) {
return new EventStreamBase<ListModification<? extends T>>() {
@Override
protected Subscription observeInputs() {
return LiveList.observeChanges(list, c -> {
for(ListModification<? extends T> mod: c) {
emit(mod);
}
});
}
};
}
示例8: LineNumberFunction
import org.reactfx.collection.LiveList; //导入依赖的package包/类
private LineNumberFunction(StyledTextArea<?, ?> area, IntFunction<String> format) {
paragraphs = LiveList.sizeOf(area.getParagraphs());
this.format = format;
}
示例9: LineNumberGutterFactory
import org.reactfx.collection.LiveList; //导入依赖的package包/类
LineNumberGutterFactory(MarkdownTextArea textArea) {
this.textArea = textArea;
lineCount = LiveList.sizeOf(textArea.getParagraphs());
}
示例10: LineNumberFactory
import org.reactfx.collection.LiveList; //导入依赖的package包/类
private LineNumberFactory(
GenericStyledArea<?, ?, ?> area,
IntFunction<String> format) {
nParagraphs = LiveList.sizeOf(area.getParagraphs());
this.format = format;
}
示例11: getParagraphs
import org.reactfx.collection.LiveList; //导入依赖的package包/类
@Override
public LiveList<Paragraph<PS, SEG, S>> getParagraphs() {
return paragraphs;
}
示例12: getParagraphs
import org.reactfx.collection.LiveList; //导入依赖的package包/类
@Override
LiveList<Paragraph<PS, SEG, S>> getParagraphs();
示例13: listNotifications
import org.reactfx.collection.LiveList; //导入依赖的package包/类
static <E> NotificationAccumulator<LiveList.Observer<? super E, ?>, QuasiListChange<? extends E>, ListModificationSequence<E>> listNotifications() {
return new ListNotifications<>();
}
示例14: getVisibleParagraphs
import org.reactfx.collection.LiveList; //导入依赖的package包/类
/**
* Gets the visible paragraphs, even the ones that are barely displayed.
*/
LiveList<Paragraph<PS, SEG, S>> getVisibleParagraphs();
示例15: wrap
import org.reactfx.collection.LiveList; //导入依赖的package包/类
/**
* Creates an ObservableList wrapper that is able to temporarily block
* list change notifications.
* @param delegate the underlying observable list.
* @deprecated Use {@link LiveList#suspendable(javafx.collections.ObservableList)} instead.
*/
@Deprecated
public static <E> ObservableList<E> wrap(javafx.collections.ObservableList<E> delegate) {
return LiveList.suspendable(delegate);
}