org.bidib.wizard.dmx.client.model.DmxSceneryPoint 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
The newest version!
package org.bidib.wizard.dmx.client.model;
import com.jgoodies.binding.beans.Model;
public class DmxSceneryPoint extends Model {
private static final long serialVersionUID = 1L;
public static final String PROPERTY_DMX_CHANNEL_NUMBER = "dmxChannelNumber";
public static final String PROPERTY_TIME_OFFSET = "timeOffset";
public static final String PROPERTY_BRIGHTNESS = "brightness";
public static final String PROPERTY_UNIQUEID = "uniqueId";
public static final String PROPERTY_ACTION = "action";
// DMX channel number
private int dmxChannelNumber;
private int timeOffset;
private int brightness;
private long uniqueId;
public DmxSceneryPoint() {
}
/**
* @return the dmxChannelNumber
*/
public int getDmxChannelNumber() {
return dmxChannelNumber;
}
/**
* @param dmxChannelNumber
* the dmxChannelNumber to set
*/
public void setDmxChannelNumber(int dmxChannelNumber) {
int oldValue = this.dmxChannelNumber;
this.dmxChannelNumber = dmxChannelNumber;
firePropertyChange(PROPERTY_DMX_CHANNEL_NUMBER, oldValue, dmxChannelNumber);
}
/**
* @return the timeOffset
*/
public int getTimeOffset() {
return timeOffset;
}
/**
* @param timeOffset
* the timeOffset to set
*/
public void setTimeOffset(int timeOffset) {
int oldValue = this.timeOffset;
this.timeOffset = timeOffset;
firePropertyChange(PROPERTY_TIME_OFFSET, oldValue, timeOffset);
}
/**
* @return the brightness
*/
public int getBrightness() {
return brightness;
}
/**
* @param brightness
* the brightness to set
*/
public void setBrightness(int brightness) {
int oldValue = this.brightness;
this.brightness = brightness;
firePropertyChange(PROPERTY_BRIGHTNESS, oldValue, brightness);
}
/**
* @return the uniqueId
*/
public long getUniqueId() {
return uniqueId;
}
/**
* @param uniqueId
* the uniqueId to set
*/
public void setUniqueId(long uniqueId) {
long oldValue = this.uniqueId;
this.uniqueId = uniqueId;
firePropertyChange(PROPERTY_UNIQUEID, oldValue, uniqueId);
}
public DmxSceneryPoint withTimeOffset(int timeOffset) {
setTimeOffset(timeOffset);
return this;
}
public DmxSceneryPoint withDmxChannelNumber(int dmxChannelNumber) {
setDmxChannelNumber(dmxChannelNumber);
return this;
}
public DmxSceneryPoint withBrightness(int brightness) {
setBrightness(brightness);
return this;
}
public DmxSceneryPoint withUniqueId(long uniqueId) {
setUniqueId(uniqueId);
return this;
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof DmxSceneryPoint)) {
return false;
}
DmxSceneryPoint that = (DmxSceneryPoint) obj;
if (this.dmxChannelNumber != that.dmxChannelNumber) {
return false;
}
if (this.timeOffset != that.timeOffset) {
return false;
}
if (this.brightness != that.brightness) {
return false;
}
if (this.uniqueId != that.uniqueId) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result;
result = this.timeOffset;
result = 29 * result + this.brightness;
result = (int) (29 * result + this.uniqueId);
result = 29 * result + this.dmxChannelNumber;
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("DmxSceneryPoint, timeOffset: ");
sb
.append(timeOffset).append(" ms, brightness: ").append(brightness).append(", uniqueId: ").append(uniqueId)
.append(", dmxChannelNumber: ").append(dmxChannelNumber);
return sb.toString();
}
}