use of de.mossgrabers.controller.akai.fire.mode.NoteMode in project DrivenByMoss by git-moss.
the class FireSelectButtonCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute(final ButtonEvent event, final int velocity) {
if (velocity > 0)
return;
final ModeManager modeManager = this.surface.getModeManager();
if (modeManager.isActive(Modes.NOTE)) {
((NoteMode) modeManager.get(Modes.NOTE)).resetTranspose();
return;
}
if (modeManager.isActive(Modes.BROWSER)) {
((FireBrowserCommand) this.surface.getButton(ButtonID.BROWSE).getCommand()).discardBrowser(true);
return;
}
final FireConfiguration configuration = this.surface.getConfiguration();
final ICursorDevice cursorDevice = this.model.getCursorDevice();
if (modeManager.isActive(Modes.DEVICE_PARAMS) && configuration.isDeleteModeActive()) {
cursorDevice.remove();
configuration.toggleDeleteModeActive();
return;
}
cursorDevice.toggleWindowOpen();
}
Aggregations