Search in sources :

Example 11 with Views

use of de.mossgrabers.framework.view.Views in project DrivenByMoss by git-moss.

the class AbstractControllerSetup method activateBrowserObserver.

/**
 * De-/Activate the browser view depending on the browsers' active state.
 *
 * @param browserView The view to hide/show when the browser becomes de-/active
 */
protected void activateBrowserObserver(final Views browserView) {
    this.model.getBrowser().addActiveObserver(isActive -> {
        final ViewManager viewManager = this.getSurface().getViewManager();
        if (isActive.booleanValue()) {
            final Views previousViewId = viewManager.getPreviousID();
            viewManager.setTemporary(browserView);
            if (viewManager.getPreviousID() == Views.SHIFT)
                viewManager.setPreviousID(previousViewId);
        } else if (viewManager.isActive(browserView))
            viewManager.restore();
    });
}
Also used : Views(de.mossgrabers.framework.view.Views) ViewManager(de.mossgrabers.framework.featuregroup.ViewManager)

Example 12 with Views

use of de.mossgrabers.framework.view.Views in project DrivenByMoss by git-moss.

the class ViewMultiSelectCommand method executeNormal.

/**
 * {@inheritDoc}
 */
@Override
public void executeNormal(final ButtonEvent event) {
    if (event != this.triggerEvent)
        return;
    final ViewManager viewManager = this.surface.getViewManager();
    final Views activeViewId = viewManager.getActiveID();
    int index = this.viewIds.indexOf(activeViewId) + 1;
    if (index < 0 || index >= this.viewIds.size())
        index = 0;
    final Views viewId = this.viewIds.get(index);
    if (viewManager.isActive(viewId))
        return;
    viewManager.setActive(viewId);
    if (this.displayName)
        this.surface.getDisplay().notify(viewManager.get(viewId).getName());
}
Also used : Views(de.mossgrabers.framework.view.Views) ViewManager(de.mossgrabers.framework.featuregroup.ViewManager)

Aggregations

Views (de.mossgrabers.framework.view.Views)12 ViewManager (de.mossgrabers.framework.featuregroup.ViewManager)11 ITrack (de.mossgrabers.framework.daw.data.ITrack)4 ModeManager (de.mossgrabers.framework.featuregroup.ModeManager)3 IPadGrid (de.mossgrabers.framework.controller.grid.IPadGrid)2 IView (de.mossgrabers.framework.featuregroup.IView)2 MaschineMonitorEncoderCommand (de.mossgrabers.controller.ni.maschine.core.command.trigger.MaschineMonitorEncoderCommand)1 MainKnobRowModeCommand (de.mossgrabers.controller.ni.maschine.mk3.command.continuous.MainKnobRowModeCommand)1 TouchstripCommand (de.mossgrabers.controller.ni.maschine.mk3.command.continuous.TouchstripCommand)1 MaschineControlSurface (de.mossgrabers.controller.ni.maschine.mk3.controller.MaschineControlSurface)1 StudioEncoderModeManager (de.mossgrabers.controller.ni.maschine.mk3.controller.StudioEncoderModeManager)1 ContinuousCommand (de.mossgrabers.framework.command.core.ContinuousCommand)1 PitchbendCommand (de.mossgrabers.framework.command.core.PitchbendCommand)1 TriggerCommand (de.mossgrabers.framework.command.core.TriggerCommand)1 IHwAbsoluteKnob (de.mossgrabers.framework.controller.hardware.IHwAbsoluteKnob)1 IHwButton (de.mossgrabers.framework.controller.hardware.IHwButton)1 IHwContinuousControl (de.mossgrabers.framework.controller.hardware.IHwContinuousControl)1 IHwRelativeKnob (de.mossgrabers.framework.controller.hardware.IHwRelativeKnob)1 IBrowser (de.mossgrabers.framework.daw.IBrowser)1 ITransport (de.mossgrabers.framework.daw.ITransport)1