本文整理汇总了Java中javafx.beans.property.MapProperty类的典型用法代码示例。如果您正苦于以下问题:Java MapProperty类的具体用法?Java MapProperty怎么用?Java MapProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MapProperty类属于javafx.beans.property包,在下文中一共展示了MapProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitFields
import javafx.beans.property.MapProperty; //导入依赖的package包/类
/**
*
* @param object
* The object which fields should be visited.
* @return {@code true} when the object was a observable object, {@code false} when it was a simple object.
* @throws SecurityException
* If a {@link SecurityManager} is active and denies access to fields via reflection.
* @throws IllegalAccessException
* If access modifiers like {@code private} are enforced even when the model is accessed via reflection.
*/
private boolean visitFields(final Object object) throws IllegalAccessException {
boolean isObservableObject = false;
for (final Field field : getInheritedFields(object.getClass())) {
field.setAccessible(true);
currentField = field;
final Class<?> fieldClass = field.getType();
if (!isObservableObject && classImplementsOrExtends(fieldClass, Property.class)) {
startVisiting(object);
isObservableObject = true;
}
if (classImplementsOrExtends(fieldClass, ListProperty.class)) {
handle((ListProperty<?>) field.get(object));
} else if (classImplementsOrExtends(fieldClass, SetProperty.class)) {
handle((SetProperty<?>) field.get(object));
} else if (classImplementsOrExtends(fieldClass, MapProperty.class)) {
handle((MapProperty<?, ?>) field.get(object));
} else if (classImplementsOrExtends(fieldClass, Property.class)) {
handle((Property<?>) field.get(object));
}
}
return isObservableObject;
}
示例2: propertyValueClass
import javafx.beans.property.MapProperty; //导入依赖的package包/类
/**
* Provides the underlying value class for a given {@link Property}
*
* @param property
* the {@link Property} to check
* @return the value class of the {@link Property}
*/
@SuppressWarnings("unchecked")
protected static <T> Class<T> propertyValueClass(final Property<T> property) {
Class<T> clazz = null;
if (property != null) {
if (StringProperty.class.isAssignableFrom(property.getClass())) {
clazz = (Class<T>) String.class;
} else if (IntegerProperty.class.isAssignableFrom(property
.getClass())) {
clazz = (Class<T>) Integer.class;
} else if (BooleanProperty.class.isAssignableFrom(property
.getClass())) {
clazz = (Class<T>) Boolean.class;
} else if (DoubleProperty.class.isAssignableFrom(property
.getClass())) {
clazz = (Class<T>) Double.class;
} else if (FloatProperty.class
.isAssignableFrom(property.getClass())) {
clazz = (Class<T>) Float.class;
} else if (LongProperty.class.isAssignableFrom(property.getClass())) {
clazz = (Class<T>) Long.class;
} else if (ListProperty.class.isAssignableFrom(property.getClass())) {
clazz = (Class<T>) List.class;
} else if (MapProperty.class.isAssignableFrom(property.getClass())) {
clazz = (Class<T>) Map.class;
} else {
clazz = (Class<T>) Object.class;
}
}
return clazz;
}
示例3: propertyValueClass
import javafx.beans.property.MapProperty; //导入依赖的package包/类
/**
* Provides the underlying value class for a given {@linkplain Property}
*
* @param property
* the {@linkplain Property} to check
* @return the value class of the {@linkplain Property}
*/
@SuppressWarnings("unchecked")
protected static <T> Class<T> propertyValueClass(final Property<T> property) {
Class<T> clazz = null;
if (property != null) {
if (StringProperty.class.isAssignableFrom(property.getClass())) {
clazz = (Class<T>) String.class;
} else if (IntegerProperty.class.isAssignableFrom(property
.getClass())) {
clazz = (Class<T>) Integer.class;
} else if (BooleanProperty.class.isAssignableFrom(property
.getClass())) {
clazz = (Class<T>) Boolean.class;
} else if (DoubleProperty.class.isAssignableFrom(property
.getClass())) {
clazz = (Class<T>) Double.class;
} else if (FloatProperty.class.isAssignableFrom(property
.getClass())) {
clazz = (Class<T>) Float.class;
} else if (LongProperty.class.isAssignableFrom(property
.getClass())) {
clazz = (Class<T>) Long.class;
} else if (ListProperty.class.isAssignableFrom(property
.getClass())) {
clazz = (Class<T>) List.class;
} else if (MapProperty.class.isAssignableFrom(property
.getClass())) {
clazz = (Class<T>) Map.class;
} else {
clazz = (Class<T>) Object.class;
}
}
return clazz;
}
示例4: handle
import javafx.beans.property.MapProperty; //导入依赖的package包/类
private void handle(final MapProperty<?, ?> property) throws IllegalAccessException {
if (visitCollectionProperty(property)) {
for (Entry<?, ?> entry : property.entrySet()) {
visit(entry.getKey());
visit(entry.getValue());
}
}
}
示例5: Parent
import javafx.beans.property.MapProperty; //导入依赖的package包/类
Parent(final Property<?> parentProperty, final ListProperty<?> parentList, final SetProperty<?> parentSet,
final MapProperty<?, ?> parentMap) {
this.parentList = parentList;
this.parentSet = parentSet;
this.parentMap = parentMap;
this.parentProperty = parentProperty;
}
示例6: createProperty
import javafx.beans.property.MapProperty; //导入依赖的package包/类
@NotNull
@Override
protected MapProperty<K, V> createProperty(ObservableMap<K, V> deserializedValue) {
return new SimpleMapProperty<>(deserializedValue);
}
示例7: customizedCommandlineVariablesProperty
import javafx.beans.property.MapProperty; //导入依赖的package包/类
public MapProperty<String, String> customizedCommandlineVariablesProperty() {
return customizedCommandlineVariablesProperty;
}
示例8: yearMonth2DateBeanMapProperty
import javafx.beans.property.MapProperty; //导入依赖的package包/类
public final MapProperty<YearMonth, Collection<DateBean>> yearMonth2DateBeanMapProperty() {
return this.yearMonth2DateBeanMap;
}
示例9: dayToNetEarningsProperty
import javafx.beans.property.MapProperty; //导入依赖的package包/类
public final MapProperty<LocalDate, Number> dayToNetEarningsProperty() {
return this.dayToNetEarnings;
}
示例10: yearMonthToNetEarningsProperty
import javafx.beans.property.MapProperty; //导入依赖的package包/类
public final MapProperty<YearMonth, Number> yearMonthToNetEarningsProperty() {
return this.yearMonthToNetEarnings;
}
示例11: earningsPerOriginProperty
import javafx.beans.property.MapProperty; //导入依赖的package包/类
public final MapProperty<String, Number> earningsPerOriginProperty() {
return this.earningsPerOrigin;
}
示例12: selectionsProperty
import javafx.beans.property.MapProperty; //导入依赖的package包/类
public MapProperty<Variable<Number>, TopsoilDataColumn> selectionsProperty() {
if (selectionsProperty == null) {
selectionsProperty = new SimpleMapProperty<>(FXCollections.observableHashMap());
}
return selectionsProperty;
}
示例13: currentMenuItemsProperty
import javafx.beans.property.MapProperty; //导入依赖的package包/类
public final MapProperty<String, MenuItemModel> currentMenuItemsProperty(){
return this.currentMenuItems;
}
示例14: parameterProperty
import javafx.beans.property.MapProperty; //导入依赖的package包/类
public MapProperty<String, String> parameterProperty() {
return this.parameterProperty;
}
示例15: visitCollectionProperty
import javafx.beans.property.MapProperty; //导入依赖的package包/类
/**
* Visit a field of type {@link MapProperty}.
*
* @param fieldValue
* The value that is bound to the field.
* @return {@code true} if the childs of this property should be visited, {@code false} if not.
*/
protected abstract boolean visitCollectionProperty(MapProperty<?, ?> fieldValue);