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

com.github.avarabyeu.jashing.events.ProgressBarEvent Maven / Gradle / Ivy

There is a newer version: 0.0.16
Show newest version
package com.github.avarabyeu.jashing.events;

import com.github.avarabyeu.jashing.core.JashingEvent;
import com.google.gson.annotations.SerializedName;

import java.util.Collection;

/**
 * @author Andrei Varabyeu
 */
public class ProgressBarEvent extends JashingEvent {

    @SerializedName("progress_items")
    private Collection items;

    public ProgressBarEvent(String title, Collection items) {
        setTitle(title);
        this.items = items;
    }

    public ProgressBarEvent(Collection items) {
        this(null, items);
    }


    public Collection getItems() {
        return items;
    }

    public void setItems(Collection items) {
        this.items = items;
    }

    public static class Item {
        private String name;
        private byte progress;

        public Item(String name, byte progress) {
            this.name = name;
            this.progress = progress;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public byte getProgress() {
            return progress;
        }

        public void setProgress(byte progress) {
            this.progress = progress;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy