V
- the generic type of the value
.public abstract class AbstractContainerProperty<V> extends AbstractValueProperty<V> implements ReadableContainerProperty<V>
WritableProperty
and ReadableContainerProperty
.Type | Property and Description |
---|---|
ReadableBooleanProperty |
empty |
ReadableIntegerProperty |
size |
AbstractProperty.PropertyBuilder<T extends AbstractProperty<? extends V>>
Modifier and Type | Field and Description |
---|---|
private BooleanProperty |
emptyProperty |
private IntegerProperty |
sizeProperty |
private GenericType<? extends V> |
type |
PROPERTY_TYPE
NO_PROPERTIES
Constructor and Description |
---|
AbstractContainerProperty(String name,
GenericType<? extends V> type,
Bean bean)
The constructor.
|
AbstractContainerProperty(String name,
GenericType<? extends V> type,
Bean bean,
AbstractValidator<? super V> validator)
The constructor.
|
AbstractContainerProperty(String name,
GenericType<? extends V> type,
Bean bean,
Supplier<? extends V> expression)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
ReadableBooleanProperty |
emptyProperty() |
GenericType<? extends V> |
getType() |
protected void |
invalidateProperties()
Invalidates internal properties such as
sizeProperty() and emptyProperty() . |
ReadableIntegerProperty |
sizeProperty() |
bind, bindBidirectional, bindInternal, clearValidationResult, copy, doGetValue, doSetValue, equals, getReadOnly, getValue, hashCode, invalidated, isBound, isReadOnly, isValid, markInvalid, requireWritable, setValue, unbind, unbindBidirectional, validate
assignValueFrom, clone, copy, copy, copy, copy, copy, fireValueChangedEvent, getBean, getJsonUtil, getName, getValidator, isMandatory, toJson, toJson, toString, withValdidator, withValdidator
finalize, getClass, notify, notifyAll, wait, wait, wait
getValueNotNull, isEmpty, size
getBean, getName
addListener, getValue, removeListener
getValue
fromJson, toJson
getReadOnly
public ReadableIntegerProperty sizeProperty
sizeProperty
in interface ReadableContainerProperty<V>
ReadableIntegerProperty
that represents the Collection.size()
property of the
container
.public ReadableBooleanProperty emptyProperty
emptyProperty
in interface ReadableContainerProperty<V>
ReadableBooleanProperty
that represents the empty
property of the container
.private final GenericType<? extends V> type
private IntegerProperty sizeProperty
private BooleanProperty emptyProperty
public AbstractContainerProperty(String name, GenericType<? extends V> type, Bean bean)
name
- - see AbstractProperty.getName()
.type
- - see getType()
.bean
- - see AbstractProperty.getBean()
.public AbstractContainerProperty(String name, GenericType<? extends V> type, Bean bean, AbstractValidator<? super V> validator)
name
- - see AbstractProperty.getName()
.type
- - see getType()
.bean
- - see AbstractProperty.getBean()
.validator
- - see AbstractValueProperty.validate()
.public AbstractContainerProperty(String name, GenericType<? extends V> type, Bean bean, Supplier<? extends V> expression)
name
- - see AbstractProperty.getName()
.type
- - see getType()
.bean
- - see AbstractProperty.getBean()
.expression
- the Supplier
providing
the actual value
.public GenericType<? extends V> getType()
getType
in interface ReadableProperty<V>
value
. Please note that the generic signature of this method
is returning the type GenericType
<? extends V> instead of GenericType
<V> because JavaFx is binding the type Number
for all numeric properties while e.g.
IntegerProperty
should be able to return GenericType
<Integer> what is compatible
with GenericType
<? extends Number>.public ReadableIntegerProperty sizeProperty()
sizeProperty
in interface ReadableContainerProperty<V>
ReadableIntegerProperty
that represents the Collection.size()
property of the
container
.public ReadableBooleanProperty emptyProperty()
emptyProperty
in interface ReadableContainerProperty<V>
ReadableBooleanProperty
that represents the empty
property of the container
.protected void invalidateProperties()
sizeProperty()
and emptyProperty()
.Copyright © 2001–2016 mmm-Team. All rights reserved.