@@ -0,0 +1,1368 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public%0A * License, v. 2.0. If a copy of the MPL was not distributed with this%0A * file, You can obtain one at http://mozilla.org/MPL/2.0/. */%0A%0Apackage etomica.modifier;%0A%0Aimport etomica.action.IAction;%0A%0A%0A/**%0A * Wraps a ModifierBoolean instance so that the modification can be performed%0A * as the consequence of an action. Permits for example a modification%0A * initiated by a user-interface thread to be executed by the controller%0A * thread.  Call to setValueForAction stores value for modifier, which%0A * is then invoked when a subsequent call to actionPerformed is made.%0A *%0A * @author David Kofke, Andrew Schultz%0A */%0Apublic class ModifyBooleanAction implements IAction %7B%0A%0A    /**%0A     * Constuctor requires the wrapped ModifierBoolean%0A     */%0A    public ModifyBooleanAction(ModifierBoolean modifier) %7B%0A        this.modifier = modifier;%0A    %7D%0A%0A    public void actionPerformed() %7B%0A        modifier.setBoolean(value);%0A    %7D%0A%0A    /**%0A     * Stores the new value to be set by the wrapped modifier.  Value is%0A     * not set until actionPerformed is invoked.%0A     */%0A    public void setValueForAction(boolean newBoolean) %7B%0A        value = newBoolean;%0A    %7D%0A%0A    public ModifierBoolean getWrappedModifier() %7B%0A        return modifier;%0A    %7D%0A%0A    private final ModifierBoolean modifier;%0A    private boolean value;%0A%7D%0A

Add ModifyBooleanAction class to make DeviceCheckBox work