Package org.terasology.editor

Examples of org.terasology.editor.EditorRange.max()


            CopyStrategyLibrary copyStrategies = CoreRegistry.get(CopyStrategyLibrary.class);
            ClassMetadata<T, ?> classMetadata = new DefaultClassMetadata<>(new SimpleUri(), (Class<T>) target.getClass(), reflectFactory, copyStrategies);
            for (Field field : getAllFields(target.getClass(), and(withAnnotation(EditorRange.class), or(withType(Float.TYPE), withType(Float.class))))) {
                EditorRange range = field.getAnnotation(EditorRange.class);
                FieldMetadata<T, Float> fieldMetadata = (FieldMetadata<T, Float>) classMetadata.getField(field.getName());
                Property property = new FloatProperty(target, fieldMetadata, range.min(), range.max());
                properties.add(property);
            }
        } catch (NoSuchMethodException e) {
            logger.error("Cannot provide provide inspection for {}, does not have a default constructor", target.getClass());
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.