use of com.helospark.tactview.core.timeline.effect.interpolation.provider.GraphProvider in project tactview by helospark.
the class GraphSetterChainItem method handle.
@Override
protected EffectLine handle(GraphProvider graphingProvider, ValueProviderDescriptor descriptor) {
Button button = new Button("Open graph window", new Glyph("FontAwesome", FontAwesome.Glyph.DIAMOND));
GraphingComponent graphingComponent = new GraphingComponent(250, 100, effectGraphAccessor, messagingService, menuItemFactories, commandInterpreter, stylesheetAdderService, nameToIdRepository);
graphingComponent.setGraphProvider(graphingProvider);
graphingComponent.setZoom(0.4);
graphingComponent.setParent(scene.getWindow());
graphingComponent.redrawGraphProvider();
VBox vbox = new VBox(button, graphingComponent);
PrimitiveEffectLine result = PrimitiveEffectLine.builder().withCurrentValueProvider(() -> effectParametersRepository.getValueAtAsObject(graphingProvider.getId(), uiTimelineManager.getCurrentPosition())).withVisibleNode(vbox).withDescriptorId(graphingProvider.getId()).withEffectParametersRepository(effectParametersRepository).withCommandInterpreter(commandInterpreter).withDescriptor(descriptor).withUpdateFunction(position -> {
graphingComponent.redrawGraphProvider();
}).withUpdateFromValue(value -> {
}).build();
button.setOnMouseClicked(event -> {
dockableTabRepository.openTab(graphingDialog);
graphingDialog.showProvider(graphingProvider);
});
return result;
}
use of com.helospark.tactview.core.timeline.effect.interpolation.provider.GraphProvider in project tactview by helospark.
the class GraphProceduralClip method getDescriptorsInternal.
@Override
public List<ValueProviderDescriptor> getDescriptorsInternal() {
List<ValueProviderDescriptor> result = super.getDescriptorsInternal();
// if is there to distinguish between load and new init
if (graphProvider == null) {
EffectGraph effectGraph = defaultGraphArrangementFactory.createEffectGraphProviderWithOutput();
graphProvider = new GraphProvider(effectGraph);
}
graphProvider.setContainingIntervalAware(this);
graphProvider.setContainingElementId(this.getId());
// TODO: this is not a pretty solution, but current arch does not provider better, must think of different way
effectGraphAccessor.sendProviderMessageFor(graphProvider);
ValueProviderDescriptor graphDescriptor = ValueProviderDescriptor.builder().withKeyframeableEffect(graphProvider).withName("Graph").build();
result.add(graphDescriptor);
return result;
}
use of com.helospark.tactview.core.timeline.effect.interpolation.provider.GraphProvider in project tactview by helospark.
the class GraphEffect method initializeValueProviderInternal.
@Override
protected void initializeValueProviderInternal() {
EffectGraph effectGraph = defaultGraphArrangementFactory.createEffectGraphProviderWithInputAndOutput();
effectGraphProvider = new GraphProvider(effectGraph);
}
Aggregations