org.teamapps.dto.AbstractUiChart Maven / Gradle / Ivy
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 AbstractUiChart extends UiComponent implements UiObject {
protected long initialAnimationDuration = 200;
protected UiChartLegendStyle legendStyle = UiChartLegendStyle.INLINE;
public AbstractUiChart() {
super();
}
@com.fasterxml.jackson.annotation.JsonIgnore
public UiObjectType getUiObjectType() {
return UiObjectType.ABSTRACT_UI_CHART;
}
@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("initialAnimationDuration=" + initialAnimationDuration).append(", ")
.append("legendStyle=" + legendStyle)
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("initialAnimationDuration")
public long getInitialAnimationDuration() {
return initialAnimationDuration;
}
@com.fasterxml.jackson.annotation.JsonGetter("legendStyle")
public UiChartLegendStyle getLegendStyle() {
return legendStyle;
}
@com.fasterxml.jackson.annotation.JsonSetter("id")
public AbstractUiChart setId(String id) {
this.id = id;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("debuggingId")
public AbstractUiChart setDebuggingId(String debuggingId) {
this.debuggingId = debuggingId;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("visible")
public AbstractUiChart setVisible(boolean visible) {
this.visible = visible;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("stylesBySelector")
public AbstractUiChart setStylesBySelector(Map> stylesBySelector) {
this.stylesBySelector = stylesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("classNamesBySelector")
public AbstractUiChart setClassNamesBySelector(Map> classNamesBySelector) {
this.classNamesBySelector = classNamesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("attributesBySelector")
public AbstractUiChart setAttributesBySelector(Map> attributesBySelector) {
this.attributesBySelector = attributesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("initialAnimationDuration")
public AbstractUiChart setInitialAnimationDuration(long initialAnimationDuration) {
this.initialAnimationDuration = initialAnimationDuration;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("legendStyle")
public AbstractUiChart setLegendStyle(UiChartLegendStyle legendStyle) {
this.legendStyle = legendStyle;
return this;
}
public static class SetLegendStyleCommand implements UiCommand {
@UiComponentId protected String componentId;
protected UiChartLegendStyle legendStyle;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public SetLegendStyleCommand() {
// default constructor for Jackson
}
public SetLegendStyleCommand(String componentId, UiChartLegendStyle legendStyle) {
this.componentId = componentId;
this.legendStyle = legendStyle;
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("componentId=" + componentId).append(", ")
.append("legendStyle=" + legendStyle)
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("componentId")
public String getComponentId() {
return componentId;
}
@com.fasterxml.jackson.annotation.JsonGetter("legendStyle")
public UiChartLegendStyle getLegendStyle() {
return legendStyle;
}
}
}