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

org.teamapps.dto.UiPopup Maven / Gradle / Ivy

There is a newer version: 0.9.194
Show newest version
package org.teamapps.dto;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Supplier;
import java.util.stream.Collectors;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver;

/**
 * THIS IS GENERATED CODE!
 * PLEASE DO NOT MODIFY - ALL YOUR WORK WOULD BE LOST!
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, property = "_type")
@JsonTypeIdResolver(TeamAppsJacksonTypeIdResolver.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UiPopup extends UiComponent implements UiObject {


	protected UiComponentReference contentComponent;
	protected int width;
	protected int height;
	protected int x;
	protected int y;
	protected UiColor backgroundColor;
	protected boolean modal = false;
	protected UiColor dimmingColor = new UiColor(0, 0, 0).setAlpha(.2f);
	protected boolean closeOnEscape;
	protected boolean closeOnClickOutside;

	public UiPopup() {
		super();
	}

	@com.fasterxml.jackson.annotation.JsonIgnore
	public UiObjectType getUiObjectType() {
		return UiObjectType.UI_POPUP;
	}

	@SuppressWarnings("unchecked")
	public String toString() {
		return new StringBuilder(getClass().getSimpleName()).append(": ")
				.append("id=" + id).append(", ")
				.append("visible=" + visible).append(", ")
				.append("stylesBySelector=" + stylesBySelector).append(", ")
				.append("width=" + width).append(", ")
				.append("height=" + height).append(", ")
				.append("x=" + x).append(", ")
				.append("y=" + y).append(", ")
				.append("modal=" + modal).append(", ")
				.append("closeOnEscape=" + closeOnEscape).append(", ")
				.append("closeOnClickOutside=" + closeOnClickOutside).append(", ")
				.append(contentComponent != null ? "contentComponent={" + contentComponent.toString() + "}" : "").append(", ")
				.append(backgroundColor != null ? "backgroundColor={" + backgroundColor.toString() + "}" : "").append(", ")
				.append(dimmingColor != null ? "dimmingColor={" + dimmingColor.toString() + "}" : "")
				.toString();
	}

	@com.fasterxml.jackson.annotation.JsonGetter("contentComponent")
	public UiComponentReference getContentComponent() {
		return contentComponent;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("width")
	public int getWidth() {
		return width;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("height")
	public int getHeight() {
		return height;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("x")
	public int getX() {
		return x;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("y")
	public int getY() {
		return y;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("backgroundColor")
	public UiColor getBackgroundColor() {
		return backgroundColor;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("modal")
	public boolean getModal() {
		return modal;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("dimmingColor")
	public UiColor getDimmingColor() {
		return dimmingColor;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("closeOnEscape")
	public boolean getCloseOnEscape() {
		return closeOnEscape;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("closeOnClickOutside")
	public boolean getCloseOnClickOutside() {
		return closeOnClickOutside;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("id")
	public UiPopup setId(String id) {
		this.id = id;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("visible")
	public UiPopup setVisible(boolean visible) {
		this.visible = visible;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("stylesBySelector")
	public UiPopup setStylesBySelector(Map> stylesBySelector) {
		this.stylesBySelector = stylesBySelector;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("contentComponent")
	public UiPopup setContentComponent(UiComponentReference contentComponent) {
		this.contentComponent = contentComponent;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("width")
	public UiPopup setWidth(int width) {
		this.width = width;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("height")
	public UiPopup setHeight(int height) {
		this.height = height;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("x")
	public UiPopup setX(int x) {
		this.x = x;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("y")
	public UiPopup setY(int y) {
		this.y = y;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("backgroundColor")
	public UiPopup setBackgroundColor(UiColor backgroundColor) {
		this.backgroundColor = backgroundColor;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("modal")
	public UiPopup setModal(boolean modal) {
		this.modal = modal;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("dimmingColor")
	public UiPopup setDimmingColor(UiColor dimmingColor) {
		this.dimmingColor = dimmingColor;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("closeOnEscape")
	public UiPopup setCloseOnEscape(boolean closeOnEscape) {
		this.closeOnEscape = closeOnEscape;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("closeOnClickOutside")
	public UiPopup setCloseOnClickOutside(boolean closeOnClickOutside) {
		this.closeOnClickOutside = closeOnClickOutside;
		return this;
	}


	public static class SetBackgroundColorCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected UiColor backgroundColor;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public SetBackgroundColorCommand() {
			// default constructor for Jackson
		}

		public SetBackgroundColorCommand(String componentId, UiColor backgroundColor) {
			this.componentId = componentId;
			this.backgroundColor = backgroundColor;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append(backgroundColor != null ? "backgroundColor={" + backgroundColor.toString() + "}" : "")
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("backgroundColor")
		public UiColor getBackgroundColor() {
			return backgroundColor;
		}

	}

	public static class SetDimmingColorCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected UiColor backgroundColor;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public SetDimmingColorCommand() {
			// default constructor for Jackson
		}

		public SetDimmingColorCommand(String componentId, UiColor backgroundColor) {
			this.componentId = componentId;
			this.backgroundColor = backgroundColor;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append(backgroundColor != null ? "backgroundColor={" + backgroundColor.toString() + "}" : "")
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("backgroundColor")
		public UiColor getBackgroundColor() {
			return backgroundColor;
		}

	}

	public static class SetPositionCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected int x;
		protected int y;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public SetPositionCommand() {
			// default constructor for Jackson
		}

		public SetPositionCommand(String componentId, int x, int y) {
			this.componentId = componentId;
			this.x = x;
			this.y = y;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("x=" + x).append(", ")
					.append("y=" + y)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("x")
		public int getX() {
			return x;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("y")
		public int getY() {
			return y;
		}

	}

	public static class SetDimensionsCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected int width;
		protected int height;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public SetDimensionsCommand() {
			// default constructor for Jackson
		}

		public SetDimensionsCommand(String componentId, int width, int height) {
			this.componentId = componentId;
			this.width = width;
			this.height = height;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append("width=" + width).append(", ")
					.append("height=" + height)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("width")
		public int getWidth() {
			return width;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("height")
		public int getHeight() {
			return height;
		}

	}

	public static class CloseCommand implements UiCommand {

		@UiComponentId protected String componentId;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public CloseCommand() {
			// default constructor for Jackson
		}

		public CloseCommand(String componentId) {
			this.componentId = componentId;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId)
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

	}




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy