use of com.gempukku.libgdx.graph.ui.graph.property.PropertyBoxPart in project gdx-graph by MarcinSc.
the class PipelinePropertyBoxProducerImpl method createPropertyBox.
@Override
public PropertyBox createPropertyBox(Skin skin, String name, PropertyLocation location, JsonValue jsonObject, PropertyLocation[] propertyLocations) {
PropertyBoxImpl result = new PropertyBoxImpl(name, type, null, propertyLocations);
for (Supplier<PropertyBoxPart> propertyBoxPart : propertyBoxParts) {
result.addPropertyBoxPart(propertyBoxPart.get());
}
result.initialize(jsonObject);
return result;
}
use of com.gempukku.libgdx.graph.ui.graph.property.PropertyBoxPart 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