// Path: src/main/java/org/xdat/settings/SettingsTransaction.java
// public class SettingsTransaction {
//     private final List<Setting<?>> changedSettings = new ArrayList<>();
//     private final Set<Runnable> handlers = new LinkedHashSet<>();
// 
//     public SettingsTransaction() {
//     }
// 
//     public void execute(Collection<Function<SettingsTransaction, Boolean>> tasks) {
//         boolean changed = false;
//         for (Function<SettingsTransaction, Boolean> applyAction : tasks) {
//             changed |= applyAction.apply(this);
//         }
//         if (changed) {
//             runHandlers();
//         }
//     }
// 
//     public void handleOnce(Runnable handler) {
//         handlers.add(handler);
//     }
// 
//     void addChanged(Setting<?> setting){
//         this.changedSettings.add(setting);
//     }
// 
//     private void runHandlers(){
//         if (isChanged()) {
//             for (Runnable handler : handlers) {
//                 handler.run();
//             }
//         }
//     }
// 
//     private boolean isChanged() {
//         return !this.changedSettings.isEmpty();
//     }
// }


import org.xdat.settings.SettingsTransaction;
import javax.swing.JPanel;
import java.awt.LayoutManager;
package org.xdat.gui.panels;



public abstract class SettingControlPanel extends JPanel {
    public SettingControlPanel(LayoutManager layoutManager, boolean b) {
        super(layoutManager, b);
    }

    public SettingControlPanel(LayoutManager layoutManager) {
        super(layoutManager);
    }

    public SettingControlPanel(boolean b) {
        super(b);
    }

    public SettingControlPanel() {
    }

    /**
     * @return whether this operation changed the value
     */
// Path: src/main/java/org/xdat/settings/SettingsTransaction.java
// public class SettingsTransaction {
//     private final List<Setting<?>> changedSettings = new ArrayList<>();
//     private final Set<Runnable> handlers = new LinkedHashSet<>();
// 
//     public SettingsTransaction() {
//     }
// 
//     public void execute(Collection<Function<SettingsTransaction, Boolean>> tasks) {
//         boolean changed = false;
//         for (Function<SettingsTransaction, Boolean> applyAction : tasks) {
//             changed |= applyAction.apply(this);
//         }
//         if (changed) {
//             runHandlers();
//         }
//     }
// 
//     public void handleOnce(Runnable handler) {
//         handlers.add(handler);
//     }
// 
//     void addChanged(Setting<?> setting){
//         this.changedSettings.add(setting);
//     }
// 
//     private void runHandlers(){
//         if (isChanged()) {
//             for (Runnable handler : handlers) {
//                 handler.run();
//             }
//         }
//     }
// 
//     private boolean isChanged() {
//         return !this.changedSettings.isEmpty();
//     }
// }


// Path: src/main/java/org/xdat/gui/panels/SettingControlPanel.java
import org.xdat.settings.SettingsTransaction;
import javax.swing.JPanel;
import java.awt.LayoutManager;

package org.xdat.gui.panels;



public abstract class SettingControlPanel extends JPanel {
    public SettingControlPanel(LayoutManager layoutManager, boolean b) {
        super(layoutManager, b);
    }

    public SettingControlPanel(LayoutManager layoutManager) {
        super(layoutManager);
    }

    public SettingControlPanel(boolean b) {
        super(b);
    }

    public SettingControlPanel() {
    }

    /**
     * @return whether this operation changed the value
     */
    public abstract boolean applyValue(SettingsTransaction transaction);