use of com.gempukku.libgdx.graph.ui.pipeline.producer.PipelinePropertyBoxProducerImpl in project gdx-graph by MarcinSc.
the class UIPipelineConfigurer method processPropertyType.
private static void processPropertyType(JsonValue propertyType) {
final String typeName = propertyType.name();
final String defaultName = propertyType.getString("defaultName");
PipelinePropertyBoxProducerImpl producer = new PipelinePropertyBoxProducerImpl(defaultName, typeName);
JsonValue fields = propertyType.get("fields");
if (fields != null) {
for (final JsonValue field : fields) {
final String fieldType = field.getString("type");
producer.addPropertyBoxPart(new Supplier<PropertyBoxPart>() {
@Override
public PropertyBoxPart get() {
GraphBoxPart propertyBoxPart = createFieldGraphBoxPart(fieldType, field);
if (propertyBoxPart != null)
return propertyBoxPart;
throw new IllegalArgumentException("Unable to resolve field type: " + fieldType);
}
});
}
}
UIPipelineConfiguration.registerPropertyType(producer);
}
Aggregations