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

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

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

import java.util.Objects;

import com.jgoodies.binding.beans.Model;

public class DmxTimelineConfig extends Model {
    private static final long serialVersionUID = 1L;

    public static final String PROPERTY_DMX_TIME = "dmxTime";

    public static final String PROPERTY_DMX_CV_NUMBER = "cvNumber";

    private Integer dmxTime;

    private final int cvNumber;

    public DmxTimelineConfig(int cvNumber, Integer dmxTime) {
        this.cvNumber = cvNumber;
        this.dmxTime = dmxTime;
    }

    public void setDmxTime(Integer dmxTime) {
        Integer oldValue = this.dmxTime;
        this.dmxTime = dmxTime;

        firePropertyChange(PROPERTY_DMX_TIME, oldValue, dmxTime);
    }

    public Integer getDmxTime() {
        return dmxTime;
    }

    public int getCvNumber() {
        return cvNumber;
    }

    @Override
    public int hashCode() {
        return Objects.hash(cvNumber, dmxTime);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        DmxTimelineConfig other = (DmxTimelineConfig) obj;
        return cvNumber == other.cvNumber && Objects.equals(dmxTime, other.dmxTime);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy