当前位置: 首页>>代码示例>>Java>>正文


Java MapProperty类代码示例

本文整理汇总了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;
}
 
开发者ID:saxsys,项目名称:SynchronizeFX,代码行数:35,代码来源:PropertyVisitor.java

示例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;
}
 
开发者ID:PacktPublishing,项目名称:Java-9-Programming-Blueprints,代码行数:38,代码来源:BeanPathAdapter.java

示例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;
}
 
开发者ID:SaiPradeepDandem,项目名称:javafx-demos,代码行数:41,代码来源:BeanPathAdapter.java

示例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());
        }
    }
}
 
开发者ID:saxsys,项目名称:SynchronizeFX,代码行数:9,代码来源:PropertyVisitor.java

示例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;
}
 
开发者ID:saxsys,项目名称:SynchronizeFX,代码行数:8,代码来源:PropertyVisitor.java

示例6: createProperty

import javafx.beans.property.MapProperty; //导入依赖的package包/类
@NotNull
@Override
protected MapProperty<K, V> createProperty(ObservableMap<K, V> deserializedValue) {
    return new SimpleMapProperty<>(deserializedValue);
}
 
开发者ID:joffrey-bion,项目名称:fx-gson,代码行数:6,代码来源:MapPropertyTypeAdapter.java

示例7: customizedCommandlineVariablesProperty

import javafx.beans.property.MapProperty; //导入依赖的package包/类
public MapProperty<String, String> customizedCommandlineVariablesProperty() {
	return customizedCommandlineVariablesProperty;
}
 
开发者ID:to2mbn,项目名称:LoliXL,代码行数:4,代码来源:SimpleGameConfiguration.java

示例8: yearMonth2DateBeanMapProperty

import javafx.beans.property.MapProperty; //导入依赖的package包/类
public final MapProperty<YearMonth, Collection<DateBean>> yearMonth2DateBeanMapProperty() {
return this.yearMonth2DateBeanMap;
   }
 
开发者ID:DrBookings,项目名称:drbookings,代码行数:4,代码来源:BinYearMonth.java

示例9: dayToNetEarningsProperty

import javafx.beans.property.MapProperty; //导入依赖的package包/类
public final MapProperty<LocalDate, Number> dayToNetEarningsProperty() {
	return this.dayToNetEarnings;
}
 
开发者ID:DrBookings,项目名称:drbookings,代码行数:4,代码来源:MoneyMonitor.java

示例10: yearMonthToNetEarningsProperty

import javafx.beans.property.MapProperty; //导入依赖的package包/类
public final MapProperty<YearMonth, Number> yearMonthToNetEarningsProperty() {
	return this.yearMonthToNetEarnings;
}
 
开发者ID:DrBookings,项目名称:drbookings,代码行数:4,代码来源:MoneyMonitor.java

示例11: earningsPerOriginProperty

import javafx.beans.property.MapProperty; //导入依赖的package包/类
public final MapProperty<String, Number> earningsPerOriginProperty() {
	return this.earningsPerOrigin;
}
 
开发者ID:DrBookings,项目名称:drbookings,代码行数:4,代码来源:DateBean.java

示例12: selectionsProperty

import javafx.beans.property.MapProperty; //导入依赖的package包/类
public MapProperty<Variable<Number>, TopsoilDataColumn> selectionsProperty() {
    if (selectionsProperty == null) {
        selectionsProperty = new SimpleMapProperty<>(FXCollections.observableHashMap());
    }
    return selectionsProperty;
}
 
开发者ID:CIRDLES,项目名称:Topsoil,代码行数:7,代码来源:VariableColumnChooser.java

示例13: currentMenuItemsProperty

import javafx.beans.property.MapProperty; //导入依赖的package包/类
public final MapProperty<String, MenuItemModel> currentMenuItemsProperty(){
	return this.currentMenuItems;
}
 
开发者ID:crypto-coder,项目名称:firstlight,代码行数:4,代码来源:MenuBarModel.java

示例14: parameterProperty

import javafx.beans.property.MapProperty; //导入依赖的package包/类
public MapProperty<String, String> parameterProperty() {
return this.parameterProperty;
   }
 
开发者ID:abertschi,项目名称:auto-web-auth,代码行数:4,代码来源:Profile.java

示例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);
 
开发者ID:saxsys,项目名称:SynchronizeFX,代码行数:9,代码来源:PropertyVisitor.java


注:本文中的javafx.beans.property.MapProperty类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。