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

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

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

import java.util.ArrayList;
import java.util.List;

import org.bidib.wizard.api.model.NodeInterface;

import com.jgoodies.binding.beans.Model;

public class DmxOverlay extends Model {

    private static final long serialVersionUID = 1L;

    private final NodeInterface node;

    private final int patternIndex;

    private final int startCvNumber;

    private final List items = new ArrayList<>();

    public DmxOverlay(final NodeInterface node, int patternIndex, int startCvNumber, final List items) {
        this.node = node;
        this.patternIndex = patternIndex;
        this.startCvNumber = startCvNumber;

        this.items.addAll(items);
    }

    public NodeInterface getNode() {
        return node;
    }

    public int getPatternIndex() {
        return patternIndex;
    }

    public int getStartCvNumber() {
        return startCvNumber;
    }

    public List getItems() {
        return items;
    }

    @Override
    public String toString() {
        return "Overlay " + (getPatternIndex() + 1);
    }

    public static class OverlayItem {
        private final int cvNumber;

        private Integer dmxChannelIdA;

        private Integer brightnessValueA;

        private Integer dmxChannelIdB;

        private Integer brightnessValueB;

        private Integer transitionTime;

        public OverlayItem(int cvNumber) {
            this.cvNumber = cvNumber;
        }

        public int getCvNumber() {
            return cvNumber;
        }

        public Integer getDmxChannelIdA() {
            return dmxChannelIdA;
        }

        public void setDmxChannelIdA(Integer dmxChannelId) {
            this.dmxChannelIdA = dmxChannelId;
        }

        public Integer getBrightnessValueA() {
            return brightnessValueA;
        }

        public void setBrightnessValueA(Integer brightnessValue) {
            this.brightnessValueA = brightnessValue;
        }

        public Integer getDmxChannelIdB() {
            return dmxChannelIdB;
        }

        public void setDmxChannelIdB(Integer dmxChannelId) {
            this.dmxChannelIdB = dmxChannelId;
        }

        public Integer getBrightnessValueB() {
            return brightnessValueB;
        }

        public void setBrightnessValueB(Integer brightnessValue) {
            this.brightnessValueB = brightnessValue;
        }

        /**
         * @return the transitionTime
         */
        public Integer getTransitionTime() {
            return transitionTime;
        }

        /**
         * @param transitionTime
         *            the transitionTime to set
         */
        public void setTransitionTime(Integer transitionTime) {
            this.transitionTime = transitionTime;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy