import java.util.*;

public class Widgets1 {
	private Map<String, Widget1> value = new HashMap<>();
	private CurScreen curScreen;
	private SwingPresenter presenter;
	public Map<String, Object> getValue() {
		Map<String, Object> value = new HashMap<>();
		for (String key: this.value.keySet()) {
			Widget1 widget = this.value.get(key);
			value.put(key, widget.getValue());
		}
		return value;
	}
	public void setValue(Map<String, Object> value) {
		for (String key: value.keySet()) {
			String type = "";
			if (((Map<String, Object>) value.get(key)).get("type") != null) type = (String) ((Map<String, Object>) value.get(key)).get("type");
			int y = 0;
			if (((Map<String, Object>) value.get(key)).get("y") != null) y = (int) ((Map<String, Object>) value.get(key)).get("y");
			int x = 0;
			if (((Map<String, Object>) value.get(key)).get("x") != null) x = (int) ((Map<String, Object>) value.get(key)).get("x");
			int height = 0;
			if (((Map<String, Object>) value.get(key)).get("height") != null) height = (int) ((Map<String, Object>) value.get(key)).get("height");
			String text = "";
			if (((Map<String, Object>) value.get(key)).get("text") != null) text = (String) ((Map<String, Object>) value.get(key)).get("text");
			boolean visible = false;
			if (((Map<String, Object>) value.get(key)).get("visible") != null) visible = (boolean) ((Map<String, Object>) value.get(key)).get("visible");
			int width = 0;
			if (((Map<String, Object>) value.get(key)).get("width") != null) width = (int) ((Map<String, Object>) value.get(key)).get("width");
			int state = 0;
			if (((Map<String, Object>) value.get(key)).get("state") != null) state = (int) ((Map<String, Object>) value.get(key)).get("state");
            Map<String, Map<String, Object>> data = null;
            if (((Map<String, Object>) value.get(key)).get("data") != null) data = (Map<String, Map<String, Object>>) ((Map<String, Object>) value.get(key)).get("data");
            List<String> columns = null;
            if (((Map<String, Object>) value.get(key)).get("columns") != null) columns = (List<String>) ((Map<String, Object>) value.get(key)).get("columns");
            String primaryKeyName = null;
            if (((Map<String, Object>) value.get(key)).get("primaryKeyName") != null) primaryKeyName = (String) ((Map<String, Object>) value.get(key)).get("primaryKeyName");
			this.value.put(key, new Widget1(type, text, visible, x, y, width, height, 0, data, columns, primaryKeyName, presenter));
		}
	}
	public Widget1 getWidget1(String wid) {
		return this.value.get(wid);
	}
	public void setReferences(Screen screen, CurScreen curScreen, SwingPresenter presenter, BusinessCardManagement businessCardManagement, Company company, Representative representative, Position position, Establishment establishment, Address1 address1, Address2 address2, Businessdescription1 businessdescription1, Businessdescription2 businessdescription2, Companyoverview companyoverview, URL URL, ContactPerson1 contactPerson1, Position1 position1, Tel1 tel1, Email1 email1, ContactPerson2 contactPerson2, Position2 position2, Tel2 tel2, Email2 email2, ContactPerson3 contactPerson3, Position3 position3, Tel3 tel3, Email3 email3, ContactPerson4 contactPerson4, Position4 position4, Tel4 tel4, Email4 email4, SearchCriteriaScreen searchCriteriaScreen, Search1 search1, Search2 search, Search3 search3, Search5 search5, Search6 search6, Result result) {
		this.curScreen = curScreen;
		this.presenter = presenter;
		for (Widget1 widget: value.values()) {
			widget.setReferences(screen, curScreen, presenter, businessCardManagement, company, representative, position, establishment, address1, address2, businessdescription1, businessdescription2, companyoverview, URL, contactPerson1, position1, tel1, email1, contactPerson2, position2, tel2, email2, contactPerson3, position3, tel3, email3, contactPerson4, position4, tel4, email4, searchCriteriaScreen, search1, search, search3, search5, search6, result);
		}
	}
}