Search in sources :

Example 1 with InpointMarker

use of com.helospark.tactview.core.timeline.marker.markers.InpointMarker in project tactview by helospark.

the class DefaultEditMenuItemConfiguration method addInpointMenuItem.

@Bean
@Order(1940)
public SelectableMenuContribution addInpointMenuItem(AlertDialogFactory dialogFactory, TimelineState timelineState, MarkerRepository markerRepository) {
    KeyCodeCombination combination = hotKeyRepository.registerOrGetHotKey("addInpoint", new KeyCodeCombination(KeyCode.I, KeyCodeCombination.CONTROL_DOWN, KeyCombination.SHIFT_DOWN), "Add inpoint").getCombination();
    return new DefaultMenuContribution(List.of(EDIT_ROOT, MARKER, "Add inpoint"), event -> {
        TimelinePosition position = timelineState.getPlaybackPosition();
        markerRepository.addMarker(position, new InpointMarker());
    }, combination);
}
Also used : DefaultMenuContribution(com.helospark.tactview.ui.javafx.menu.DefaultMenuContribution) KeyCodeCombination(javafx.scene.input.KeyCodeCombination) InpointMarker(com.helospark.tactview.core.timeline.marker.markers.InpointMarker) TimelinePosition(com.helospark.tactview.core.timeline.TimelinePosition) Order(com.helospark.lightdi.annotation.Order) Bean(com.helospark.lightdi.annotation.Bean)

Example 2 with InpointMarker

use of com.helospark.tactview.core.timeline.marker.markers.InpointMarker in project tactview by helospark.

the class TimelineCanvasTimelineHeaderClickHandler method populateInpointMenuItem.

private void populateInpointMenuItem(Menu convertMarker, TimelinePosition position) {
    MenuItem menuItem = new MenuItem("Inpoint");
    menuItem.setOnAction(e -> {
        markerRepository.addMarker(position, new InpointMarker());
    });
    convertMarker.getItems().add(menuItem);
}
Also used : MenuItem(javafx.scene.control.MenuItem) InpointMarker(com.helospark.tactview.core.timeline.marker.markers.InpointMarker)

Aggregations

InpointMarker (com.helospark.tactview.core.timeline.marker.markers.InpointMarker)2 Bean (com.helospark.lightdi.annotation.Bean)1 Order (com.helospark.lightdi.annotation.Order)1 TimelinePosition (com.helospark.tactview.core.timeline.TimelinePosition)1 DefaultMenuContribution (com.helospark.tactview.ui.javafx.menu.DefaultMenuContribution)1 MenuItem (javafx.scene.control.MenuItem)1 KeyCodeCombination (javafx.scene.input.KeyCodeCombination)1