org.bidib.wizard.dmx.client.model.DmxTimelineConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-dmx-client Show documentation
Show all versions of bidibwizard-dmx-client Show documentation
jBiDiB BiDiB Wizard DMX client POM
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);
}
}