use of de.mossgrabers.push.view.ColorView in project DrivenByMoss by git-moss.
the class TrackDetailsMode method onFirstRowTrack.
private void onFirstRowTrack(final int index) {
final IChannelBank tb = this.model.getCurrentTrackBank();
final ITrack t = tb.getSelectedTrack();
if (t == null)
return;
switch(index) {
case 0:
t.toggleIsActivated();
break;
case 1:
t.toggleRecArm();
break;
case 2:
t.toggleMute();
break;
case 3:
t.toggleSolo();
break;
case 4:
t.toggleMonitor();
break;
case 5:
t.toggleAutoMonitor();
break;
case 6:
this.model.toggleCursorTrackPinned();
break;
case 7:
final ViewManager viewManager = this.surface.getViewManager();
((ColorView) viewManager.getView(Views.VIEW_COLOR)).setMode(ColorView.SelectMode.MODE_TRACK);
viewManager.setActiveView(Views.VIEW_COLOR);
break;
}
}
use of de.mossgrabers.push.view.ColorView in project DrivenByMoss by git-moss.
the class PushControllerSetup method createViews.
/**
* {@inheritDoc}
*/
@Override
protected void createViews() {
final PushControlSurface surface = this.getSurface();
final ViewManager viewManager = surface.getViewManager();
viewManager.registerView(Views.VIEW_PLAY, new PlayView(surface, this.model));
viewManager.registerView(Views.VIEW_PIANO, new PianoView(surface, this.model));
viewManager.registerView(Views.VIEW_PRG_CHANGE, new PrgChangeView(surface, this.model));
viewManager.registerView(Views.VIEW_CLIP, new ClipView(surface, this.model));
viewManager.registerView(Views.VIEW_COLOR, new ColorView(surface, this.model));
if (this.host.hasClips()) {
viewManager.registerView(Views.VIEW_SESSION, new SessionView(surface, this.model));
viewManager.registerView(Views.VIEW_SEQUENCER, new SequencerView(surface, this.model));
viewManager.registerView(Views.VIEW_DRUM, new DrumView(surface, this.model));
viewManager.registerView(Views.VIEW_DRUM4, new DrumView4(surface, this.model));
viewManager.registerView(Views.VIEW_DRUM8, new DrumView8(surface, this.model));
viewManager.registerView(Views.VIEW_DRUM64, new DrumView64(surface, this.model));
viewManager.registerView(Views.VIEW_RAINDROPS, new RaindropsView(surface, this.model));
viewManager.registerView(Views.VIEW_SCENE_PLAY, new ScenePlayView(surface, this.model));
}
}
use of de.mossgrabers.push.view.ColorView in project DrivenByMoss by git-moss.
the class ClipMode method onSecondRow.
/**
* {@inheritDoc}
*/
@Override
public void onSecondRow(final int index, final ButtonEvent event) {
if (event != ButtonEvent.DOWN)
return;
if (index != 7)
return;
final ViewManager viewManager = this.surface.getViewManager();
((ColorView) viewManager.getView(Views.VIEW_COLOR)).setMode(SelectMode.MODE_CLIP);
viewManager.setActiveView(Views.VIEW_COLOR);
}
use of de.mossgrabers.push.view.ColorView in project DrivenByMoss by git-moss.
the class LayerDetailsMode method onFirstRow.
/**
* {@inheritDoc}
*/
@Override
public void onFirstRow(final int index, final ButtonEvent event) {
if (event != ButtonEvent.UP)
return;
final IChannel deviceChain = this.model.getCursorDevice().getSelectedLayerOrDrumPad();
if (deviceChain == null)
return;
switch(index) {
case 0:
this.model.getCursorDevice().toggleLayerOrDrumPadIsActivated(deviceChain.getIndex());
break;
case 2:
this.model.getCursorDevice().toggleLayerOrDrumPadMute(deviceChain.getIndex());
break;
case 3:
this.model.getCursorDevice().toggleLayerOrDrumPadSolo(deviceChain.getIndex());
break;
case 7:
final ViewManager viewManager = this.surface.getViewManager();
((ColorView) viewManager.getView(Views.VIEW_COLOR)).setMode(ColorView.SelectMode.MODE_LAYER);
viewManager.setActiveView(Views.VIEW_COLOR);
break;
default:
// Not used
break;
}
}
use of de.mossgrabers.push.view.ColorView in project DrivenByMoss by git-moss.
the class TrackDetailsMode method onFirstRowMasterTrack.
private void onFirstRowMasterTrack(final int index) {
switch(index) {
case 0:
this.model.getMasterTrack().toggleIsActivated();
break;
case 1:
this.model.getMasterTrack().toggleRecArm();
break;
case 2:
this.model.getMasterTrack().toggleMute();
break;
case 3:
this.model.getMasterTrack().toggleSolo();
break;
case 4:
this.model.getMasterTrack().toggleMonitor();
break;
case 5:
this.model.getMasterTrack().toggleAutoMonitor();
break;
case 6:
// Not used
break;
case 7:
final ViewManager viewManager = this.surface.getViewManager();
((ColorView) viewManager.getView(Views.VIEW_COLOR)).setMode(ColorView.SelectMode.MODE_TRACK);
viewManager.setActiveView(Views.VIEW_COLOR);
break;
}
}
Aggregations