use of com.helospark.lightdi.annotation.Bean in project tactview by helospark.
the class TactViewCoreConfiguration method prettyPrintingObjectMapper.
@Bean
public ObjectMapper prettyPrintingObjectMapper() {
ObjectMapper result = new ObjectMapper();
result.enable(SerializationFeature.INDENT_OUTPUT);
return result;
}
use of com.helospark.lightdi.annotation.Bean in project tactview by helospark.
the class TactViewCoreConfiguration method getterIgnoringObjectMapper.
@Bean
public ObjectMapper getterIgnoringObjectMapper() {
ObjectMapper regularObjectMapper = new ObjectMapper();
regularObjectMapper.setVisibility(PropertyAccessor.ALL, Visibility.NONE);
regularObjectMapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
return regularObjectMapper;
}
use of com.helospark.lightdi.annotation.Bean in project tactview by helospark.
the class DefaultEditMenuItemConfiguration method selectAllClipsContextMenuItem.
@Bean
@Order(1800)
public SelectableMenuContribution selectAllClipsContextMenuItem(SelectedNodeRepository selectedNodeRepository, TimelineManagerAccessor timelineManager) {
KeyCodeCombination combination = hotKeyRepository.registerOrGetHotKey("selectAllClips", new KeyCodeCombination(KeyCode.A, KeyCombination.CONTROL_DOWN), "Select all clips").getCombination();
return new DefaultMenuContribution(List.of(EDIT_ROOT, SELECT_ROOT, "_All clips"), event -> {
selectedNodeRepository.clearAllSelectedItems();
selectedNodeRepository.addSelectedClips(timelineManager.getAllClipIds());
}, combination);
}
use of com.helospark.lightdi.annotation.Bean in project tactview by helospark.
the class DefaultEditMenuItemConfiguration method selectClipsToRightContextMenuItem.
@Bean
@Order(1802)
public SelectableMenuContribution selectClipsToRightContextMenuItem(SelectedNodeRepository selectedNodeRepository, TimelineManagerAccessor timelineManager, TimelineState state) {
return new DefaultMenuContribution(List.of(EDIT_ROOT, SELECT_ROOT, "Clips to _right"), event -> {
TimelinePosition playbackPosition = state.getPlaybackPosition();
selectedNodeRepository.clearAllSelectedItems();
List<String> clipsIds = new ArrayList<>();
for (var channel : timelineManager.getChannels()) {
for (var clip : channel.getAllClips()) {
if (!clip.getInterval().getEndPosition().isLessThan(playbackPosition)) {
clipsIds.add(clip.getId());
}
}
}
selectedNodeRepository.clearAllSelectedItems();
selectedNodeRepository.addSelectedClips(clipsIds);
});
}
use of com.helospark.lightdi.annotation.Bean in project tactview by helospark.
the class DefaultEditMenuItemConfiguration method cutSelectedAtCurrent.
@Bean
@Order(1911)
public SelectableMenuContribution cutSelectedAtCurrent(AlertDialogFactory dialogFactory, TimelineState timelineState, UiCutHandler uiCutHandler) {
String title = "Set selected endpoint";
KeyCodeCombination combination = hotKeyRepository.registerOrGetHotKey("cutSelectedAtCursor", new KeyCodeCombination(KeyCode.O, KeyCodeCombination.CONTROL_DOWN), title).getCombination();
return new DefaultMenuContribution(List.of(EDIT_ROOT, CUT_MENU_ITEM, title), event -> {
uiCutHandler.cutSelectedUntilCursor(false);
}, combination);
}
Aggregations