本文整理了Java中javafx.beans.property.Property.removeListener()
方法的一些代码示例,展示了Property.removeListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.removeListener()
方法的具体详情如下:
包路径:javafx.beans.property.Property
类名称:Property
方法名:removeListener
暂无
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.core
@Override
public void dispose() {
property.removeListener(l);
}
};
代码示例来源:origin: com.speedment.tool/tool-config
@Override
public void removeListener(InvalidationListener listener) {
wrapped.removeListener(listener);
}
代码示例来源:origin: com.speedment.tool/tool-config
@Override
public void removeListener(ChangeListener<? super Number> listener) {
wrapped.removeListener(listener);
}
代码示例来源:origin: org.codehaus.griffon/griffon-javafx
@Override
public void removeListener(InvalidationListener listener) {
delegate.removeListener(listener);
}
代码示例来源:origin: org.graniteds/granite-client-javafx
public P beforeChange(T oldSource) {
P oldValue = targetProperty != null ? targetProperty.getValue() : null;
if (targetProperty != null) {
targetProperty.removeListener(targetChangeListener);
targetProperty.removeListener(targetInvalidationListener);
}
return oldValue;
}
代码示例来源:origin: com.dlsc.formsfx/formsfx-core
/**
* Unbinds the given property with the field.
*
* @param binding
* The property to be unbound with.
*
* @return Returns the current field to allow for chaining.
*/
public F unbind(P binding) {
persistentValue.unbindBidirectional(binding);
binding.removeListener(externalBindingListener);
return (F) this;
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.code.editor.fx
private <T> void installListener(Property<T> property, ChangeListener<? super T> listener) {
property.addListener(listener);
toDispose.add(() -> property.removeListener(listener));
}
代码示例来源:origin: org.codehaus.griffon/griffon-javafx
@Override
public void removeListener(ChangeListener<? super T> listener) {
if (listener instanceof UIThreadAware) {
getDelegate().removeListener(listener);
} else {
getDelegate().removeListener(new UIThreadAwareChangeListener<>(listener));
}
}
代码示例来源:origin: org.codehaus.griffon/griffon-javafx
@Override
public void removeListener(InvalidationListener listener) {
if (listener instanceof UIThreadAware) {
getDelegate().removeListener(listener);
} else {
getDelegate().removeListener(new UIThreadAwareInvalidationListener(listener));
}
}
}
代码示例来源:origin: org.fxmisc.easybind/easybind
@Override
public void unsubscribe() {
if(!unsubscribed) {
condition.removeListener((ChangeListener<Boolean>) this);
Property<T> tgt = this.target.get();
if(tgt != null) {
tgt.removeListener(this);
tgt.unbind();
}
unsubscribed = true;
}
}
}
代码示例来源:origin: com.dlsc.formsfx/formsfx-core
/**
* {@inheritDoc}
*/
public void setBindingMode(BindingMode newValue) {
if (BindingMode.CONTINUOUS.equals(newValue)) {
value.addListener(bindingModeListener);
} else {
value.removeListener(bindingModeListener);
}
}
代码示例来源:origin: org.codehaus.griffon.plugins/griffon-glazedlists-javafx
@Override
@SuppressWarnings("unchecked")
public void uninstallListener(T element, EventListener listener) {
if (listener instanceof ChangeListener) {
ChangeListener cl = (ChangeListener) listener;
for (Property<?> property : element.properties()) {
if (matches(property.getName())) {
property.removeListener(cl);
}
}
}
}
代码示例来源:origin: com.cedarsoft.commons/javafx
/**
* Unbinds everything
*/
public void unbind() {
property.removeListener(text2fieldListener);
textField.focusedProperty().removeListener(focusLostListener);
textField.onKeyPressedProperty().setValue(null);
}
代码示例来源:origin: no.tornado/tornadofx-controls
private void monitorChanges() {
properties.addListener((ListChangeListener<Property>) change -> {
while (change.next()) {
if (change.wasAdded()) change.getAddedSubList().forEach(p -> p.addListener(dirtyListener));
if (change.wasRemoved()) change.getRemoved().forEach(p -> p.removeListener(dirtyListener));
}
});
}
代码示例来源:origin: dev.rico/rico-remoting-client-javafx
@Override
public <T> Binding bidirectionalTo(final Property<T> property, BidirectionalConverter<T, Number> converter) {
final Binding unidirectionalBinding = to(property, converter);
final ChangeListener<Number> listener = (obs, oldVal, newVal) -> property.set(converter.convertBack(newVal));
javaFxProperty.addListener(listener);
return () -> {
javaFxProperty.removeListener(listener);
unidirectionalBinding.unbind();
};
}
代码示例来源:origin: com.canoo.dolphin-platform/dolphin-platform-client-javafx
@Override
public <T> Binding bidirectionalTo(final Property<T> property, BidirectionalConverter<T, S> converter) {
final Binding unidirectionalBinding = to(property, converter);
final ChangeListener<S> listener = (obs, oldVal, newVal) -> property.set(converter.convertBack(newVal));
javaFxProperty.addListener(listener);
return () -> {
javaFxProperty.removeListener(listener);
unidirectionalBinding.unbind();
};
}
代码示例来源:origin: dev.rico/rico-remoting-client-javafx
@Override
public <T> Binding bidirectionalTo(final Property<T> property, final BidirectionalConverter<T, S> converter) {
final Binding unidirectionalBinding = to(property, converter);
final ChangeListener<S> listener = (obs, oldVal, newVal) -> property.set(converter.convertBack(newVal));
javaFxProperty.addListener(listener);
return () -> {
javaFxProperty.removeListener(listener);
unidirectionalBinding.unbind();
};
}
代码示例来源:origin: com.canoo.dolphin-platform/dolphin-platform-client-javafx
@Override
public <T> Binding bidirectionalTo(final Property<T> property, BidirectionalConverter<T, Number> converter) {
final Binding unidirectionalBinding = to(property, converter);
final ChangeListener<Number> listener = (obs, oldVal, newVal) -> property.set(converter.convertBack(newVal));
javaFxProperty.addListener(listener);
return () -> {
javaFxProperty.removeListener(listener);
unidirectionalBinding.unbind();
};
}
代码示例来源:origin: com.canoo.dolphin-platform/dolphin-platform-client-javafx
@Override
public <T> Binding bidirectionalToNumeric(Property<T> property, BidirectionalConverter<T, S> converter) {
final Binding unidirectionalBinding = to(property, converter);
final ChangeListener<Number> listener = (obs, oldVal, newVal) -> property.set(converter.convertBack(convertNumber(newVal)));
javaFxProperty.addListener(listener);
return () -> {
javaFxProperty.removeListener(listener);
unidirectionalBinding.unbind();
};
}
}
代码示例来源:origin: dev.rico/rico-remoting-client-javafx
@Override
public <T> Binding bidirectionalToNumeric(final Property<T> property, final BidirectionalConverter<T, S> converter) {
final Binding unidirectionalBinding = to(property, converter);
final ChangeListener<Number> listener = (obs, oldVal, newVal) -> property.set(converter.convertBack(convertNumber(newVal)));
javaFxProperty.addListener(listener);
return () -> {
javaFxProperty.removeListener(listener);
unidirectionalBinding.unbind();
};
}
}
内容来源于网络,如有侵权,请联系作者删除!