use of com.gempukku.libgdx.graph.ui.graph.property.PropertyBoxProducer in project gdx-graph by MarcinSc.
the class GraphDesignTab method createPropertyPopupMenu.
private PopupMenu createPropertyPopupMenu(float x, float y) {
PopupMenu menu = new PopupMenu();
for (UIGraphConfiguration uiGraphConfiguration : uiGraphConfigurations) {
for (Map.Entry<String, PropertyBoxProducer> propertyEntry : uiGraphConfiguration.getPropertyBoxProducers().entrySet()) {
final String name = propertyEntry.getKey();
final PropertyBoxProducer value = propertyEntry.getValue();
MenuItem valueMenuItem = new MenuItem(name);
valueMenuItem.addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
PropertyBox defaultPropertyBox = value.createDefaultPropertyBox(skin, type.getPropertyLocations());
addPropertyBox(name, defaultPropertyBox);
}
});
menu.addItem(valueMenuItem);
}
}
return menu;
}
use of com.gempukku.libgdx.graph.ui.graph.property.PropertyBoxProducer in project gdx-graph by MarcinSc.
the class UIGraphLoaderCallback method addPipelineProperty.
@Override
public void addPipelineProperty(String type, String name, PropertyLocation location, JsonValue data) {
PropertyBoxProducer producer = findPropertyProducerByType(type);
if (producer == null)
throw new IllegalArgumentException("Unable to find property producer for type: " + type);
PropertyBox propertyBox = producer.createPropertyBox(skin, name, location, data, propertyLocations);
graphDesignTab.addPropertyBox(type, propertyBox);
}
Aggregations