All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.dmx.client.model.ConfigureFixedPatternConfigModel Maven / Gradle / Ivy

There is a newer version: 2.0.29
Show newest version
package org.bidib.wizard.dmx.client.model;

import java.util.List;

import org.bidib.wizard.dmx.client.model.DmxFixedPattern.FixedPatternItem;

import com.jgoodies.binding.beans.Model;
import com.jgoodies.binding.value.ValueHolder;
import com.jgoodies.binding.value.ValueModel;
import com.jgoodies.common.collect.ArrayListModel;

public class ConfigureFixedPatternConfigModel extends Model {

    private static final long serialVersionUID = 1L;

    public static final String PROPERTY_FIXED_PATTERN_CONFIG_LIST = "fixedPatternConfigList";

    public static final String PROPERTY_LISTCHANGED = "listChanged";

    private final ArrayListModel fixedPatternConfigList;

    private final ValueModel listChanged = new ValueHolder(false);

    public ConfigureFixedPatternConfigModel(final List fixedPatterConfigList) {
        this.fixedPatternConfigList = new ArrayListModel<>();

        this.fixedPatternConfigList.addAll(fixedPatterConfigList);
    }

    public ArrayListModel getFixedPatternConfigList() {
        return fixedPatternConfigList;
    }

    public void setListChanged(boolean listChanged) {
        Boolean oldValue = (Boolean) this.listChanged.getValue();
        this.listChanged.setValue(listChanged);

        firePropertyChange(PROPERTY_LISTCHANGED, oldValue, Boolean.valueOf(listChanged));
    }

    public boolean isListChanged() {
        return (Boolean) this.listChanged.getValue();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy