use of de.mossgrabers.framework.command.core.AbstractTriggerCommand in project DrivenByMoss by git-moss.
the class AbstractView method simulateButtonPress.
/**
* Simulate pressing a button by sending a button down and up event.
*
* @param buttonID The ID of the button to trigger
*/
protected void simulateButtonPress(final ButtonID buttonID) {
final IHwButton button = this.surface.getButton(buttonID);
final AbstractTriggerCommand<?, ?> triggerCommand = (AbstractTriggerCommand<?, ?>) button.getCommand();
triggerCommand.executeNormal(ButtonEvent.DOWN);
triggerCommand.executeNormal(ButtonEvent.UP);
}
use of de.mossgrabers.framework.command.core.AbstractTriggerCommand in project DrivenByMoss by git-moss.
the class AbstractView method simulateShiftedButtonPress.
/**
* Simulate pressing a button with combination of the shift button by sending a button down and
* up event.
*
* @param buttonID The ID of the button to trigger
*/
protected void simulateShiftedButtonPress(final ButtonID buttonID) {
final IHwButton button = this.surface.getButton(buttonID);
final AbstractTriggerCommand<?, ?> triggerCommand = (AbstractTriggerCommand<?, ?>) button.getCommand();
triggerCommand.executeShifted(ButtonEvent.DOWN);
triggerCommand.executeShifted(ButtonEvent.UP);
}
Aggregations