Search in sources :

Example 26 with IEnumSetting

use of de.mossgrabers.framework.configuration.IEnumSetting in project DrivenByMoss by git-moss.

the class AbstractOpenSoundControlConfiguration method activateOSCLogging.

/**
 * Activate OSC logging properties.
 *
 * @param settingsUI The settings
 */
protected void activateOSCLogging(final ISettingsUI settingsUI) {
    final IEnumSetting logInputCommandsSetting = settingsUI.getEnumSetting("Log input commands", CATEGORY_DEBUG, ON_OFF_OPTIONS, ON_OFF_OPTIONS[0]);
    logInputCommandsSetting.addValueObserver(value -> {
        this.logInputCommands = "On".equals(value);
        this.notifyObservers(LOG_INPUT_COMMANDS);
    });
    final IEnumSetting logOutputCommandsSetting = settingsUI.getEnumSetting("Log output commands", CATEGORY_DEBUG, ON_OFF_OPTIONS, ON_OFF_OPTIONS[0]);
    logOutputCommandsSetting.addValueObserver(value -> {
        this.logOutputCommands = "On".equals(value);
        this.notifyObservers(LOG_OUTPUT_COMMANDS);
    });
    final IEnumSetting filterHeartbeatCommandsSetting = settingsUI.getEnumSetting("Filter heartbeat commands (ping etc.)", CATEGORY_DEBUG, ON_OFF_OPTIONS, ON_OFF_OPTIONS[0]);
    filterHeartbeatCommandsSetting.addValueObserver(value -> {
        this.filterHeartbeatCommands = "On".equals(value);
        this.notifyObservers(FILTER_HEARTBEAT_COMMANDS);
    });
    this.isSettingActive.add(LOG_INPUT_COMMANDS);
    this.isSettingActive.add(LOG_OUTPUT_COMMANDS);
    this.isSettingActive.add(FILTER_HEARTBEAT_COMMANDS);
}
Also used : IEnumSetting(de.mossgrabers.framework.configuration.IEnumSetting)

Aggregations

IEnumSetting (de.mossgrabers.framework.configuration.IEnumSetting)26 IIntegerSetting (de.mossgrabers.framework.configuration.IIntegerSetting)4 IActionSetting (de.mossgrabers.framework.configuration.IActionSetting)3 IStringSetting (de.mossgrabers.framework.configuration.IStringSetting)3 CommandCategory (de.mossgrabers.controller.generic.controller.CommandCategory)1 GenericFlexiControlSurface (de.mossgrabers.controller.generic.controller.GenericFlexiControlSurface)1 CommandSlot (de.mossgrabers.controller.generic.flexihandler.utils.CommandSlot)1 ProgramBank (de.mossgrabers.controller.generic.flexihandler.utils.ProgramBank)1 DAWColor (de.mossgrabers.framework.daw.DAWColor)1 IMidiOutput (de.mossgrabers.framework.daw.midi.IMidiOutput)1 FileEx (de.mossgrabers.framework.utils.FileEx)1 IOException (java.io.IOException)1 ParseException (java.text.ParseException)1