@Override public void addListener(ChangeListener<? super Number> listener) { delegate.addListener(listener); }
@Override public void addListener(InvalidationListener listener) { delegate.addListener(listener); }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
@Override public void addListener(ChangeListener<? super Number> listener) { if (listener instanceof UIThreadAware) { getDelegate().addListener(listener); } else { getDelegate().addListener(new UIThreadAwareChangeListener<>(listener)); } }
@Override public void addListener(InvalidationListener listener) { if (listener instanceof UIThreadAware) { getDelegate().addListener(listener); } else { getDelegate().addListener(new UIThreadAwareInvalidationListener(listener)); } }
@Override public Subscription registerOnCaretOffsetChanged(Consumer<Integer> listener) { ChangeListener<? super Number> l = (x, o, n) -> { listener.accept(n.intValue()); }; viewer.getTextWidget().caretOffsetProperty().addListener(l); return new Subscription() { @Override public void dispose() { viewer.getTextWidget().caretOffsetProperty().removeListener(l); } }; }
private void bindCaretListener() { this.caretOffset.addListener((x, o, n)-> { int oldCaretLine = getContent().getLineAtOffset(o.intValue()); int newCaretLine = getContent().getLineAtOffset(n.intValue()); RangeSet<Integer> toUpdate = TreeRangeSet.create(); toUpdate.add(Range.closed(Integer.valueOf(oldCaretLine), Integer.valueOf(oldCaretLine))); toUpdate.add(Range.closed(Integer.valueOf(newCaretLine), Integer.valueOf(newCaretLine))); updateNodesNow(toUpdate); }); }
public VFlow(Supplier<N> nodeFactory, BiConsumer<N, Integer> nodePopulator) { this.nodeFactory = nodeFactory; this.nodePopulator = nodePopulator; this.visibleLines.addListener(this::onVisibleLinesChange); this.yOffset.addListener((x)->requestLayout()); this.numberOfLines.addListener(this::onNumberOfLinesChange); }
IntegerProperty property = new SimpleIntegerProperty(); ListView<?> listView = new ListView<?>(); // change property when selection changes: listView.getSelectionModel().selectedIndexProperty().addListener((obs, oldIndex, newIndex) -> property.set(newIndex.intValue())); // change selection when property changes: property.addListener((obs, oldValue, newValue) -> listView.getSelectionModel().clearAndSelect(newValue.intValue()));
@Nonnull public static Label labelInteger(@Nonnull IntegerProperty integerProperty) { Label label = new Label(); minWidth2pref(label); NumberStringConverterForIntegers converter = new NumberStringConverterForIntegers(); integerProperty.addListener((observable, oldValue, newValue) -> label.setText(converter.toString(newValue))); label.setText(converter.toString(integerProperty.get())); return label; }
public VerticalLineFlow(Function<Integer, Set<N>> converter, Predicate<Set<N>> needsPresentation, Supplier<Node> nodeFactory, BiConsumer<Node, Set<N>> nodePopulator) { super(nodeFactory); this.needsPresentation = needsPresentation; this.nodePopulator = nodePopulator; this.converter = converter; this.visibleLines.addListener((InvalidationListener)(x)->prepareNodes(getVisibleLines())); this.numberOfLines.addListener((InvalidationListener)(x)->prepareNodes(getVisibleLines())); }
@Override protected void setupView() { setupCalendarControl(); setCalendarActionListener(); setupCalendarContextMenu(); // bind month and year labels to current values displayedMonth.addListener((observable, oldValue, newValue) -> laDisplayedMonth.setText( // getContext().getResources().getString("st.calview.months." + newValue.intValue()))); laDisplayedYear.textProperty().bind(displayedYear.asString()); // display the current day at startup onToday(null); }
private void install() { this.lineCount.addListener(this::recomputeContentHeight); this.lineHeight.addListener(this::recomputeContentHeight); this.contentHeight.addListener(this::recomputeMax); this.contentAreaHeight.addListener(this::recomputeMax); this.lineHeight.addListener(this::recomputeVisibleLineCount); this.contentAreaHeight.addListener(this::recomputeVisibleLineCount); this.offset.addListener(this::recomputeVisibleLines); this.lineHeight.addListener(this::recomputeVisibleLines); this.visibleLineCount.addListener(this::recomputeVisibleLines); }