use of com.helospark.lightdi.annotation.Order in project tactview by helospark.
the class StandardClipContextMenuChainItemConfiguration method copyMenuItem.
@Bean
@Order(100)
public ClipContextMenuChainItem copyMenuItem(CopyPasteRepository copyPasteRepository) {
return alwaysSupportedContextMenuItem(request -> {
MenuItem copyClip = new MenuItem("Copy");
copyClip.setOnAction(e -> copyPasteRepository.copyClip(List.of(request.getPrimaryClip().getId())));
return copyClip;
});
}
use of com.helospark.lightdi.annotation.Order in project tactview by helospark.
the class CommonPropertyValueContextMenuItemConfiguration method removeAllAndSet.
@Bean
@Order(20)
public PropertyValueContextMenuItem removeAllAndSet(UiTimelineManager timelineManager, EffectParametersRepository effectParametersRepository, UiCommandInterpreterService commandInterpreter) {
return contextMenuEnabledIfKeyframesEnabled(request -> {
MenuItem removeAllAndSetMenuItemw = new MenuItem("Remove all and set");
removeAllAndSetMenuItemw.setOnAction(e -> {
request.effectLine.removeAllAndSetKeyframe(timelineManager.getCurrentPosition());
});
return removeAllAndSetMenuItemw;
});
}
use of com.helospark.lightdi.annotation.Order in project tactview by helospark.
the class CommonPropertyValueContextMenuItemConfiguration method removeKeyframeItem.
@Bean
@Order(10)
public PropertyValueContextMenuItem removeKeyframeItem(UiTimelineManager timelineManager, EffectParametersRepository effectParametersRepository, UiCommandInterpreterService commandInterpreter) {
return contextMenuEnabledIfKeyframesEnabled(request -> {
MenuItem removeKeyframeMenuItem = new MenuItem("Remove keyframe");
removeKeyframeMenuItem.setOnAction(e -> {
request.effectLine.removeKeyframe(timelineManager.getCurrentPosition());
});
return removeKeyframeMenuItem;
});
}
use of com.helospark.lightdi.annotation.Order in project tactview by helospark.
the class CommonPropertyValueContextMenuItemConfiguration method copyValue.
@Bean
@Order(-20)
public PropertyValueContextMenuItem copyValue(UiTimelineManager timelineManager) {
return allPrimitiveEffectLineSupportingMenuIfRequired(request -> {
MenuItem copyKeyframeMenuItem = new MenuItem("Copy");
copyKeyframeMenuItem.setOnAction(e -> {
Object currentValue = ((PrimitiveEffectLine) (request.effectLine)).getCurrentValueSupplier().get();
Clipboard clipboard = Clipboard.getSystemClipboard();
ClipboardContent content = new ClipboardContent();
content.put(RAW_DATA_FORMAT, currentValue);
clipboard.setContent(content);
});
return copyKeyframeMenuItem;
});
}
use of com.helospark.lightdi.annotation.Order 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);
}
Aggregations