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

com.openfin.desktop.LayoutContentOptionsImpl Maven / Gradle / Ivy

There is a newer version: 11.0.2
Show newest version
package com.openfin.desktop;

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

import org.json.JSONObject;

public class LayoutContentOptionsImpl extends JsonBean implements LayoutContentOptions {
	
	private List content;
	
	public LayoutContentOptionsImpl() {
	}
	
	public LayoutContentOptionsImpl(JSONObject json) {
		super(json);
		this.getContent();
	}
	
	@Override
	public String getType() {
		return this.getString("type");
	}
	
	public void setType(String type) {
		this.setString("type", type);
	}
	
	public String getComponentName() {
		return this.getString("componentName");
	}
	
	public void setComponentName(String componentName) {
		this.setString("componentName", componentName);
	}
	
	@Override
	public List getContent() {
		if (this.content == null && this.json.has("content")) {
			this.content = new ArrayList<>(this.getJsonBeanList("content", LayoutContentOptionsImpl.class));
		}
		return this.content;
	}
	
	public void setContent(LayoutContentOptions ... contentOptions) {
		this.content = new ArrayList<>(contentOptions.length);
		for (LayoutContentOptions opt : contentOptions) {
			this.content.add(opt);
		}
	}
	
	public void setContent(List content) {
		this.content = content;
	}
	
	@Override
	public JSONObject getJson() {
		this.setJsonArray("content", this.content);
		return super.getJson();
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy