Search in sources :

Example 1 with SLView

use of de.mossgrabers.controller.novation.sl.view.SLView in project DrivenByMoss by git-moss.

the class ButtonRowSelectCommand method execute.

/**
 * {@inheritDoc}
 */
@Override
public void execute(final ButtonEvent event, final int velocity) {
    if (event != ButtonEvent.DOWN)
        return;
    final IView view = this.surface.getViewManager().getActive();
    if (view == null)
        return;
    final ModeManager modeManager = this.surface.getModeManager();
    switch(this.row) {
        case 0:
            ((SLView) view).onButtonRow1Select();
            break;
        case 1:
            modeManager.setActive(Modes.DEVICE_PARAMS);
            this.model.getHost().showNotification("Device Parameters");
            break;
        case 2:
            ((SLView) view).onButtonRow2Select();
            break;
        case 3:
            modeManager.setActive(Modes.TRACK);
            this.model.getHost().showNotification("Track");
            break;
        case 4:
            break;
        case 5:
        case 6:
        case 7:
            modeManager.setActive(Modes.VOLUME);
            this.model.getHost().showNotification("Volume");
            break;
        default:
            // Intentionally empty
            break;
    }
}
Also used : IView(de.mossgrabers.framework.featuregroup.IView) SLView(de.mossgrabers.controller.novation.sl.view.SLView) ModeManager(de.mossgrabers.framework.featuregroup.ModeManager)

Aggregations

SLView (de.mossgrabers.controller.novation.sl.view.SLView)1 IView (de.mossgrabers.framework.featuregroup.IView)1 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)1