use of de.mossgrabers.framework.featuregroup.ViewManager in project DrivenByMoss by git-moss.
the class SLControllerSetup method createViews.
/**
* {@inheritDoc}
*/
@Override
protected void createViews() {
final SLControlSurface surface = this.getSurface();
final ViewManager viewManager = surface.getViewManager();
viewManager.register(Views.PLAY, new PlayView(surface, this.model));
viewManager.register(Views.CONTROL, new ControlView(surface, this.model));
}
use of de.mossgrabers.framework.featuregroup.ViewManager in project DrivenByMoss by git-moss.
the class SelectSessionViewCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final ButtonEvent event, final int velocity) {
final ViewManager viewManager = this.surface.getViewManager();
final SessionView sessionView = (SessionView) viewManager.get(Views.SESSION);
final Configuration configuration = this.surface.getConfiguration();
switch(event) {
case DOWN:
this.temporaryMode = TemporaryMode.OFF;
// Display Mix view with Shift
if (this.surface.isShiftPressed()) {
this.surface.setTriggerConsumed(ButtonID.SESSION);
viewManager.setActive(Views.MIX);
this.notifyViewName(Views.MIX, false, false);
}
break;
case LONG:
// Only trigger birds-eye-view if session view is already active
if (viewManager.isActive(Views.SESSION)) {
if (this.temporaryMode != TemporaryMode.POSSIBLE) {
this.surface.setTriggerConsumed(ButtonID.SESSION);
sessionView.setBirdsEyeActive(true);
this.notifyViewName(Views.SESSION, true, configuration.isFlipSession());
}
return;
}
this.activatedView(viewManager, configuration);
break;
case UP:
if (this.temporaryMode == TemporaryMode.ACTIVE) {
this.surface.getViewManager().restore();
return;
}
if (this.temporaryMode == TemporaryMode.POSSIBLE)
return;
if (viewManager.isActive(Views.SESSION)) {
// Disable birds-eye-view if active
if (sessionView.isBirdsEyeActive()) {
sessionView.setBirdsEyeActive(false);
this.notifyViewName(Views.SESSION, false, configuration.isFlipSession());
return;
}
// Flip clips
final boolean flipped = !configuration.isFlipSession();
configuration.setFlipSession(flipped);
this.notifyViewName(Views.SESSION, false, flipped);
return;
}
this.activatedView(viewManager, configuration);
break;
}
}
use of de.mossgrabers.framework.featuregroup.ViewManager in project DrivenByMoss by git-moss.
the class StopClipCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final ButtonEvent event, final int velocity) {
if (this.surface.isPro() && this.surface.isShiftPressed()) {
if (event != ButtonEvent.DOWN)
return;
final ViewManager viewManager = this.surface.getViewManager();
if (viewManager.isActive(Views.SHIFT))
viewManager.restore();
viewManager.setActive(Views.SHUFFLE);
return;
}
this.onModeButton(event, Modes.STOP_CLIP, "Stop Clip");
}
Aggregations