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

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

There is a newer version: 0.9.191
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", defaultImpl = UiElegantPanel.class)
public class UiElegantPanel extends UiComponent implements UiObject {


	protected String bodyBackgroundColor = "rgba(255, 255, 255, .4)";
	protected UiClientObjectReference content;
	protected UiSpacing padding = new UiSpacing().setTop(20).setBottom(20);
	protected UiHorizontalElementAlignment horizontalContentAlignment = UiHorizontalElementAlignment.CENTER;
	protected int maxContentWidth = 0;

	public UiElegantPanel() {
		super();
	}

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

	@SuppressWarnings("unchecked")
	public String toString() {
		return new StringBuilder(getClass().getSimpleName()).append(": ")
				.append("id=" + id).append(", ")
				.append("debuggingId=" + debuggingId).append(", ")
				.append("classNamesBySelector=" + classNamesBySelector).append(", ")
				.append("visible=" + visible).append(", ")
				.append("stylesBySelector=" + stylesBySelector).append(", ")
				.append("attributesBySelector=" + attributesBySelector).append(", ")
				.append("bodyBackgroundColor=" + bodyBackgroundColor).append(", ")
				.append("horizontalContentAlignment=" + horizontalContentAlignment).append(", ")
				.append("maxContentWidth=" + maxContentWidth).append(", ")
				.append(content != null ? "content={" + content.toString() + "}" : "").append(", ")
				.append(padding != null ? "padding={" + padding.toString() + "}" : "")
				.toString();
	}

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

	@com.fasterxml.jackson.annotation.JsonGetter("content")
	public UiClientObjectReference getContent() {
		return content;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("padding")
	public UiSpacing getPadding() {
		return padding;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("horizontalContentAlignment")
	public UiHorizontalElementAlignment getHorizontalContentAlignment() {
		return horizontalContentAlignment;
	}

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

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

	@com.fasterxml.jackson.annotation.JsonSetter("debuggingId")
	public UiElegantPanel setDebuggingId(String debuggingId) {
		this.debuggingId = debuggingId;
		return this;
	}

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

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

	@com.fasterxml.jackson.annotation.JsonSetter("classNamesBySelector")
	public UiElegantPanel setClassNamesBySelector(Map> classNamesBySelector) {
		this.classNamesBySelector = classNamesBySelector;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("attributesBySelector")
	public UiElegantPanel setAttributesBySelector(Map> attributesBySelector) {
		this.attributesBySelector = attributesBySelector;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("bodyBackgroundColor")
	public UiElegantPanel setBodyBackgroundColor(String bodyBackgroundColor) {
		this.bodyBackgroundColor = bodyBackgroundColor;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("content")
	public UiElegantPanel setContent(UiClientObjectReference content) {
		this.content = content;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("padding")
	public UiElegantPanel setPadding(UiSpacing padding) {
		this.padding = padding;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("horizontalContentAlignment")
	public UiElegantPanel setHorizontalContentAlignment(UiHorizontalElementAlignment horizontalContentAlignment) {
		this.horizontalContentAlignment = horizontalContentAlignment;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("maxContentWidth")
	public UiElegantPanel setMaxContentWidth(int maxContentWidth) {
		this.maxContentWidth = maxContentWidth;
		return this;
	}



	public static class SetContentCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected UiClientObjectReference content;

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

		public SetContentCommand(String componentId, UiClientObjectReference content) {
			this.componentId = componentId;
			this.content = content;
		}

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

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

		@com.fasterxml.jackson.annotation.JsonGetter("content")
		public UiClientObjectReference getContent() {
			return content;
		}

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy