use of de.mossgrabers.framework.view.ViewManager 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.framework.view.ViewManager 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.framework.view.ViewManager 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;
}
}
use of de.mossgrabers.framework.view.ViewManager in project DrivenByMoss by git-moss.
the class ViewSelectMode method updateDisplay.
/**
* {@inheritDoc}
*/
@Override
public void updateDisplay() {
final Display d = this.surface.getDisplay();
final ViewManager viewManager = this.surface.getViewManager();
for (int i = 0; i < 2; i++) {
d.clearRow(0 + i).setBlock(0 + i, 0, "Select mode:").done(0 + i);
d.clearRow(2 + i);
d.setCell(2 + i, 0, (viewManager.isActiveView(Views.VIEW_CONTROL) ? SLDisplay.RIGHT_ARROW : " ") + "Control");
d.setCell(2 + i, 1, " " + (viewManager.isActiveView(Views.VIEW_PLAY) ? SLDisplay.RIGHT_ARROW : " ") + "Play");
d.done(2 + i);
}
}
Aggregations