diff --git a/src/BusinessCardManagement.java b/src/BusinessCardManagement.java index 7983c15..40107bb 100644 --- a/src/BusinessCardManagement.java +++ b/src/BusinessCardManagement.java @@ -61,9 +61,9 @@ private Editbusiness1 editbusiness1; private Text text; private Map value = new HashMap<>(); - private Widget widget; - private Widget widget; - private Widget widget; + private Widget1 widget; + private Widget1 widget; + private Widget1 widget; public BusinessCardManagement(ScreenTemplates screenTemplates, Screen screen, W4ca84254d30c423ab8e449171a5b5123 w4ca84254d30c423ab8e449171a5b5123, SearchScreen searchScreen, Text text, Text text, Text text, Address2 address2, Address1 address1, Text text, Businessdescription2 businessdescription2, Text text, Text text, Establishment establishment, Text text, Businessdescription1 businessdescription1, URL URL, Text text, BusinessCardManagement businessCardManagement, Companyoverview companyoverview, Company company, Text text, Position position, Representative representative, Text text, SearchCriteriaScreen searchCriteriaScreen, Result Result, Text text, Text text, Text text, Text text, Search2 search2, Search3 search3, Search1 search1, Text text, Search6 search6, Search5 search5, CompanyList companyList, W2d109ad3739d4744a1874ac179fc38b9 w2d109ad3739d4744a1874ac179fc38b9, Editaddress2 editaddress2, Text text, Text text, Text text, Text text, Text text, Editestablish editestablish, Editaddress1 editaddress1, Editrepresentative editrepresentative, Text text, EditURL editURL, Editposition editposition, Editbusiness2 editbusiness2, Text text, Text text, Editcompany editcompany, Editcompanydetail editcompanydetail, Text text, Editbusiness1 editbusiness1, Text text) { this.screenTemplates = screenTemplates; this.screen = screen; @@ -134,43 +134,43 @@ public void updateFromState(String scId, String wid, int state, String text, String text, String text, String address2, String address1, String text, String businessdescription2, String text, String text, String establishment, String text, String businessdescription1, String uRL, String text, String companyoverview, String company, String text, String position, String representative, String text) { String searchCriteriaScreen = this.searchCriteriaScreen.getValue(); String result = this.result.getValue(); - this.widget = screenTemplates.getScreenTemplate(searchCriteriaScreen.getValue()).getWidgets().getWidget(result.getValue()); + this.widget = screenTemplates.getScreenTemplate(searchCriteriaScreen.getValue()).getWidgets().getWidget1(result.getValue()); this.widget.updateDataFromBusinessCardManagement2(this.value, searchCriteriaScreen, result); String w4ca84254d30c423ab8e449171a5b5123 = this.w4ca84254d30c423ab8e449171a5b5123.getValue(); String searchScreen = this.searchScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(searchScreen.getValue()).getWidgets().getWidget(w4ca84254d30c423ab8e449171a5b5123.getValue()); + this.widget = screenTemplates.getScreenTemplate(searchScreen.getValue()).getWidgets().getWidget1(w4ca84254d30c423ab8e449171a5b5123.getValue()); this.widget.updateDataFromBusinessCardManagement3(this.value, w4ca84254d30c423ab8e449171a5b5123, searchScreen); String w2d109ad3739d4744a1874ac179fc38b9 = this.w2d109ad3739d4744a1874ac179fc38b9.getValue(); String companyList = this.companyList.getValue(); - this.widget = screenTemplates.getScreenTemplate(companyList.getValue()).getWidgets().getWidget(w2d109ad3739d4744a1874ac179fc38b9.getValue()); + this.widget = screenTemplates.getScreenTemplate(companyList.getValue()).getWidgets().getWidget1(w2d109ad3739d4744a1874ac179fc38b9.getValue()); this.widget.updateDataFromBusinessCardManagement(this.value, w2d109ad3739d4744a1874ac179fc38b9, companyList); } public void updateFromState2(String scId, String wid, int state, String address2, String text, String address1, String text, String establishment, String text, String text, String company, String position, String text, String representative, String text) { String searchCriteriaScreen = this.searchCriteriaScreen.getValue(); String result = this.result.getValue(); - this.widget = screenTemplates.getScreenTemplate(searchCriteriaScreen.getValue()).getWidgets().getWidget(result.getValue()); + this.widget = screenTemplates.getScreenTemplate(searchCriteriaScreen.getValue()).getWidgets().getWidget1(result.getValue()); this.widget.updateDataFromBusinessCardManagement2(this.value, searchCriteriaScreen, result); String w4ca84254d30c423ab8e449171a5b5123 = this.w4ca84254d30c423ab8e449171a5b5123.getValue(); String searchScreen = this.searchScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(searchScreen.getValue()).getWidgets().getWidget(w4ca84254d30c423ab8e449171a5b5123.getValue()); + this.widget = screenTemplates.getScreenTemplate(searchScreen.getValue()).getWidgets().getWidget1(w4ca84254d30c423ab8e449171a5b5123.getValue()); this.widget.updateDataFromBusinessCardManagement3(this.value, w4ca84254d30c423ab8e449171a5b5123, searchScreen); String w2d109ad3739d4744a1874ac179fc38b9 = this.w2d109ad3739d4744a1874ac179fc38b9.getValue(); String companyList = this.companyList.getValue(); - this.widget = screenTemplates.getScreenTemplate(companyList.getValue()).getWidgets().getWidget(w2d109ad3739d4744a1874ac179fc38b9.getValue()); + this.widget = screenTemplates.getScreenTemplate(companyList.getValue()).getWidgets().getWidget1(w2d109ad3739d4744a1874ac179fc38b9.getValue()); this.widget.updateDataFromBusinessCardManagement(this.value, w2d109ad3739d4744a1874ac179fc38b9, companyList); } public void updateFromState3(String scId, String wid, int state, String editaddress2, String text, String text, String text, String text, String text, String editestablish, String editaddress1, String editrepresentative, String text, String editURL, String editposition, String editbusiness2, String text, String text, String editcompany, String editcompanydetail, String text, String editbusiness1, String text) { String searchCriteriaScreen = this.searchCriteriaScreen.getValue(); String result = this.result.getValue(); - this.widget = screenTemplates.getScreenTemplate(searchCriteriaScreen.getValue()).getWidgets().getWidget(result.getValue()); + this.widget = screenTemplates.getScreenTemplate(searchCriteriaScreen.getValue()).getWidgets().getWidget1(result.getValue()); this.widget.updateDataFromBusinessCardManagement2(this.value, searchCriteriaScreen, result); String w4ca84254d30c423ab8e449171a5b5123 = this.w4ca84254d30c423ab8e449171a5b5123.getValue(); String searchScreen = this.searchScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(searchScreen.getValue()).getWidgets().getWidget(w4ca84254d30c423ab8e449171a5b5123.getValue()); + this.widget = screenTemplates.getScreenTemplate(searchScreen.getValue()).getWidgets().getWidget1(w4ca84254d30c423ab8e449171a5b5123.getValue()); this.widget.updateDataFromBusinessCardManagement3(this.value, w4ca84254d30c423ab8e449171a5b5123, searchScreen); String w2d109ad3739d4744a1874ac179fc38b9 = this.w2d109ad3739d4744a1874ac179fc38b9.getValue(); String companyList = this.companyList.getValue(); - this.widget = screenTemplates.getScreenTemplate(companyList.getValue()).getWidgets().getWidget(w2d109ad3739d4744a1874ac179fc38b9.getValue()); + this.widget = screenTemplates.getScreenTemplate(companyList.getValue()).getWidgets().getWidget1(w2d109ad3739d4744a1874ac179fc38b9.getValue()); this.widget.updateDataFromBusinessCardManagement(this.value, w2d109ad3739d4744a1874ac179fc38b9, companyList); Map temp_if12; if ((((state==0)&&!text.equals(""))&&this.value.containsKey(text))) { @@ -184,15 +184,15 @@ public void addBusinessCardManagement(String representative, String title, String establishment, String address1, String address2, String businessDescription1, String businessDescription2, String companyOverview, String URL, String companyName) { String searchCriteriaScreen = this.searchCriteriaScreen.getValue(); String result = this.result.getValue(); - this.widget = screenTemplates.getScreenTemplate(searchCriteriaScreen.getValue()).getWidgets().getWidget(result.getValue()); + this.widget = screenTemplates.getScreenTemplate(searchCriteriaScreen.getValue()).getWidgets().getWidget1(result.getValue()); this.widget.updateDataFromBusinessCardManagement2(this.value, searchCriteriaScreen, result); String w4ca84254d30c423ab8e449171a5b5123 = this.w4ca84254d30c423ab8e449171a5b5123.getValue(); String searchScreen = this.searchScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(searchScreen.getValue()).getWidgets().getWidget(w4ca84254d30c423ab8e449171a5b5123.getValue()); + this.widget = screenTemplates.getScreenTemplate(searchScreen.getValue()).getWidgets().getWidget1(w4ca84254d30c423ab8e449171a5b5123.getValue()); this.widget.updateDataFromBusinessCardManagement3(this.value, w4ca84254d30c423ab8e449171a5b5123, searchScreen); String w2d109ad3739d4744a1874ac179fc38b9 = this.w2d109ad3739d4744a1874ac179fc38b9.getValue(); String companyList = this.companyList.getValue(); - this.widget = screenTemplates.getScreenTemplate(companyList.getValue()).getWidgets().getWidget(w2d109ad3739d4744a1874ac179fc38b9.getValue()); + this.widget = screenTemplates.getScreenTemplate(companyList.getValue()).getWidgets().getWidget1(w2d109ad3739d4744a1874ac179fc38b9.getValue()); this.widget.updateDataFromBusinessCardManagement(this.value, w2d109ad3739d4744a1874ac179fc38b9, companyList); this.value.put(companyName,new BusinessCardManagementElement(address2, address1, establishment, title, businessDescription1, representative, companyOverview, uRL, businessDescription2)); } diff --git a/src/BusinessCardManagementElement.java b/src/BusinessCardManagementElement.java index 5875342..593a2c3 100644 --- a/src/BusinessCardManagementElement.java +++ b/src/BusinessCardManagementElement.java @@ -5,7 +5,7 @@ private String address1; private String establishment; private String companyOverview; - private String uRL; + private String URL; private String businessDescription2; private String title; private String businessDescription1; @@ -51,7 +51,7 @@ return this.URL; } public void changeURLOfBusinessCardManagement(String companyName, String newURL) { - this.uRL = newURL; + this.URL = newURL; } public String getBusinessDescription2() { return this.businessDescription2; @@ -85,7 +85,7 @@ this.businessDescription1 = businessDescription1; this.representative = representative; this.companyOverview = companyOverview; - this.uRL = uRL; + this.URL = uRL; this.businessDescription2 = businessDescription2; } } \ No newline at end of file diff --git a/src/CurScreen.java b/src/CurScreen.java index 3155fb4..8df97a8 100644 --- a/src/CurScreen.java +++ b/src/CurScreen.java @@ -1,17 +1,13 @@ import java.util.*; public class CurScreen { + private String value = "企業一覧"; private ScreenTemplates screenTemplates; private Screen screen; - private ScreenTemplates screenTemplates; private CurScreen curScreen; - private String value = "企業一覧"; - private Screen screen; - public CurScreen(ScreenTemplates screenTemplates, Screen screen, ScreenTemplates screenTemplates, CurScreen curScreen) { + public CurScreen(Screen screen, ScreenTemplates screenTemplates) { this.screenTemplates = screenTemplates; this.screen = screen; - this.screenTemplates = screenTemplates; - this.curScreen = curScreen; } public String getValue() { return new String(this.value); @@ -24,8 +20,7 @@ temp_if2 = this.value; } this.value = temp_if2; - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); this.screen.updateFromCurScreen(this.value, screenTemplate); } public void updateFromState2(String scId, String wid, int state) { @@ -36,9 +31,8 @@ temp_if3 = this.value; } this.value = temp_if3; - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); - this.screen.updateFromCurScreen(this.value, screenTemplate); + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); + this.screen.updateFromCurScreen(this.value, screenTemplate); } public void updateFromState3(String scId, String wid, int state) { String temp_if4; @@ -48,9 +42,8 @@ temp_if4 = this.value; } this.value = temp_if4; - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); - this.screen.updateFromCurScreen(this.value, screenTemplate); + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); + this.screen.updateFromCurScreen(this.value, screenTemplate); } public void updateFromState4(String scId, String wid, int state) { String temp_if5; @@ -60,9 +53,8 @@ temp_if5 = this.value; } this.value = temp_if5; - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); - this.screen.updateFromCurScreen(this.value, screenTemplate); + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); + this.screen.updateFromCurScreen(this.value, screenTemplate); } public void updateFromState5(String scId, String wid, int state) { String temp_if6; @@ -72,9 +64,8 @@ temp_if6 = this.value; } this.value = temp_if6; - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); - this.screen.updateFromCurScreen(this.value, screenTemplate); + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); + this.screen.updateFromCurScreen(this.value, screenTemplate); } public void updateFromState6(String scId, String wid, int state) { String temp_if7; @@ -84,32 +75,29 @@ temp_if7 = this.value; } this.value = temp_if7; - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); - this.screen.updateFromCurScreen(this.value, screenTemplate); + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); + this.screen.updateFromCurScreen(this.value, screenTemplate); } - public void updateFromState7(String scId, String wid, int state, String editaddress2, String text, String text, String text, String text, String text, String editestablish, String editaddress1, String editrepresentative, String text, String editURL, String editposition, String editbusiness2, Map> businessCardManagement, String text, String text, String editcompany, String editcompanydetail, String text, String editbusiness1, String text) { + public void updateFromState7(String scId, String wid, String text, int state, String editcompany, String editrepresentative, String editposition, String editaddress1, String editaddress2, String editestablish, String editURL, String editbusiness1, String editbusiness2, String editcompanydetail, Map> businessCardManagement) { String temp_if9; if ((state==0)) { String temp_if8; - if ((!text.equals("")&&businessCardManagement.containsKey(text))) { - temp_if8 = "企業一覧"; - } else { - temp_if8 = this.value; - } + if ((!text.equals("")&&businessCardManagement.containsKey(text))) { + temp_if8 = "企業一覧"; + } else { + temp_if8 = this.value; + } temp_if9 = temp_if8; } else { temp_if9 = this.value; } this.value = temp_if9; - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); - this.screen.updateFromCurScreen(this.value, screenTemplate); + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); + this.screen.updateFromCurScreen(this.value, screenTemplate); } - public void updateFromState8(String scId, String wid, int state, String address2, String text, String address1, String text, String establishment, String text, String text, Map> businessCardManagement, String company, String position, String text, String representative, String text) { - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); - this.screen.updateFromCurScreen(this.value, screenTemplate); + public void updateFromState8(String scId, String wid, String text, int state, String company, String representative, String position, String address1, String address2, String establishment, Map> businessCardManagement) { + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); + this.screen.updateFromCurScreen(this.value, screenTemplate); } public void updateFromState9(String scId, String wid, int state) { String temp_if10; @@ -119,9 +107,8 @@ temp_if10 = this.value; } this.value = temp_if10; - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); - this.screen.updateFromCurScreen(this.value, screenTemplate); + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); + this.screen.updateFromCurScreen(this.value, screenTemplate); } public void updateFromState10(String scId, String wid, int state) { String temp_if11; @@ -131,14 +118,12 @@ temp_if11 = this.value; } this.value = temp_if11; - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); - this.screen.updateFromCurScreen(this.value, screenTemplate); + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); + this.screen.updateFromCurScreen(this.value, screenTemplate); } public void changeCurScreen(String nextScId) { this.value = nextScId; - Map screenTemplate = this.screenTemplate.getValue(); - this.screenTemplate = screenTemplates.getScreenTemplate(curScreen.getValue()); - this.screen.updateFromCurScreen(this.value, screenTemplate); + Map screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue(); + this.screen.updateFromCurScreen(this.value, screenTemplate); } } \ No newline at end of file diff --git a/src/Main.java b/src/Main.java index 9dd31c1..8b83cff 100644 --- a/src/Main.java +++ b/src/Main.java @@ -7,7 +7,7 @@ private CompanyList companyList; private W4ca84254d30c423ab8e449171a5b5123 w4ca84254d30c423ab8e449171a5b5123; private Editbusiness1 editbusiness1; - private Result Result; + private Result result; private Businessdescription2 businessdescription2; private Editaddress1 editaddress1; private Search1 search1; @@ -37,13 +37,18 @@ private URL URL; private Search3 search3; public Main() { - this.screen = new Screen(screenTemplates); - this.address1 = new Address1(screen); - this.screenTemplates = new ScreenTemplates(screen); - this.companyList = new CompanyList(screenTemplates); + StartupManagementWindow window = new StartupManagementWindow(this); + SwingPresenter presenter = window.getPresenter(); + this.screenTemplates = new ScreenTemplates(); + this.screen = new Screen(screenTemplates, true, presenter); + this.curScreen = new CurScreen(screen, screenTemplates); + this.screenTemplates.setCurScreen(curScreen); + this.screen.setCurScreen(curScreen); + this.address1 = new Address1(screen); + this.companyList = new CompanyList(screenTemplates); this.w4ca84254d30c423ab8e449171a5b5123 = new W4ca84254d30c423ab8e449171a5b5123(screenTemplates); this.editbusiness1 = new Editbusiness1(screen); - this.Result = new Result(screenTemplates, screen); + this.result = new Result(screenTemplates, screen); this.businessdescription2 = new Businessdescription2(screen); this.editaddress1 = new Editaddress1(screen); this.search1 = new Search1(screen); @@ -67,39 +72,87 @@ this.editaddress2 = new Editaddress2(screen); this.search2 = new Search2(screen); this.establishment = new Establishment(screen); - this.curScreen = new CurScreen(screen, screenTemplates, screen); this.searchCriteriaScreen = new SearchCriteriaScreen(screenTemplates, screen); this.businessCardManagement = new BusinessCardManagement(widgets, screenTemplates, screen); this.URL = new URL(screen); this.search3 = new Search3(screen); + changeCurScreen("企業一覧"); } - public Map getBusinessCardManagementElement(String companyName) { - return this.businessCardManagement.getBusinessCardManagementElement(companyName).getValue(); + public Map getScreen() { + return this.screen.getValue(); + } + public Map getWidgets() { + return this.screen.getWidgets().getValue(); + } + public Map getWidget(String wid) { + return this.screen.getWidgets().getWidget(wid).getValue(); + } + public Map getScreenTemplates() { + return this.screenTemplates.getValue(); + } + public Map getScreenTemplate(String screenId) { + return this.screenTemplates.getScreenTemplate(screenId).getValue(); + } + public Map getWidgets1(String curScId) { + return this.screenTemplates.getScreenTemplate(curScId).getWidgets1().getValue(); } - public Map getWidget(String scId, String wid) { - return this.screenTemplates.getScreenTemplate(scId).getWidgets().getWidget(wid).getValue(); - } - public Map getWidgets(String curScId) { - return this.screenTemplates.getScreenTemplate(curScId).getWidgets().getValue(); - } - public Map getWidgets1() { - return this.screen.getWidgets1().getValue(); - } - public Map getScreenTemplate(String screenId) { - return this.screenTemplates.getScreenTemplate(screenId).getValue(); - } - public Map getWidget1(String wid) { - return this.screen.getWidgets1().getWidget1(wid).getValue(); - } - public Map getScreen() { - return this.screen.getValue(); - } + public Map getWidget1(String scId, String wid) { + return this.screenTemplates.getScreenTemplate(scId).getWidgets1().getWidget1(wid).getValue(); + } + public String getCurScreen() { + return this.curScreen.getValue(); + } + public boolean getLayout() { + return this.screen.getLayout(); + } + public String getText(String editcompanydetail) { + return this.screen.getWidgets().getWidget(editcompanydetail).getText(); + } + public String getText(String curScId, String wid) { + return this.screenTemplates.getScreenTemplate(curScId).getWidgets1().getWidget1(wid).getText(); + } + public int getX(String wid) { + return this.screen.getWidgets().getWidget(wid).getX(); + } + public int getY(String wid) { + return this.screen.getWidgets().getWidget(wid).getY(); + } + public int getWidth(String wid) { + return this.screen.getWidgets().getWidget(wid).getWidth(); + } + public int getHeight(String wid) { + return this.screen.getWidgets().getWidget(wid).getHeight(); + } + public boolean getVisible(String wid) { + return this.screen.getWidgets().getWidget(wid).getVisible(); + } + public int getState(String wid) { + return this.screen.getWidgets().getWidget(wid).getState(); + } + public int getState(String scId, String wid) { + return this.screenTemplates.getScreenTemplate(scId).getWidgets1().getWidget1(wid).getState(); + } + public Map> getData(String wid) { + return this.screen.getWidgets().getWidget(wid).getData(); + } + public Map> getData(String scId, String wid) { + return this.screenTemplates.getScreenTemplate(scId).getWidgets1().getWidget1(wid).getData(); + } + public void changeCurScreen(String nextScId) { + this.curScreen.changeCurScreen(nextScId); + } + public void textEvent(String wid, String nextText) { + this.screen.getWidgets().getWidget(wid).textEvent(wid, nextText); + } + public void mouseEvent(String wid, int nextState) { + this.screen.getWidgets().getWidget(wid).mouseEvent(wid, nextState); + } + public Map getBusinessCardManagementElement(String companyName) { + return this.businessCardManagement.getBusinessCardManagementElement(companyName).getValue(); + } public String getAddress1() { return this.address1.getValue(); } - public Map getScreenTemplates() { - return this.screenTemplates.getValue(); - } public String getCompanyList() { return this.companyList.getValue(); } @@ -181,27 +234,18 @@ public String getEstablishment() { return this.establishment.getValue(); } - public String getCurScreen() { - return this.curScreen.getValue(); - } - public String getSearchCriteriaScreen() { - return this.searchCriteriaScreen.getValue(); - } - public Map getBusinessCardManagement() { - return this.businessCardManagement.getValue(); - } - public String getURL() { - return this.uRL.getValue(); - } - public String getSearch3() { - return this.search3.getValue(); - } - public String getText(String editcompanydetail) { - return this.screen.getWidgets1().getWidget1(editcompanydetail).getText(); - } - public void textEvent(String wid, String nextText) { - this.screen.getWidgets1().getWidget1(wid).textEvent(wid, nextText); - } + public String getSearchCriteriaScreen() { + return this.searchCriteriaScreen.getValue(); + } + public Map getBusinessCardManagement() { + return this.businessCardManagement.getValue(); + } + public String getURL() { + return this.URL.getValue(); + } + public String getSearch3() { + return this.search3.getValue(); + } public String getAddress2(String companyName) { return this.businessCardManagement.getBusinessCardManagementElement(companyName).getAddress2(); } @@ -214,63 +258,30 @@ public void changeAddress1OfBusinessCardManagement(String companyName, String newAddress1) { this.businessCardManagement.getBusinessCardManagementElement(companyName).changeAddress1OfBusinessCardManagement(companyName, newAddress1); } - public int getY(String wid) { - return this.screen.getWidgets1().getWidget1(wid).getY(); - } - public int getWidth(String wid) { - return this.screen.getWidgets1().getWidget1(wid).getWidth(); - } - public String getText(String curScId, String wid) { - return this.screenTemplates.getScreenTemplate(curScId).getWidgets().getWidget(wid).getText(); - } - public boolean getLayout() { - return this.screen.getLayout(); - } - public int getHeight(String wid) { - return this.screen.getWidgets1().getWidget1(wid).getHeight(); - } public String getEstablishment(String companyName) { return this.businessCardManagement.getBusinessCardManagementElement(companyName).getEstablishment(); } public void changeEstablishmentOfBusinessCardManagement(String companyName, String newEstablishment) { this.businessCardManagement.getBusinessCardManagementElement(companyName).changeEstablishmentOfBusinessCardManagement(companyName, newEstablishment); } - public Map> getData(String wid) { - return this.screen.getWidgets1().getWidget1(wid).getData(); - } public String getCompanyOverview(String companyName) { return this.businessCardManagement.getBusinessCardManagementElement(companyName).getCompanyOverview(); } public void changeCompanyOverviewOfBusinessCardManagement(String companyName, String newCompanyOverview) { this.businessCardManagement.getBusinessCardManagementElement(companyName).changeCompanyOverviewOfBusinessCardManagement(companyName, newCompanyOverview); } - public Map> getData(String scId, String wid) { - return this.screenTemplates.getScreenTemplate(scId).getWidgets().getWidget(wid).getData(); - } public String getURL(String companyName) { return this.businessCardManagement.getBusinessCardManagementElement(companyName).getURL(); } public void changeURLOfBusinessCardManagement(String companyName, String newURL) { this.businessCardManagement.getBusinessCardManagementElement(companyName).changeURLOfBusinessCardManagement(companyName, newURL); } - public boolean getVisible(String wid) { - return this.screen.getWidgets1().getWidget1(wid).getVisible(); - } public String getBusinessDescription2(String companyName) { return this.businessCardManagement.getBusinessCardManagementElement(companyName).getBusinessDescription2(); } public void changeBusinessDescription2OfBusinessCardManagement(String companyName, String newBusinessDescription2) { this.businessCardManagement.getBusinessCardManagementElement(companyName).changeBusinessDescription2OfBusinessCardManagement(companyName, newBusinessDescription2); } - public int getX(String wid) { - return this.screen.getWidgets1().getWidget1(wid).getX(); - } - public void changeCurScreen(String nextScId) { - this.curScreen.changeCurScreen(nextScId); - } - public int getState(String scId, String wid) { - return this.screenTemplates.getScreenTemplate(scId).getWidgets().getWidget(wid).getState(); - } public void addBusinessCardManagement(String representative, String title, String establishment, String address1, String address2, String businessDescription1, String businessDescription2, String companyOverview, String URL, String companyName) { this.businessCardManagement.addBusinessCardManagement(representative, title, establishment, address1, address2, businessDescription1, businessDescription2, companyOverview, URL, companyName); } @@ -292,10 +303,4 @@ public void changeRepresentativeOfBusinessCardManagement(String companyName, String newRepresentative) { this.businessCardManagement.getBusinessCardManagementElement(companyName).changeRepresentativeOfBusinessCardManagement(companyName, newRepresentative); } - public int getState(String wid) { - return this.screen.getWidgets1().getWidget1(wid).getState(); - } - public void mouseEvent(String wid, int nextState) { - this.screen.getWidgets1().getWidget1(wid).mouseEvent(wid, nextState); - } } \ No newline at end of file diff --git a/src/Screen.java b/src/Screen.java index 51845e7..5a63353 100644 --- a/src/Screen.java +++ b/src/Screen.java @@ -1,29 +1,47 @@ import java.util.*; public class Screen { - private ScreenTemplates screenTemplates; - private Widgets1 widgets = new Widgets1(); - private boolean layout; - private SwingPresenter presenter; - public Screen(ScreenTemplates screenTemplates, boolean layout, SwingPresenter presenter) { - this.screenTemplates = screenTemplates; - this.layout = layout; - this.presenter = presenter; - } - public Map getValue() { - Map temp_nil4 = new HashMap<>(); - temp_nil4.put("widgets",this.widgets.getValue()); - temp_nil4.put("layout",this.getLayout()); - return temp_nil4; - } - public Widgets1 getWidgets1() { - return this.widgets; - } - public boolean getLayout() { - return this.layout; - } - public void updateFromCurScreen(String curScreen, Map screenTemplate) { - this.value = screenTemplate; - this.presenter.update(this.value, this.screenTemplate); - } + private ScreenTemplates screenTemplates; + private Widgets widgets; + private boolean layout; + private String screenId; + private SwingPresenter presenter; + public Screen(ScreenTemplates screenTemplates, boolean layout, SwingPresenter presenter) { + this.screenTemplates = screenTemplates; + this.layout = layout; + this.widgets = new Widgets1(screenTemplates, presenter); + this.presenter = presenter; + } + public Map getValue() { + Map temp_nil3 = new HashMap<>(); + temp_nil3.put("widgets",this.widgets.getValue()); + temp_nil3.put("layout",this.getLayout()); + temp_nil3.put("screenId",this.getScreenId()); + return temp_nil3; + } + public void setValue(Map value) { + this.widgets.setValue((Map) value.get("widgets")); + this.layout = (boolean) value.get("layout"); + this.screenId = (String) value.get("screenId"); + } + public Widgets getWidgets() { + return this.widgets; + } + public boolean getLayout() { + return this.layout; + } + public String getScreenId() { + return this.screenId; + } + public void changeLayout(boolean layout) { + this.layout = layout; + presenter.setLayout(layout); + } + public void setCurScreen(CurScreen curScreen) { + widgets.setCurScreen(curScreen); + } + public void updateFromCurScreen(String curScreen, Map value) { + presenter.screenUpdate(getValue(), value); + setValue(value); + } } \ No newline at end of file diff --git a/src/ScreenTemplate.java b/src/ScreenTemplate.java index eeac2be..930f3a4 100644 --- a/src/ScreenTemplate.java +++ b/src/ScreenTemplate.java @@ -1,13 +1,35 @@ import java.util.*; public class ScreenTemplate { - private Widgets widgets = new Widgets(); - public Map getValue() { - Map temp_nil2 = new HashMap<>(); - temp_nil2.put("widgets",this.widgets.getValue()); - return temp_nil2; - } - public Widgets getWidgets() { - return this.widgets; - } + private CurScreen curScreen; + private Widgets1 widgets; + private boolean layout; + private String screenId; + public Map getValue() { + Map temp_nil1 = new HashMap<>(); + temp_nil1.put("widgets",this.widgets.getValue()); + temp_nil1.put("layout",this.getLayout()); + temp_nil1.put("screenId",this.getScreenId()); + return temp_nil1; + } + public void setValue(Map value) { + widgets.setValue((Map) value.get("widgets")); + layout = (boolean) value.get("layout"); + screenId = (String) value.get("screenId"); + } + public Widgets1 getWidgets1() { + return this.widgets; + } + public boolean getLayout() { + return layout; + } + public String getScreenId() { + return this.screenId; + } + public ScreenTemplate() { + this.widgets = new Widgets1(); + } + public void setCurScreen(CurScreen curScreen) { + this.widgets.setCurScreen(curScreen); + } } \ No newline at end of file diff --git a/src/ScreenTemplates.java b/src/ScreenTemplates.java index f07bc25..e279d8f 100644 --- a/src/ScreenTemplates.java +++ b/src/ScreenTemplates.java @@ -1,788 +1,800 @@ import java.util.*; public class ScreenTemplates { - private Screen screen; - private Map value; -{ -Map temp_json5 = new HashMap<>(); -temp_json5.put("事業内容1", "_"); -temp_json5.put("役職", "_"); -temp_json5.put("住所1", "_"); -temp_json5.put("事業内容2", "_"); -temp_json5.put("担当者1", "_"); -temp_json5.put("住所2", "_"); -temp_json5.put("電話番号1", "_"); -temp_json5.put("代表者", "_"); -temp_json5.put("会社概要", "_"); -temp_json5.put("URL", "_"); -temp_json5.put("設立", "_"); -Map temp_json4 = new HashMap<>(); -temp_json4.put("_", temp_json5); -new ArrayList<>().add("電話番号1"); -new ArrayList<>().add("担当者1"); -new ArrayList<>().add("URL"); -new ArrayList<>().add("会社概要"); -new ArrayList<>().add("事業内容2"); -new ArrayList<>().add("事業内容1"); -new ArrayList<>().add("住所2"); -new ArrayList<>().add("住所1"); -new ArrayList<>().add("設立"); -new ArrayList<>().add("役職"); -new ArrayList<>().add("代表者"); -Map temp_json3 = new HashMap<>(); -temp_json3.put("visible", true); -temp_json3.put("data", temp_json4); -temp_json3.put("columns", new ArrayList<>()); -temp_json3.put("x", 74); -temp_json3.put("width", 2325); -temp_json3.put("y", 267); -temp_json3.put("text", ""); -temp_json3.put("type", "table"); -temp_json3.put("primaryKeyName", "会社名"); -temp_json3.put("height", 1136); -Map temp_json6 = new HashMap<>(); -temp_json6.put("visible", true); -temp_json6.put("x", 2070); -temp_json6.put("width", 237); -temp_json6.put("y", 112); -temp_json6.put("text", "戻る"); -temp_json6.put("type", "button"); -temp_json6.put("height", 96); -Map temp_json7 = new HashMap<>(); -temp_json7.put("visible", true); -temp_json7.put("x", 120); -temp_json7.put("width", 320); -temp_json7.put("y", 86); -temp_json7.put("text", "検索画面"); -temp_json7.put("type", "label"); -temp_json7.put("height", 38); -Map temp_json8 = new HashMap<>(); -temp_json8.put("visible", true); -temp_json8.put("x", 1757); -temp_json8.put("width", 250); -temp_json8.put("y", 112); -temp_json8.put("text", "検索項目"); -temp_json8.put("type", "button"); -temp_json8.put("height", 96); -Map temp_json2 = new HashMap<>(); -temp_json2.put("w4ca84254d30c423ab8e449171a5b5123", temp_json3); -temp_json2.put("web3d4ea933244ee195c972cec50c9474", temp_json6); -temp_json2.put("w5fe40a90a05743f9a771fc260e5fbed7", temp_json7); -temp_json2.put("w7de33900c55f4379983056aee325c057", temp_json8); -Map temp_json1 = new HashMap<>(); -temp_json1.put("screenId", "検索画面"); -temp_json1.put("layout", false); -temp_json1.put("widgets", temp_json2); -Map temp_json11 = new HashMap<>(); -temp_json11.put("visible", true); -temp_json11.put("x", 2021); -temp_json11.put("width", 267); -temp_json11.put("y", 82); -temp_json11.put("text", "戻る"); -temp_json11.put("type", "button"); -temp_json11.put("height", 96); -Map temp_json10 = new HashMap<>(); -temp_json10.put("w0becbeb6b2d54c03a69d63e3facd2eaa", temp_json11); -Map temp_json9 = new HashMap<>(); -temp_json9.put("screenId", "検索画面結果"); -temp_json9.put("layout", false); -temp_json9.put("widgets", temp_json10); -Map temp_json14 = new HashMap<>(); -temp_json14.put("visible", true); -temp_json14.put("x", 704); -temp_json14.put("width", 96); -temp_json14.put("y", 720); -temp_json14.put("text", "住所2"); -temp_json14.put("type", "label"); -temp_json14.put("height", 38); -Map temp_json15 = new HashMap<>(); -temp_json15.put("visible", true); -temp_json15.put("x", 1296); -temp_json15.put("width", 96); -temp_json15.put("y", 720); -temp_json15.put("text", "担当者"); -temp_json15.put("type", "label"); -temp_json15.put("height", 38); -Map temp_json16 = new HashMap<>(); -temp_json16.put("visible", true); -temp_json16.put("x", 112); -temp_json16.put("width", 160); -temp_json16.put("y", 352); -temp_json16.put("text", "事業内容1"); -temp_json16.put("type", "label"); -temp_json16.put("height", 38); -Map temp_json17 = new HashMap<>(); -temp_json17.put("visible", true); -temp_json17.put("x", 704); -temp_json17.put("width", 160); -temp_json17.put("y", 352); -temp_json17.put("text", "事業内容2"); -temp_json17.put("type", "label"); -temp_json17.put("height", 38); -Map temp_json20 = new HashMap<>(); -temp_json20.put("事業内容1", "_"); -temp_json20.put("役職", "_"); -temp_json20.put("住所1", "_"); -temp_json20.put("事業内容2", "_"); -temp_json20.put("住所2", "_"); -temp_json20.put("代表者", "_"); -temp_json20.put("会社概要", "_"); -temp_json20.put("URL", "_"); -temp_json20.put("設立", "_"); -Map temp_json19 = new HashMap<>(); -temp_json19.put("_", temp_json20); -new ArrayList<>().add("URL"); -new ArrayList<>().add("会社概要"); -new ArrayList<>().add("事業内容2"); -new ArrayList<>().add("事業内容1"); -new ArrayList<>().add("住所2"); -new ArrayList<>().add("住所1"); -new ArrayList<>().add("設立"); -new ArrayList<>().add("役職"); -new ArrayList<>().add("代表者"); -Map temp_json18 = new HashMap<>(); -temp_json18.put("visible", true); -temp_json18.put("data", temp_json19); -temp_json18.put("columns", new ArrayList<>()); -temp_json18.put("x", 106); -temp_json18.put("width", 2662); -temp_json18.put("y", 1021); -temp_json18.put("text", "table"); -temp_json18.put("type", "table"); -temp_json18.put("primaryKeyName", "会社名"); -temp_json18.put("height", 757); -Map temp_json21 = new HashMap<>(); -temp_json21.put("visible", true); -temp_json21.put("x", 1296); -temp_json21.put("width", 160); -temp_json21.put("y", 352); -temp_json21.put("text", "会社概要"); -temp_json21.put("type", "label"); -temp_json21.put("height", 38); -Map temp_json22 = new HashMap<>(); -temp_json22.put("visible", true); -temp_json22.put("x", 112); -temp_json22.put("width", 96); -temp_json22.put("y", 720); -temp_json22.put("text", "住所1"); -temp_json22.put("type", "label"); -temp_json22.put("height", 38); -Map temp_json23 = new HashMap<>(); -temp_json23.put("visible", true); -temp_json23.put("x", 2054); -temp_json23.put("width", 210); -temp_json23.put("y", 184); -temp_json23.put("text", "検索"); -temp_json23.put("type", "button"); -temp_json23.put("height", 82); -Map temp_json24 = new HashMap<>(); -temp_json24.put("visible", true); -temp_json24.put("x", 704); -temp_json24.put("width", 528); -temp_json24.put("y", 400); -temp_json24.put("text", "textInput"); -temp_json24.put("type", "textInput"); -temp_json24.put("height", 128); -Map temp_json25 = new HashMap<>(); -temp_json25.put("visible", true); -temp_json25.put("x", 1888); -temp_json25.put("width", 282); -temp_json25.put("y", 352); -temp_json25.put("text", "会社名"); -temp_json25.put("type", "label"); -temp_json25.put("height", 29); -Map temp_json26 = new HashMap<>(); -temp_json26.put("visible", true); -temp_json26.put("x", 1296); -temp_json26.put("width", 528); -temp_json26.put("y", 400); -temp_json26.put("text", "textInput"); -temp_json26.put("type", "textInput"); -temp_json26.put("height", 128); -Map temp_json27 = new HashMap<>(); -temp_json27.put("visible", true); -temp_json27.put("x", 1789); -temp_json27.put("width", 176); -temp_json27.put("y", 184); -temp_json27.put("text", "一覧"); -temp_json27.put("type", "button"); -temp_json27.put("height", 80); -Map temp_json28 = new HashMap<>(); -temp_json28.put("visible", true); -temp_json28.put("x", 112); -temp_json28.put("width", 528); -temp_json28.put("y", 400); -temp_json28.put("text", "textInput"); -temp_json28.put("type", "textInput"); -temp_json28.put("height", 128); -Map temp_json29 = new HashMap<>(); -temp_json29.put("visible", true); -temp_json29.put("x", 704); -temp_json29.put("width", 528); -temp_json29.put("y", 768); -temp_json29.put("text", "textInput"); -temp_json29.put("type", "textInput"); -temp_json29.put("height", 128); -Map temp_json30 = new HashMap<>(); -temp_json30.put("visible", true); -temp_json30.put("x", 1296); -temp_json30.put("width", 528); -temp_json30.put("y", 768); -temp_json30.put("text", "textInput"); -temp_json30.put("type", "textInput"); -temp_json30.put("height", 128); -Map temp_json31 = new HashMap<>(); -temp_json31.put("visible", true); -temp_json31.put("x", 1888); -temp_json31.put("width", 528); -temp_json31.put("y", 400); -temp_json31.put("text", "textInput"); -temp_json31.put("type", "textInput"); -temp_json31.put("height", 128); -Map temp_json32 = new HashMap<>(); -temp_json32.put("visible", true); -temp_json32.put("x", 112); -temp_json32.put("width", 528); -temp_json32.put("y", 768); -temp_json32.put("text", "textInput"); -temp_json32.put("type", "textInput"); -temp_json32.put("height", 128); -Map temp_json13 = new HashMap<>(); -temp_json13.put("w8fd9daaa986d40978c63408ee0a9527f", temp_json14); -temp_json13.put("wcada3c4a537b4c7eae76954b6ed08ea8", temp_json15); -temp_json13.put("we631b90a7c5749ed863429194cbc4187", temp_json16); -temp_json13.put("we1c1c127a4d84410a65936d971bf99bd", temp_json17); -temp_json13.put("Result", temp_json18); -temp_json13.put("w2789e405544b4a32a669b65e6a6af685", temp_json21); -temp_json13.put("w14fd3296e1064497a0c4ced93b47f21d", temp_json22); -temp_json13.put("w725d1e48b8584a70bad1fbdc07ea8280", temp_json23); -temp_json13.put("search2", temp_json24); -temp_json13.put("we095d27f148a4a398f976d29018a2caa", temp_json25); -temp_json13.put("search3", temp_json26); -temp_json13.put("w614b5ee1e161473d8f859fbfb5c8074e", temp_json27); -temp_json13.put("search1", temp_json28); -temp_json13.put("search6", temp_json29); -temp_json13.put("search7", temp_json30); -temp_json13.put("search4", temp_json31); -temp_json13.put("search5", temp_json32); -Map temp_json12 = new HashMap<>(); -temp_json12.put("screenId", "検索項目画面"); -temp_json12.put("layout", false); -temp_json12.put("widgets", temp_json13); -Map temp_json35 = new HashMap<>(); -temp_json35.put("visible", true); -temp_json35.put("x", 1445); -temp_json35.put("width", 96); -temp_json35.put("y", 403); -temp_json35.put("text", ""); -temp_json35.put("type", "label"); -temp_json35.put("height", 38); -Map temp_json36 = new HashMap<>(); -temp_json36.put("visible", true); -temp_json36.put("x", 832); -temp_json36.put("width", 96); -temp_json36.put("y", 723); -temp_json36.put("text", "住所2"); -temp_json36.put("type", "label"); -temp_json36.put("height", 38); -Map temp_json37 = new HashMap<>(); -temp_json37.put("visible", true); -temp_json37.put("x", 2171); -temp_json37.put("width", 240); -temp_json37.put("y", 96); -temp_json37.put("text", "キャンセル"); -temp_json37.put("type", "button"); -temp_json37.put("height", 120); -Map temp_json38 = new HashMap<>(); -temp_json38.put("visible", true); -temp_json38.put("x", 1440); -temp_json38.put("width", 96); -temp_json38.put("y", 403); -temp_json38.put("text", "役職"); -temp_json38.put("type", "label"); -temp_json38.put("height", 38); -Map temp_json39 = new HashMap<>(); -temp_json39.put("visible", true); -temp_json39.put("x", 832); -temp_json39.put("width", 560); -temp_json39.put("y", 768); -temp_json39.put("text", "textInput"); -temp_json39.put("type", "textInput"); -temp_json39.put("height", 128); -Map temp_json40 = new HashMap<>(); -temp_json40.put("visible", true); -temp_json40.put("x", 832); -temp_json40.put("width", 96); -temp_json40.put("y", 1035); -temp_json40.put("text", "URL"); -temp_json40.put("type", "label"); -temp_json40.put("height", 38); -Map temp_json41 = new HashMap<>(); -temp_json41.put("visible", true); -temp_json41.put("x", 1440); -temp_json41.put("width", 560); -temp_json41.put("y", 768); -temp_json41.put("text", "textInput"); -temp_json41.put("type", "textInput"); -temp_json41.put("height", 128); -Map temp_json42 = new HashMap<>(); -temp_json42.put("visible", true); -temp_json42.put("x", 2064); -temp_json42.put("width", 560); -temp_json42.put("y", 448); -temp_json42.put("text", "textInput"); -temp_json42.put("type", "textInput"); -temp_json42.put("height", 128); -Map temp_json43 = new HashMap<>(); -temp_json43.put("visible", true); -temp_json43.put("x", 832); -temp_json43.put("width", 560); -temp_json43.put("y", 448); -temp_json43.put("text", "textInput"); -temp_json43.put("type", "textInput"); -temp_json43.put("height", 128); -Map temp_json44 = new HashMap<>(); -temp_json44.put("visible", true); -temp_json44.put("x", 2064); -temp_json44.put("width", 96); -temp_json44.put("y", 402); -temp_json44.put("text", "設立"); -temp_json44.put("type", "label"); -temp_json44.put("height", 38); -Map temp_json45 = new HashMap<>(); -temp_json45.put("visible", true); -temp_json45.put("x", 224); -temp_json45.put("width", 96); -temp_json45.put("y", 725); -temp_json45.put("text", "住所1"); -temp_json45.put("type", "label"); -temp_json45.put("height", 38); -Map temp_json46 = new HashMap<>(); -temp_json46.put("visible", true); -temp_json46.put("x", 224); -temp_json46.put("width", 96); -temp_json46.put("y", 408); -temp_json46.put("text", "会社名"); -temp_json46.put("type", "label"); -temp_json46.put("height", 38); -Map temp_json47 = new HashMap<>(); -temp_json47.put("visible", true); -temp_json47.put("x", 832); -temp_json47.put("width", 560); -temp_json47.put("y", 1088); -temp_json47.put("text", "textInput"); -temp_json47.put("type", "textInput"); -temp_json47.put("height", 128); -Map temp_json48 = new HashMap<>(); -temp_json48.put("visible", true); -temp_json48.put("x", 1440); -temp_json48.put("width", 560); -temp_json48.put("y", 450); -temp_json48.put("text", "textInput"); -temp_json48.put("type", "textInput"); -temp_json48.put("height", 128); -Map temp_json49 = new HashMap<>(); -temp_json49.put("visible", true); -temp_json49.put("x", 224); -temp_json49.put("width", 96); -temp_json49.put("y", 1038); -temp_json49.put("text", "会社概要"); -temp_json49.put("type", "label"); -temp_json49.put("height", 38); -Map temp_json50 = new HashMap<>(); -temp_json50.put("visible", true); -temp_json50.put("x", 2064); -temp_json50.put("width", 128); -temp_json50.put("y", 728); -temp_json50.put("text", "事業内容2"); -temp_json50.put("type", "label"); -temp_json50.put("height", 38); -Map temp_json51 = new HashMap<>(); -temp_json51.put("visible", true); -temp_json51.put("x", 2064); -temp_json51.put("width", 560); -temp_json51.put("y", 768); -temp_json51.put("text", "textInput"); -temp_json51.put("type", "textInput"); -temp_json51.put("height", 128); -Map temp_json52 = new HashMap<>(); -temp_json52.put("visible", true); -temp_json52.put("x", 2461); -temp_json52.put("width", 256); -temp_json52.put("y", 96); -temp_json52.put("text", "編集"); -temp_json52.put("type", "button"); -temp_json52.put("height", 120); -Map temp_json53 = new HashMap<>(); -temp_json53.put("visible", true); -temp_json53.put("x", 224); -temp_json53.put("width", 560); -temp_json53.put("y", 448); -temp_json53.put("text", "textInput"); -temp_json53.put("type", "textInput"); -temp_json53.put("height", 128); -Map temp_json54 = new HashMap<>(); -temp_json54.put("visible", true); -temp_json54.put("x", 224); -temp_json54.put("width", 560); -temp_json54.put("y", 1088); -temp_json54.put("text", "textInput"); -temp_json54.put("type", "textInput"); -temp_json54.put("height", 128); -Map temp_json55 = new HashMap<>(); -temp_json55.put("visible", true); -temp_json55.put("x", 1445); -temp_json55.put("width", 160); -temp_json55.put("y", 728); -temp_json55.put("text", "事業内容1"); -temp_json55.put("type", "label"); -temp_json55.put("height", 38); -Map temp_json56 = new HashMap<>(); -temp_json56.put("visible", true); -temp_json56.put("x", 224); -temp_json56.put("width", 560); -temp_json56.put("y", 768); -temp_json56.put("text", "textInput"); -temp_json56.put("type", "textInput"); -temp_json56.put("height", 128); -Map temp_json57 = new HashMap<>(); -temp_json57.put("visible", true); -temp_json57.put("x", 842); -temp_json57.put("width", 96); -temp_json57.put("y", 408); -temp_json57.put("text", "代表者"); -temp_json57.put("type", "label"); -temp_json57.put("height", 38); -Map temp_json34 = new HashMap<>(); -temp_json34.put("w92f10414281e4aba83b435456a1315b1", temp_json35); -temp_json34.put("editaddress2", temp_json36); -temp_json34.put("w71f9e06eb3654cc2bb57ce3482579e11", temp_json37); -temp_json34.put("w0012f272bae6486d9a4b6f7f379e3376", temp_json38); -temp_json34.put("w8c31c847e9234ce287aa9d1963013a2e", temp_json39); -temp_json34.put("w1b21177a72594ea88b43b06879d4016d", temp_json40); -temp_json34.put("w19757f15861d421ea16a733d17ca930a", temp_json41); -temp_json34.put("editestablish", temp_json42); -temp_json34.put("editrepresentative", temp_json43); -temp_json34.put("w1e9211f35e1747c188121e0382d07821", temp_json44); -temp_json34.put("editaddress1", temp_json45); -temp_json34.put("w9d98825713d34965940a8540eb7ce845", temp_json46); -temp_json34.put("editURL", temp_json47); -temp_json34.put("editposition", temp_json48); -temp_json34.put("w910fc382356a422e9e326aea7f50de07", temp_json49); -temp_json34.put("editbusiness2", temp_json50); -temp_json34.put("wc3fd7fd241cb47458217856332d4f368", temp_json51); -temp_json34.put("w11dd0f050a5044d384b10351b83ad390", temp_json52); -temp_json34.put("editcompany", temp_json53); -temp_json34.put("editcompanydetail", temp_json54); -temp_json34.put("editbusiness1", temp_json55); -temp_json34.put("wa7ba992f63b14310afd6ead389ba0d6c", temp_json56); -temp_json34.put("w792b9bfaac4d4fc7a3d0f9350d9a0005", temp_json57); -Map temp_json33 = new HashMap<>(); -temp_json33.put("screenId", "編集画面2"); -temp_json33.put("layout", false); -temp_json33.put("widgets", temp_json34); -Map temp_json60 = new HashMap<>(); -temp_json60.put("visible", true); -temp_json60.put("x", 1683); -temp_json60.put("width", 211); -temp_json60.put("y", 170); -temp_json60.put("text", "検索"); -temp_json60.put("type", "button"); -temp_json60.put("height", 62); -Map temp_json61 = new HashMap<>(); -temp_json61.put("visible", true); -temp_json61.put("x", 2458); -temp_json61.put("width", 229); -temp_json61.put("y", 163); -temp_json61.put("text", "削除"); -temp_json61.put("type", "button"); -temp_json61.put("height", 70); -Map temp_json64 = new HashMap<>(); -temp_json64.put("事業内容1", "_"); -temp_json64.put("役職", "_"); -temp_json64.put("住所1", "_"); -temp_json64.put("事業内容2", "_"); -temp_json64.put("住所2", "_"); -temp_json64.put("代表者", "_"); -temp_json64.put("会社概要", "_"); -temp_json64.put("URL", "_"); -temp_json64.put("設立", "_"); -Map temp_json63 = new HashMap<>(); -temp_json63.put("_", temp_json64); -new ArrayList<>().add("URL"); -new ArrayList<>().add("会社概要"); -new ArrayList<>().add("事業内容2"); -new ArrayList<>().add("事業内容1"); -new ArrayList<>().add("住所2"); -new ArrayList<>().add("住所1"); -new ArrayList<>().add("設立"); -new ArrayList<>().add("役職"); -new ArrayList<>().add("代表者"); -Map temp_json62 = new HashMap<>(); -temp_json62.put("visible", true); -temp_json62.put("data", temp_json63); -temp_json62.put("columns", new ArrayList<>()); -temp_json62.put("x", 189); -temp_json62.put("width", 2542); -temp_json62.put("y", 317); -temp_json62.put("text", ""); -temp_json62.put("type", "table"); -temp_json62.put("primaryKeyName", "会社名"); -temp_json62.put("height", 1101); -Map temp_json65 = new HashMap<>(); -temp_json65.put("visible", true); -temp_json65.put("x", 1944); -temp_json65.put("width", 210); -temp_json65.put("y", 163); -temp_json65.put("text", "登録"); -temp_json65.put("type", "button"); -temp_json65.put("height", 67); -Map temp_json66 = new HashMap<>(); -temp_json66.put("visible", true); -temp_json66.put("x", 2186); -temp_json66.put("width", 218); -temp_json66.put("y", 162); -temp_json66.put("text", "編集"); -temp_json66.put("type", "button"); -temp_json66.put("height", 72); -Map temp_json59 = new HashMap<>(); -temp_json59.put("w191cc519b2344758b8d9878328b41cd9", temp_json60); -temp_json59.put("wa1b27f08c9fd4c08b7dda38625c04f3b", temp_json61); -temp_json59.put("w2d109ad3739d4744a1874ac179fc38b9", temp_json62); -temp_json59.put("w0498c4eb3524489494c288e2fc7a3211", temp_json65); -temp_json59.put("wa6aa4bcbb7a64e9eaf75758eae59310a", temp_json66); -Map temp_json58 = new HashMap<>(); -temp_json58.put("screenId", "企業一覧"); -temp_json58.put("layout", false); -temp_json58.put("widgets", temp_json59); -Map temp_json69 = new HashMap<>(); -temp_json69.put("visible", true); -temp_json69.put("x", 1984); -temp_json69.put("width", 96); -temp_json69.put("y", 304); -temp_json69.put("text", "設立"); -temp_json69.put("type", "label"); -temp_json69.put("height", 38); -Map temp_json70 = new HashMap<>(); -temp_json70.put("visible", true); -temp_json70.put("x", 736); -temp_json70.put("width", 96); -temp_json70.put("y", 304); -temp_json70.put("text", "代表者"); -temp_json70.put("type", "label"); -temp_json70.put("height", 38); -Map temp_json71 = new HashMap<>(); -temp_json71.put("visible", true); -temp_json71.put("x", 736); -temp_json71.put("width", 96); -temp_json71.put("y", 624); -temp_json71.put("text", "住所2"); -temp_json71.put("type", "label"); -temp_json71.put("height", 38); -Map temp_json72 = new HashMap<>(); -temp_json72.put("visible", true); -temp_json72.put("x", 1360); -temp_json72.put("width", 96); -temp_json72.put("y", 304); -temp_json72.put("text", "役職"); -temp_json72.put("type", "label"); -temp_json72.put("height", 38); -Map temp_json73 = new HashMap<>(); -temp_json73.put("visible", true); -temp_json73.put("x", 736); -temp_json73.put("width", 560); -temp_json73.put("y", 672); -temp_json73.put("text", "textInput"); -temp_json73.put("type", "textInput"); -temp_json73.put("height", 128); -Map temp_json74 = new HashMap<>(); -temp_json74.put("visible", true); -temp_json74.put("x", 1984); -temp_json74.put("width", 160); -temp_json74.put("y", 624); -temp_json74.put("text", "事業内容2"); -temp_json74.put("type", "label"); -temp_json74.put("height", 38); -Map temp_json75 = new HashMap<>(); -temp_json75.put("visible", true); -temp_json75.put("x", 112); -temp_json75.put("width", 560); -temp_json75.put("y", 672); -temp_json75.put("text", "textInput"); -temp_json75.put("type", "textInput"); -temp_json75.put("height", 128); -Map temp_json76 = new HashMap<>(); -temp_json76.put("visible", true); -temp_json76.put("x", 1984); -temp_json76.put("width", 560); -temp_json76.put("y", 672); -temp_json76.put("text", "textInput"); -temp_json76.put("type", "textInput"); -temp_json76.put("height", 128); -Map temp_json77 = new HashMap<>(); -temp_json77.put("visible", true); -temp_json77.put("x", 1984); -temp_json77.put("width", 560); -temp_json77.put("y", 352); -temp_json77.put("text", "textInput"); -temp_json77.put("type", "textInput"); -temp_json77.put("height", 128); -Map temp_json78 = new HashMap<>(); -temp_json78.put("visible", true); -temp_json78.put("x", 1360); -temp_json78.put("width", 560); -temp_json78.put("y", 672); -temp_json78.put("text", "textInput"); -temp_json78.put("type", "textInput"); -temp_json78.put("height", 128); -Map temp_json79 = new HashMap<>(); -temp_json79.put("visible", true); -temp_json79.put("x", 112); -temp_json79.put("width", 96); -temp_json79.put("y", 624); -temp_json79.put("text", "住所1"); -temp_json79.put("type", "label"); -temp_json79.put("height", 38); -Map temp_json80 = new HashMap<>(); -temp_json80.put("visible", true); -temp_json80.put("x", 736); -temp_json80.put("width", 560); -temp_json80.put("y", 976); -temp_json80.put("text", "textInput"); -temp_json80.put("type", "textInput"); -temp_json80.put("height", 128); -Map temp_json81 = new HashMap<>(); -temp_json81.put("visible", true); -temp_json81.put("x", 736); -temp_json81.put("width", 160); -temp_json81.put("y", 928); -temp_json81.put("text", "URL"); -temp_json81.put("type", "label"); -temp_json81.put("height", 38); -Map temp_json82 = new HashMap<>(); -temp_json82.put("visible", true); -temp_json82.put("x", 112); -temp_json82.put("width", 160); -temp_json82.put("y", 928); -temp_json82.put("text", "会社概要"); -temp_json82.put("type", "label"); -temp_json82.put("height", 38); -Map temp_json83 = new HashMap<>(); -temp_json83.put("visible", true); -temp_json83.put("x", 112); -temp_json83.put("width", 96); -temp_json83.put("y", 304); -temp_json83.put("text", "会社名"); -temp_json83.put("type", "label"); -temp_json83.put("height", 38); -Map temp_json84 = new HashMap<>(); -temp_json84.put("visible", true); -temp_json84.put("x", 112); -temp_json84.put("width", 560); -temp_json84.put("y", 976); -temp_json84.put("text", "textInput"); -temp_json84.put("type", "textInput"); -temp_json84.put("height", 128); -Map temp_json85 = new HashMap<>(); -temp_json85.put("visible", true); -temp_json85.put("x", 1360); -temp_json85.put("width", 160); -temp_json85.put("y", 624); -temp_json85.put("text", "事業内容1"); -temp_json85.put("type", "label"); -temp_json85.put("height", 38); -Map temp_json86 = new HashMap<>(); -temp_json86.put("visible", true); -temp_json86.put("x", 2298); -temp_json86.put("width", 216); -temp_json86.put("y", 130); -temp_json86.put("text", "次へ"); -temp_json86.put("type", "button"); -temp_json86.put("height", 110); -Map temp_json87 = new HashMap<>(); -temp_json87.put("visible", true); -temp_json87.put("x", 2010); -temp_json87.put("width", 219); -temp_json87.put("y", 133); -temp_json87.put("text", "キャンセル"); -temp_json87.put("type", "button"); -temp_json87.put("height", 104); -Map temp_json88 = new HashMap<>(); -temp_json88.put("visible", true); -temp_json88.put("x", 112); -temp_json88.put("width", 560); -temp_json88.put("y", 352); -temp_json88.put("text", "textInput"); -temp_json88.put("type", "textInput"); -temp_json88.put("height", 128); -Map temp_json89 = new HashMap<>(); -temp_json89.put("visible", true); -temp_json89.put("x", 1360); -temp_json89.put("width", 560); -temp_json89.put("y", 352); -temp_json89.put("text", "textInput"); -temp_json89.put("type", "textInput"); -temp_json89.put("height", 128); -Map temp_json90 = new HashMap<>(); -temp_json90.put("visible", true); -temp_json90.put("x", 118); -temp_json90.put("width", 410); -temp_json90.put("y", 106); -temp_json90.put("text", "登録画面"); -temp_json90.put("type", "label"); -temp_json90.put("height", 128); -Map temp_json91 = new HashMap<>(); -temp_json91.put("visible", true); -temp_json91.put("x", 736); -temp_json91.put("width", 560); -temp_json91.put("y", 352); -temp_json91.put("text", "textInput"); -temp_json91.put("type", "textInput"); -temp_json91.put("height", 128); -Map temp_json68 = new HashMap<>(); -temp_json68.put("w4a9e4bb65aba4849bb8fa7f59133e8ab", temp_json69); -temp_json68.put("wccafd5faa3c049bc90c1922ad8aed59d", temp_json70); -temp_json68.put("wabc1c4db8583473482991ef11d22b99e", temp_json71); -temp_json68.put("w4bd732d3d4604e57882718b04e78a5b0", temp_json72); -temp_json68.put("address2", temp_json73); -temp_json68.put("w540e940e17c24cfb8e5f0629368360e9", temp_json74); -temp_json68.put("address1", temp_json75); -temp_json68.put("businessdescription2", temp_json76); -temp_json68.put("establishment", temp_json77); -temp_json68.put("businessdescription1", temp_json78); -temp_json68.put("wd8b5195a3c724ae784536856ea7a68f0", temp_json79); -temp_json68.put("URL", temp_json80); -temp_json68.put("wd448ed57582e4ef2b584d47341a82b41", temp_json81); -temp_json68.put("wc151c4f049374281aba993b7dd4e47a8", temp_json82); -temp_json68.put("w7fc7cc8bbde149aeb9f4608c909a7902", temp_json83); -temp_json68.put("companyoverview", temp_json84); -temp_json68.put("wd1d02e08457540f6a3822b455f2421f3", temp_json85); -temp_json68.put("w7c6cfb14ed4f410aa33a440e6ab2e4bf", temp_json86); -temp_json68.put("wf10ab1752fe44c4d97ffb2ca2afdeba0", temp_json87); -temp_json68.put("company", temp_json88); -temp_json68.put("position", temp_json89); -temp_json68.put("w7c786f553dfa478bacd443bbb856f06e", temp_json90); -temp_json68.put("representative", temp_json91); -Map temp_json67 = new HashMap<>(); -temp_json67.put("screenId", "登録画面1"); -temp_json67.put("layout", false); -temp_json67.put("widgets", temp_json68); -Map temp_json0 = new HashMap<>(); -temp_json0.put("検索画面", temp_json1); -temp_json0.put("検索画面結果", temp_json9); -temp_json0.put("検索項目画面", temp_json12); -temp_json0.put("編集画面2", temp_json33); -temp_json0.put("企業一覧", temp_json58); -temp_json0.put("登録画面1", temp_json67); -value = temp_json0; -} - - public ScreenTemplates(Screen screen) { - this.screen = screen; - } + private CurScreen curScreen; + private Map value = new HashMap<>(); + { + Map temp_json5 = new HashMap<>(); + temp_json5.put("事業内容1", "_"); + temp_json5.put("役職", "_"); + temp_json5.put("住所1", "_"); + temp_json5.put("事業内容2", "_"); + temp_json5.put("担当者1", "_"); + temp_json5.put("住所2", "_"); + temp_json5.put("電話番号1", "_"); + temp_json5.put("代表者", "_"); + temp_json5.put("会社概要", "_"); + temp_json5.put("URL", "_"); + temp_json5.put("設立", "_"); + Map temp_json4 = new HashMap<>(); + temp_json4.put("_", temp_json5); + new ArrayList<>().add("電話番号1"); + new ArrayList<>().add("担当者1"); + new ArrayList<>().add("URL"); + new ArrayList<>().add("会社概要"); + new ArrayList<>().add("事業内容2"); + new ArrayList<>().add("事業内容1"); + new ArrayList<>().add("住所2"); + new ArrayList<>().add("住所1"); + new ArrayList<>().add("設立"); + new ArrayList<>().add("役職"); + new ArrayList<>().add("代表者"); + Map temp_json3 = new HashMap<>(); + temp_json3.put("visible", true); + temp_json3.put("data", temp_json4); + temp_json3.put("columns", new ArrayList<>()); + temp_json3.put("x", 74); + temp_json3.put("width", 2325); + temp_json3.put("y", 267); + temp_json3.put("text", ""); + temp_json3.put("type", "table"); + temp_json3.put("primaryKeyName", "会社名"); + temp_json3.put("height", 1136); + Map temp_json6 = new HashMap<>(); + temp_json6.put("visible", true); + temp_json6.put("x", 2070); + temp_json6.put("width", 237); + temp_json6.put("y", 112); + temp_json6.put("text", "戻る"); + temp_json6.put("type", "button"); + temp_json6.put("height", 96); + Map temp_json7 = new HashMap<>(); + temp_json7.put("visible", true); + temp_json7.put("x", 120); + temp_json7.put("width", 320); + temp_json7.put("y", 86); + temp_json7.put("text", "検索画面"); + temp_json7.put("type", "label"); + temp_json7.put("height", 38); + Map temp_json8 = new HashMap<>(); + temp_json8.put("visible", true); + temp_json8.put("x", 1757); + temp_json8.put("width", 250); + temp_json8.put("y", 112); + temp_json8.put("text", "検索項目"); + temp_json8.put("type", "button"); + temp_json8.put("height", 96); + Map temp_json2 = new HashMap<>(); + temp_json2.put("w4ca84254d30c423ab8e449171a5b5123", temp_json3); + temp_json2.put("web3d4ea933244ee195c972cec50c9474", temp_json6); + temp_json2.put("w5fe40a90a05743f9a771fc260e5fbed7", temp_json7); + temp_json2.put("w7de33900c55f4379983056aee325c057", temp_json8); + Map temp_json1 = new HashMap<>(); + temp_json1.put("screenId", "検索画面"); + temp_json1.put("layout", false); + temp_json1.put("widgets", temp_json2); + Map temp_json11 = new HashMap<>(); + temp_json11.put("visible", true); + temp_json11.put("x", 2021); + temp_json11.put("width", 267); + temp_json11.put("y", 82); + temp_json11.put("text", "戻る"); + temp_json11.put("type", "button"); + temp_json11.put("height", 96); + Map temp_json10 = new HashMap<>(); + temp_json10.put("w0becbeb6b2d54c03a69d63e3facd2eaa", temp_json11); + Map temp_json9 = new HashMap<>(); + temp_json9.put("screenId", "検索画面結果"); + temp_json9.put("layout", false); + temp_json9.put("widgets", temp_json10); + Map temp_json14 = new HashMap<>(); + temp_json14.put("visible", true); + temp_json14.put("x", 704); + temp_json14.put("width", 96); + temp_json14.put("y", 720); + temp_json14.put("text", "住所2"); + temp_json14.put("type", "label"); + temp_json14.put("height", 38); + Map temp_json15 = new HashMap<>(); + temp_json15.put("visible", true); + temp_json15.put("x", 1296); + temp_json15.put("width", 96); + temp_json15.put("y", 720); + temp_json15.put("text", "担当者"); + temp_json15.put("type", "label"); + temp_json15.put("height", 38); + Map temp_json16 = new HashMap<>(); + temp_json16.put("visible", true); + temp_json16.put("x", 112); + temp_json16.put("width", 160); + temp_json16.put("y", 352); + temp_json16.put("text", "事業内容1"); + temp_json16.put("type", "label"); + temp_json16.put("height", 38); + Map temp_json17 = new HashMap<>(); + temp_json17.put("visible", true); + temp_json17.put("x", 704); + temp_json17.put("width", 160); + temp_json17.put("y", 352); + temp_json17.put("text", "事業内容2"); + temp_json17.put("type", "label"); + temp_json17.put("height", 38); + Map temp_json20 = new HashMap<>(); + temp_json20.put("事業内容1", "_"); + temp_json20.put("役職", "_"); + temp_json20.put("住所1", "_"); + temp_json20.put("事業内容2", "_"); + temp_json20.put("住所2", "_"); + temp_json20.put("代表者", "_"); + temp_json20.put("会社概要", "_"); + temp_json20.put("URL", "_"); + temp_json20.put("設立", "_"); + Map temp_json19 = new HashMap<>(); + temp_json19.put("_", temp_json20); + new ArrayList<>().add("URL"); + new ArrayList<>().add("会社概要"); + new ArrayList<>().add("事業内容2"); + new ArrayList<>().add("事業内容1"); + new ArrayList<>().add("住所2"); + new ArrayList<>().add("住所1"); + new ArrayList<>().add("設立"); + new ArrayList<>().add("役職"); + new ArrayList<>().add("代表者"); + Map temp_json18 = new HashMap<>(); + temp_json18.put("visible", true); + temp_json18.put("data", temp_json19); + temp_json18.put("columns", new ArrayList<>()); + temp_json18.put("x", 106); + temp_json18.put("width", 2662); + temp_json18.put("y", 1021); + temp_json18.put("text", "table"); + temp_json18.put("type", "table"); + temp_json18.put("primaryKeyName", "会社名"); + temp_json18.put("height", 757); + Map temp_json21 = new HashMap<>(); + temp_json21.put("visible", true); + temp_json21.put("x", 1296); + temp_json21.put("width", 160); + temp_json21.put("y", 352); + temp_json21.put("text", "会社概要"); + temp_json21.put("type", "label"); + temp_json21.put("height", 38); + Map temp_json22 = new HashMap<>(); + temp_json22.put("visible", true); + temp_json22.put("x", 112); + temp_json22.put("width", 96); + temp_json22.put("y", 720); + temp_json22.put("text", "住所1"); + temp_json22.put("type", "label"); + temp_json22.put("height", 38); + Map temp_json23 = new HashMap<>(); + temp_json23.put("visible", true); + temp_json23.put("x", 2054); + temp_json23.put("width", 210); + temp_json23.put("y", 184); + temp_json23.put("text", "検索"); + temp_json23.put("type", "button"); + temp_json23.put("height", 82); + Map temp_json24 = new HashMap<>(); + temp_json24.put("visible", true); + temp_json24.put("x", 704); + temp_json24.put("width", 528); + temp_json24.put("y", 400); + temp_json24.put("text", "textInput"); + temp_json24.put("type", "textInput"); + temp_json24.put("height", 128); + Map temp_json25 = new HashMap<>(); + temp_json25.put("visible", true); + temp_json25.put("x", 1888); + temp_json25.put("width", 282); + temp_json25.put("y", 352); + temp_json25.put("text", "会社名"); + temp_json25.put("type", "label"); + temp_json25.put("height", 29); + Map temp_json26 = new HashMap<>(); + temp_json26.put("visible", true); + temp_json26.put("x", 1296); + temp_json26.put("width", 528); + temp_json26.put("y", 400); + temp_json26.put("text", "textInput"); + temp_json26.put("type", "textInput"); + temp_json26.put("height", 128); + Map temp_json27 = new HashMap<>(); + temp_json27.put("visible", true); + temp_json27.put("x", 1789); + temp_json27.put("width", 176); + temp_json27.put("y", 184); + temp_json27.put("text", "一覧"); + temp_json27.put("type", "button"); + temp_json27.put("height", 80); + Map temp_json28 = new HashMap<>(); + temp_json28.put("visible", true); + temp_json28.put("x", 112); + temp_json28.put("width", 528); + temp_json28.put("y", 400); + temp_json28.put("text", "textInput"); + temp_json28.put("type", "textInput"); + temp_json28.put("height", 128); + Map temp_json29 = new HashMap<>(); + temp_json29.put("visible", true); + temp_json29.put("x", 704); + temp_json29.put("width", 528); + temp_json29.put("y", 768); + temp_json29.put("text", "textInput"); + temp_json29.put("type", "textInput"); + temp_json29.put("height", 128); + Map temp_json30 = new HashMap<>(); + temp_json30.put("visible", true); + temp_json30.put("x", 1296); + temp_json30.put("width", 528); + temp_json30.put("y", 768); + temp_json30.put("text", "textInput"); + temp_json30.put("type", "textInput"); + temp_json30.put("height", 128); + Map temp_json31 = new HashMap<>(); + temp_json31.put("visible", true); + temp_json31.put("x", 1888); + temp_json31.put("width", 528); + temp_json31.put("y", 400); + temp_json31.put("text", "textInput"); + temp_json31.put("type", "textInput"); + temp_json31.put("height", 128); + Map temp_json32 = new HashMap<>(); + temp_json32.put("visible", true); + temp_json32.put("x", 112); + temp_json32.put("width", 528); + temp_json32.put("y", 768); + temp_json32.put("text", "textInput"); + temp_json32.put("type", "textInput"); + temp_json32.put("height", 128); + Map temp_json13 = new HashMap<>(); + temp_json13.put("w8fd9daaa986d40978c63408ee0a9527f", temp_json14); + temp_json13.put("wcada3c4a537b4c7eae76954b6ed08ea8", temp_json15); + temp_json13.put("we631b90a7c5749ed863429194cbc4187", temp_json16); + temp_json13.put("we1c1c127a4d84410a65936d971bf99bd", temp_json17); + temp_json13.put("Result", temp_json18); + temp_json13.put("w2789e405544b4a32a669b65e6a6af685", temp_json21); + temp_json13.put("w14fd3296e1064497a0c4ced93b47f21d", temp_json22); + temp_json13.put("w725d1e48b8584a70bad1fbdc07ea8280", temp_json23); + temp_json13.put("search2", temp_json24); + temp_json13.put("we095d27f148a4a398f976d29018a2caa", temp_json25); + temp_json13.put("search3", temp_json26); + temp_json13.put("w614b5ee1e161473d8f859fbfb5c8074e", temp_json27); + temp_json13.put("search1", temp_json28); + temp_json13.put("search6", temp_json29); + temp_json13.put("search7", temp_json30); + temp_json13.put("search4", temp_json31); + temp_json13.put("search5", temp_json32); + Map temp_json12 = new HashMap<>(); + temp_json12.put("screenId", "検索項目画面"); + temp_json12.put("layout", false); + temp_json12.put("widgets", temp_json13); + Map temp_json35 = new HashMap<>(); + temp_json35.put("visible", true); + temp_json35.put("x", 1445); + temp_json35.put("width", 96); + temp_json35.put("y", 403); + temp_json35.put("text", ""); + temp_json35.put("type", "label"); + temp_json35.put("height", 38); + Map temp_json36 = new HashMap<>(); + temp_json36.put("visible", true); + temp_json36.put("x", 832); + temp_json36.put("width", 96); + temp_json36.put("y", 723); + temp_json36.put("text", "住所2"); + temp_json36.put("type", "label"); + temp_json36.put("height", 38); + Map temp_json37 = new HashMap<>(); + temp_json37.put("visible", true); + temp_json37.put("x", 2171); + temp_json37.put("width", 240); + temp_json37.put("y", 96); + temp_json37.put("text", "キャンセル"); + temp_json37.put("type", "button"); + temp_json37.put("height", 120); + Map temp_json38 = new HashMap<>(); + temp_json38.put("visible", true); + temp_json38.put("x", 1440); + temp_json38.put("width", 96); + temp_json38.put("y", 403); + temp_json38.put("text", "役職"); + temp_json38.put("type", "label"); + temp_json38.put("height", 38); + Map temp_json39 = new HashMap<>(); + temp_json39.put("visible", true); + temp_json39.put("x", 832); + temp_json39.put("width", 560); + temp_json39.put("y", 768); + temp_json39.put("text", "textInput"); + temp_json39.put("type", "textInput"); + temp_json39.put("height", 128); + Map temp_json40 = new HashMap<>(); + temp_json40.put("visible", true); + temp_json40.put("x", 832); + temp_json40.put("width", 96); + temp_json40.put("y", 1035); + temp_json40.put("text", "URL"); + temp_json40.put("type", "label"); + temp_json40.put("height", 38); + Map temp_json41 = new HashMap<>(); + temp_json41.put("visible", true); + temp_json41.put("x", 1440); + temp_json41.put("width", 560); + temp_json41.put("y", 768); + temp_json41.put("text", "textInput"); + temp_json41.put("type", "textInput"); + temp_json41.put("height", 128); + Map temp_json42 = new HashMap<>(); + temp_json42.put("visible", true); + temp_json42.put("x", 2064); + temp_json42.put("width", 560); + temp_json42.put("y", 448); + temp_json42.put("text", "textInput"); + temp_json42.put("type", "textInput"); + temp_json42.put("height", 128); + Map temp_json43 = new HashMap<>(); + temp_json43.put("visible", true); + temp_json43.put("x", 832); + temp_json43.put("width", 560); + temp_json43.put("y", 448); + temp_json43.put("text", "textInput"); + temp_json43.put("type", "textInput"); + temp_json43.put("height", 128); + Map temp_json44 = new HashMap<>(); + temp_json44.put("visible", true); + temp_json44.put("x", 2064); + temp_json44.put("width", 96); + temp_json44.put("y", 402); + temp_json44.put("text", "設立"); + temp_json44.put("type", "label"); + temp_json44.put("height", 38); + Map temp_json45 = new HashMap<>(); + temp_json45.put("visible", true); + temp_json45.put("x", 224); + temp_json45.put("width", 96); + temp_json45.put("y", 725); + temp_json45.put("text", "住所1"); + temp_json45.put("type", "label"); + temp_json45.put("height", 38); + Map temp_json46 = new HashMap<>(); + temp_json46.put("visible", true); + temp_json46.put("x", 224); + temp_json46.put("width", 96); + temp_json46.put("y", 408); + temp_json46.put("text", "会社名"); + temp_json46.put("type", "label"); + temp_json46.put("height", 38); + Map temp_json47 = new HashMap<>(); + temp_json47.put("visible", true); + temp_json47.put("x", 832); + temp_json47.put("width", 560); + temp_json47.put("y", 1088); + temp_json47.put("text", "textInput"); + temp_json47.put("type", "textInput"); + temp_json47.put("height", 128); + Map temp_json48 = new HashMap<>(); + temp_json48.put("visible", true); + temp_json48.put("x", 1440); + temp_json48.put("width", 560); + temp_json48.put("y", 450); + temp_json48.put("text", "textInput"); + temp_json48.put("type", "textInput"); + temp_json48.put("height", 128); + Map temp_json49 = new HashMap<>(); + temp_json49.put("visible", true); + temp_json49.put("x", 224); + temp_json49.put("width", 96); + temp_json49.put("y", 1038); + temp_json49.put("text", "会社概要"); + temp_json49.put("type", "label"); + temp_json49.put("height", 38); + Map temp_json50 = new HashMap<>(); + temp_json50.put("visible", true); + temp_json50.put("x", 2064); + temp_json50.put("width", 128); + temp_json50.put("y", 728); + temp_json50.put("text", "事業内容2"); + temp_json50.put("type", "label"); + temp_json50.put("height", 38); + Map temp_json51 = new HashMap<>(); + temp_json51.put("visible", true); + temp_json51.put("x", 2064); + temp_json51.put("width", 560); + temp_json51.put("y", 768); + temp_json51.put("text", "textInput"); + temp_json51.put("type", "textInput"); + temp_json51.put("height", 128); + Map temp_json52 = new HashMap<>(); + temp_json52.put("visible", true); + temp_json52.put("x", 2461); + temp_json52.put("width", 256); + temp_json52.put("y", 96); + temp_json52.put("text", "編集"); + temp_json52.put("type", "button"); + temp_json52.put("height", 120); + Map temp_json53 = new HashMap<>(); + temp_json53.put("visible", true); + temp_json53.put("x", 224); + temp_json53.put("width", 560); + temp_json53.put("y", 448); + temp_json53.put("text", "textInput"); + temp_json53.put("type", "textInput"); + temp_json53.put("height", 128); + Map temp_json54 = new HashMap<>(); + temp_json54.put("visible", true); + temp_json54.put("x", 224); + temp_json54.put("width", 560); + temp_json54.put("y", 1088); + temp_json54.put("text", "textInput"); + temp_json54.put("type", "textInput"); + temp_json54.put("height", 128); + Map temp_json55 = new HashMap<>(); + temp_json55.put("visible", true); + temp_json55.put("x", 1445); + temp_json55.put("width", 160); + temp_json55.put("y", 728); + temp_json55.put("text", "事業内容1"); + temp_json55.put("type", "label"); + temp_json55.put("height", 38); + Map temp_json56 = new HashMap<>(); + temp_json56.put("visible", true); + temp_json56.put("x", 224); + temp_json56.put("width", 560); + temp_json56.put("y", 768); + temp_json56.put("text", "textInput"); + temp_json56.put("type", "textInput"); + temp_json56.put("height", 128); + Map temp_json57 = new HashMap<>(); + temp_json57.put("visible", true); + temp_json57.put("x", 842); + temp_json57.put("width", 96); + temp_json57.put("y", 408); + temp_json57.put("text", "代表者"); + temp_json57.put("type", "label"); + temp_json57.put("height", 38); + Map temp_json34 = new HashMap<>(); + temp_json34.put("w92f10414281e4aba83b435456a1315b1", temp_json35); + temp_json34.put("editaddress2", temp_json36); + temp_json34.put("w71f9e06eb3654cc2bb57ce3482579e11", temp_json37); + temp_json34.put("w0012f272bae6486d9a4b6f7f379e3376", temp_json38); + temp_json34.put("w8c31c847e9234ce287aa9d1963013a2e", temp_json39); + temp_json34.put("w1b21177a72594ea88b43b06879d4016d", temp_json40); + temp_json34.put("w19757f15861d421ea16a733d17ca930a", temp_json41); + temp_json34.put("editestablish", temp_json42); + temp_json34.put("editrepresentative", temp_json43); + temp_json34.put("w1e9211f35e1747c188121e0382d07821", temp_json44); + temp_json34.put("editaddress1", temp_json45); + temp_json34.put("w9d98825713d34965940a8540eb7ce845", temp_json46); + temp_json34.put("editURL", temp_json47); + temp_json34.put("editposition", temp_json48); + temp_json34.put("w910fc382356a422e9e326aea7f50de07", temp_json49); + temp_json34.put("editbusiness2", temp_json50); + temp_json34.put("wc3fd7fd241cb47458217856332d4f368", temp_json51); + temp_json34.put("w11dd0f050a5044d384b10351b83ad390", temp_json52); + temp_json34.put("editcompany", temp_json53); + temp_json34.put("editcompanydetail", temp_json54); + temp_json34.put("editbusiness1", temp_json55); + temp_json34.put("wa7ba992f63b14310afd6ead389ba0d6c", temp_json56); + temp_json34.put("w792b9bfaac4d4fc7a3d0f9350d9a0005", temp_json57); + Map temp_json33 = new HashMap<>(); + temp_json33.put("screenId", "編集画面2"); + temp_json33.put("layout", false); + temp_json33.put("widgets", temp_json34); + Map temp_json60 = new HashMap<>(); + temp_json60.put("visible", true); + temp_json60.put("x", 1683); + temp_json60.put("width", 211); + temp_json60.put("y", 170); + temp_json60.put("text", "検索"); + temp_json60.put("type", "button"); + temp_json60.put("height", 62); + Map temp_json61 = new HashMap<>(); + temp_json61.put("visible", true); + temp_json61.put("x", 2458); + temp_json61.put("width", 229); + temp_json61.put("y", 163); + temp_json61.put("text", "削除"); + temp_json61.put("type", "button"); + temp_json61.put("height", 70); + Map temp_json64 = new HashMap<>(); + temp_json64.put("事業内容1", "_"); + temp_json64.put("役職", "_"); + temp_json64.put("住所1", "_"); + temp_json64.put("事業内容2", "_"); + temp_json64.put("住所2", "_"); + temp_json64.put("代表者", "_"); + temp_json64.put("会社概要", "_"); + temp_json64.put("URL", "_"); + temp_json64.put("設立", "_"); + Map temp_json63 = new HashMap<>(); + temp_json63.put("_", temp_json64); + new ArrayList<>().add("URL"); + new ArrayList<>().add("会社概要"); + new ArrayList<>().add("事業内容2"); + new ArrayList<>().add("事業内容1"); + new ArrayList<>().add("住所2"); + new ArrayList<>().add("住所1"); + new ArrayList<>().add("設立"); + new ArrayList<>().add("役職"); + new ArrayList<>().add("代表者"); + Map temp_json62 = new HashMap<>(); + temp_json62.put("visible", true); + temp_json62.put("data", temp_json63); + temp_json62.put("columns", new ArrayList<>()); + temp_json62.put("x", 189); + temp_json62.put("width", 2542); + temp_json62.put("y", 317); + temp_json62.put("text", ""); + temp_json62.put("type", "table"); + temp_json62.put("primaryKeyName", "会社名"); + temp_json62.put("height", 1101); + Map temp_json65 = new HashMap<>(); + temp_json65.put("visible", true); + temp_json65.put("x", 1944); + temp_json65.put("width", 210); + temp_json65.put("y", 163); + temp_json65.put("text", "登録"); + temp_json65.put("type", "button"); + temp_json65.put("height", 67); + Map temp_json66 = new HashMap<>(); + temp_json66.put("visible", true); + temp_json66.put("x", 2186); + temp_json66.put("width", 218); + temp_json66.put("y", 162); + temp_json66.put("text", "編集"); + temp_json66.put("type", "button"); + temp_json66.put("height", 72); + Map temp_json59 = new HashMap<>(); + temp_json59.put("w191cc519b2344758b8d9878328b41cd9", temp_json60); + temp_json59.put("wa1b27f08c9fd4c08b7dda38625c04f3b", temp_json61); + temp_json59.put("w2d109ad3739d4744a1874ac179fc38b9", temp_json62); + temp_json59.put("w0498c4eb3524489494c288e2fc7a3211", temp_json65); + temp_json59.put("wa6aa4bcbb7a64e9eaf75758eae59310a", temp_json66); + Map temp_json58 = new HashMap<>(); + temp_json58.put("screenId", "企業一覧"); + temp_json58.put("layout", false); + temp_json58.put("widgets", temp_json59); + Map temp_json69 = new HashMap<>(); + temp_json69.put("visible", true); + temp_json69.put("x", 1984); + temp_json69.put("width", 96); + temp_json69.put("y", 304); + temp_json69.put("text", "設立"); + temp_json69.put("type", "label"); + temp_json69.put("height", 38); + Map temp_json70 = new HashMap<>(); + temp_json70.put("visible", true); + temp_json70.put("x", 736); + temp_json70.put("width", 96); + temp_json70.put("y", 304); + temp_json70.put("text", "代表者"); + temp_json70.put("type", "label"); + temp_json70.put("height", 38); + Map temp_json71 = new HashMap<>(); + temp_json71.put("visible", true); + temp_json71.put("x", 736); + temp_json71.put("width", 96); + temp_json71.put("y", 624); + temp_json71.put("text", "住所2"); + temp_json71.put("type", "label"); + temp_json71.put("height", 38); + Map temp_json72 = new HashMap<>(); + temp_json72.put("visible", true); + temp_json72.put("x", 1360); + temp_json72.put("width", 96); + temp_json72.put("y", 304); + temp_json72.put("text", "役職"); + temp_json72.put("type", "label"); + temp_json72.put("height", 38); + Map temp_json73 = new HashMap<>(); + temp_json73.put("visible", true); + temp_json73.put("x", 736); + temp_json73.put("width", 560); + temp_json73.put("y", 672); + temp_json73.put("text", "textInput"); + temp_json73.put("type", "textInput"); + temp_json73.put("height", 128); + Map temp_json74 = new HashMap<>(); + temp_json74.put("visible", true); + temp_json74.put("x", 1984); + temp_json74.put("width", 160); + temp_json74.put("y", 624); + temp_json74.put("text", "事業内容2"); + temp_json74.put("type", "label"); + temp_json74.put("height", 38); + Map temp_json75 = new HashMap<>(); + temp_json75.put("visible", true); + temp_json75.put("x", 112); + temp_json75.put("width", 560); + temp_json75.put("y", 672); + temp_json75.put("text", "textInput"); + temp_json75.put("type", "textInput"); + temp_json75.put("height", 128); + Map temp_json76 = new HashMap<>(); + temp_json76.put("visible", true); + temp_json76.put("x", 1984); + temp_json76.put("width", 560); + temp_json76.put("y", 672); + temp_json76.put("text", "textInput"); + temp_json76.put("type", "textInput"); + temp_json76.put("height", 128); + Map temp_json77 = new HashMap<>(); + temp_json77.put("visible", true); + temp_json77.put("x", 1984); + temp_json77.put("width", 560); + temp_json77.put("y", 352); + temp_json77.put("text", "textInput"); + temp_json77.put("type", "textInput"); + temp_json77.put("height", 128); + Map temp_json78 = new HashMap<>(); + temp_json78.put("visible", true); + temp_json78.put("x", 1360); + temp_json78.put("width", 560); + temp_json78.put("y", 672); + temp_json78.put("text", "textInput"); + temp_json78.put("type", "textInput"); + temp_json78.put("height", 128); + Map temp_json79 = new HashMap<>(); + temp_json79.put("visible", true); + temp_json79.put("x", 112); + temp_json79.put("width", 96); + temp_json79.put("y", 624); + temp_json79.put("text", "住所1"); + temp_json79.put("type", "label"); + temp_json79.put("height", 38); + Map temp_json80 = new HashMap<>(); + temp_json80.put("visible", true); + temp_json80.put("x", 736); + temp_json80.put("width", 560); + temp_json80.put("y", 976); + temp_json80.put("text", "textInput"); + temp_json80.put("type", "textInput"); + temp_json80.put("height", 128); + Map temp_json81 = new HashMap<>(); + temp_json81.put("visible", true); + temp_json81.put("x", 736); + temp_json81.put("width", 160); + temp_json81.put("y", 928); + temp_json81.put("text", "URL"); + temp_json81.put("type", "label"); + temp_json81.put("height", 38); + Map temp_json82 = new HashMap<>(); + temp_json82.put("visible", true); + temp_json82.put("x", 112); + temp_json82.put("width", 160); + temp_json82.put("y", 928); + temp_json82.put("text", "会社概要"); + temp_json82.put("type", "label"); + temp_json82.put("height", 38); + Map temp_json83 = new HashMap<>(); + temp_json83.put("visible", true); + temp_json83.put("x", 112); + temp_json83.put("width", 96); + temp_json83.put("y", 304); + temp_json83.put("text", "会社名"); + temp_json83.put("type", "label"); + temp_json83.put("height", 38); + Map temp_json84 = new HashMap<>(); + temp_json84.put("visible", true); + temp_json84.put("x", 112); + temp_json84.put("width", 560); + temp_json84.put("y", 976); + temp_json84.put("text", "textInput"); + temp_json84.put("type", "textInput"); + temp_json84.put("height", 128); + Map temp_json85 = new HashMap<>(); + temp_json85.put("visible", true); + temp_json85.put("x", 1360); + temp_json85.put("width", 160); + temp_json85.put("y", 624); + temp_json85.put("text", "事業内容1"); + temp_json85.put("type", "label"); + temp_json85.put("height", 38); + Map temp_json86 = new HashMap<>(); + temp_json86.put("visible", true); + temp_json86.put("x", 2298); + temp_json86.put("width", 216); + temp_json86.put("y", 130); + temp_json86.put("text", "次へ"); + temp_json86.put("type", "button"); + temp_json86.put("height", 110); + Map temp_json87 = new HashMap<>(); + temp_json87.put("visible", true); + temp_json87.put("x", 2010); + temp_json87.put("width", 219); + temp_json87.put("y", 133); + temp_json87.put("text", "キャンセル"); + temp_json87.put("type", "button"); + temp_json87.put("height", 104); + Map temp_json88 = new HashMap<>(); + temp_json88.put("visible", true); + temp_json88.put("x", 112); + temp_json88.put("width", 560); + temp_json88.put("y", 352); + temp_json88.put("text", "textInput"); + temp_json88.put("type", "textInput"); + temp_json88.put("height", 128); + Map temp_json89 = new HashMap<>(); + temp_json89.put("visible", true); + temp_json89.put("x", 1360); + temp_json89.put("width", 560); + temp_json89.put("y", 352); + temp_json89.put("text", "textInput"); + temp_json89.put("type", "textInput"); + temp_json89.put("height", 128); + Map temp_json90 = new HashMap<>(); + temp_json90.put("visible", true); + temp_json90.put("x", 118); + temp_json90.put("width", 410); + temp_json90.put("y", 106); + temp_json90.put("text", "登録画面"); + temp_json90.put("type", "label"); + temp_json90.put("height", 128); + Map temp_json91 = new HashMap<>(); + temp_json91.put("visible", true); + temp_json91.put("x", 736); + temp_json91.put("width", 560); + temp_json91.put("y", 352); + temp_json91.put("text", "textInput"); + temp_json91.put("type", "textInput"); + temp_json91.put("height", 128); + Map temp_json68 = new HashMap<>(); + temp_json68.put("w4a9e4bb65aba4849bb8fa7f59133e8ab", temp_json69); + temp_json68.put("wccafd5faa3c049bc90c1922ad8aed59d", temp_json70); + temp_json68.put("wabc1c4db8583473482991ef11d22b99e", temp_json71); + temp_json68.put("w4bd732d3d4604e57882718b04e78a5b0", temp_json72); + temp_json68.put("address2", temp_json73); + temp_json68.put("w540e940e17c24cfb8e5f0629368360e9", temp_json74); + temp_json68.put("address1", temp_json75); + temp_json68.put("businessdescription2", temp_json76); + temp_json68.put("establishment", temp_json77); + temp_json68.put("businessdescription1", temp_json78); + temp_json68.put("wd8b5195a3c724ae784536856ea7a68f0", temp_json79); + temp_json68.put("URL", temp_json80); + temp_json68.put("wd448ed57582e4ef2b584d47341a82b41", temp_json81); + temp_json68.put("wc151c4f049374281aba993b7dd4e47a8", temp_json82); + temp_json68.put("w7fc7cc8bbde149aeb9f4608c909a7902", temp_json83); + temp_json68.put("companyoverview", temp_json84); + temp_json68.put("wd1d02e08457540f6a3822b455f2421f3", temp_json85); + temp_json68.put("w7c6cfb14ed4f410aa33a440e6ab2e4bf", temp_json86); + temp_json68.put("wf10ab1752fe44c4d97ffb2ca2afdeba0", temp_json87); + temp_json68.put("company", temp_json88); + temp_json68.put("position", temp_json89); + temp_json68.put("w7c786f553dfa478bacd443bbb856f06e", temp_json90); + temp_json68.put("representative", temp_json91); + Map temp_json67 = new HashMap<>(); + temp_json67.put("screenId", "登録画面1"); + temp_json67.put("layout", false); + temp_json67.put("widgets", temp_json68); + ScreenTemplate screenTemplate_tmp1 = new ScreenTemplate(); + screenTemplate_tmp1.setValue(temp_json1); + ScreenTemplate screenTemplate_tmp9 = new ScreenTemplate(); + screenTemplate_tmp9.setValue(temp_json9); + ScreenTemplate screenTemplate_tmp12 = new ScreenTemplate(); + screenTemplate_tmp12.setValue(temp_json12); + ScreenTemplate screenTemplate_tmp33 = new ScreenTemplate(); + screenTemplate_tmp33.setValue(temp_json33); + ScreenTemplate screenTemplate_tmp58 = new ScreenTemplate(); + screenTemplate_tmp58.setValue(temp_json58); + ScreenTemplate screenTemplate_tmp67 = new ScreenTemplate(); + screenTemplate_tmp67.setValue(temp_json67); + value.put("検索画面", screenTemplate_tmp1); + value.put("検索画面結果", screenTemplate_tmp9); + value.put("検索項目画面", screenTemplate_tmp12); + value.put("編集画面2", screenTemplate_tmp33); + value.put("企業一覧", screenTemplate_tmp58); + value.put("登録画面1", screenTemplate_tmp67); + } public Map getValue() { return new HashMap<>(this.value); } + public void setCurScreen(CurScreen curScreen) { + this.curScreen = curScreen; + for (ScreenTemplate screenTemplate: value.values()) { + screenTemplate.setCurScreen(curScreen); + } + } public ScreenTemplate getScreenTemplate(String scId) { return this.value.get(scId); } diff --git a/src/StartupManagementWindow.java b/src/StartupManagementWindow.java new file mode 100644 index 0000000..fddb6c7 --- /dev/null +++ b/src/StartupManagementWindow.java @@ -0,0 +1,23 @@ +import javax.swing.*; + +public class StartupManagementWindow extends JFrame { + private Main main; + private JPanel mainPanel; + public SwingPresenter presenter; + + public StartupManagementWindow(Main main) { + this.main = main; + + mainPanel = new JPanel(); + this.add(mainPanel); + presenter = new SwingPresenter(main, mainPanel); + + setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + setSize(870, 640); + setVisible(true); + } + + public SwingPresenter getPresenter() { + return presenter; + } +} diff --git a/src/SwingPresenter.java b/src/SwingPresenter.java new file mode 100644 index 0000000..c4bfa7b --- /dev/null +++ b/src/SwingPresenter.java @@ -0,0 +1,235 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.util.HashMap; +import java.util.Map; + +public class SwingPresenter { + private Main main; + private JPanel mainPanel; + private Map components = new HashMap<>(); + + public SwingPresenter(Main main, JPanel mainPanel) { + this.main = main; + this.mainPanel = mainPanel; + } + + public void screenUpdate(Map prevValue, Map value) { + Map widgets = (Map) value.get("widgets"); + boolean layout = (boolean) value.get("layout"); + String prevScreenId = (String) prevValue.get("screenId"); + String screenId = (String) value.get("screenId"); + if (screenId.equals(prevScreenId)) { + return; + } + mainPanel.removeAll(); + if (layout) { + mainPanel.setLayout(new FlowLayout()); + for (String key : widgets.keySet()) { + String type = (String) ((Map) widgets.get(key)).get("type"); + String text = (String) ((Map) widgets.get(key)).get("text"); + boolean visible = (boolean) ((Map) widgets.get(key)).get("visible"); + int state = (int) ((Map) widgets.get(key)).get("state"); + if (type.equals("textInput")) { + JTextField textField = new JTextField(10); + mainPanel.add(textField); + components.put(key, textField); + textField.addMouseListener(new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + } + @Override + public void mousePressed(MouseEvent e) { + main.mouseEvent(key, 1); + } + @Override + public void mouseReleased(MouseEvent e) { + main.mouseEvent(key, 0); + } + @Override + public void mouseEntered(MouseEvent e) { + } + @Override + public void mouseExited(MouseEvent e) { + } + }); + } else if (type.equals("label")) { + JLabel label = new JLabel(text); + mainPanel.add(label); + components.put(key, label); + label.addMouseListener(new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + } + @Override + public void mousePressed(MouseEvent e) { + main.mouseEvent(key, 1); + } + @Override + public void mouseReleased(MouseEvent e) { + main.mouseEvent(key, 0); + } + @Override + public void mouseEntered(MouseEvent e) { + } + @Override + public void mouseExited(MouseEvent e) { + } + }); + } else if (type.equals("button")) { + JButton button = new JButton(text); + mainPanel.add(button); + components.put(key, button); + button.addMouseListener(new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + } + @Override + public void mousePressed(MouseEvent e) { + main.mouseEvent(key, 1); + } + @Override + public void mouseReleased(MouseEvent e) { + main.mouseEvent(key, 0); + } + @Override + public void mouseEntered(MouseEvent e) { + } + @Override + public void mouseExited(MouseEvent e) { + } + }); + } else if (type.equals("table")) { + + } + } + } else { + mainPanel.setLayout(null); + for (String key : widgets.keySet()) { + String type = (String) ((Map) widgets.get(key)).get("type"); + int y = (int) ((Map) widgets.get(key)).get("y"); + int x = (int) ((Map) widgets.get(key)).get("x"); + int height = (int) ((Map) widgets.get(key)).get("height"); + String text = (String) ((Map) widgets.get(key)).get("text"); + boolean visible = (boolean) ((Map) widgets.get(key)).get("visible"); + int width = (int) ((Map) widgets.get(key)).get("width"); + int state = (int) ((Map) widgets.get(key)).get("state"); + if (type.equals("textInput")) { + JTextField textField = new JTextField(10); + textField.setLocation(x, y); + textField.setSize(width, height); + mainPanel.add(textField); + components.put(key, textField); + textField.addMouseListener(new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + } + @Override + public void mousePressed(MouseEvent e) { + main.mouseEvent(key, 1); + } + @Override + public void mouseReleased(MouseEvent e) { + main.mouseEvent(key, 0); + } + @Override + public void mouseEntered(MouseEvent e) { + } + @Override + public void mouseExited(MouseEvent e) { + } + }); + } else if (type.equals("label")) { + JLabel label = new JLabel(text); + label.setLocation(x, y); + label.setSize(width, height); + mainPanel.add(label); + components.put(key, label); + label.addMouseListener(new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + } + @Override + public void mousePressed(MouseEvent e) { + main.mouseEvent(key, 1); + } + @Override + public void mouseReleased(MouseEvent e) { + main.mouseEvent(key, 0); + } + @Override + public void mouseEntered(MouseEvent e) { + } + @Override + public void mouseExited(MouseEvent e) { + } + }); + } else if (type.equals("button")) { + JButton button = new JButton(text); + button.setLocation(x, y); + button.setSize(width, height); + mainPanel.add(button); + components.put(key, button); + button.addMouseListener(new MouseListener() { + @Override + public void mouseClicked(MouseEvent e) { + } + @Override + public void mousePressed(MouseEvent e) { + main.mouseEvent(key, 1); + } + @Override + public void mouseReleased(MouseEvent e) { + main.mouseEvent(key, 0); + } + @Override + public void mouseEntered(MouseEvent e) { + } + @Override + public void mouseExited(MouseEvent e) { + } + }); + } else if (type.equals("table")) { + + } + } + } + mainPanel.invalidate(); + mainPanel.validate(); + mainPanel.repaint(); + } + + public void setX(String wid, int x) { + int y = components.get(wid).getY(); + components.get(wid).setLocation(x, y); + } + + public void setY(String wid, int y) { + int x = components.get(wid).getX(); + components.get(wid).setLocation(x, y); + } + + public void setText(String wid, String text) { + Component widget = components.get(wid); + if (widget instanceof JButton) { + ((JButton) widget).setText(text); + } else if (widget instanceof JLabel) { + ((JLabel) widget).setText(text); + } else if (widget instanceof JTextField) { + ((JTextField) widget).setText(text); + } + } + + public void setVisible(String wid, boolean visible) { + components.get(wid).setVisible(visible); + } + + public void setLayout(boolean layout) { + if (layout) { + mainPanel.setLayout(new FlowLayout()); + } else { + mainPanel.setLayout(null); + } + } +} diff --git a/src/Widget.java b/src/Widget.java index 037d164..35bbf1f 100644 --- a/src/Widget.java +++ b/src/Widget.java @@ -1,284 +1,130 @@ import java.util.*; public class Widget { + private String type; private String text; - private SwingPresenter presenter; - private SwingPresenter presenter; - private SwingPresenter presenter; - private Map> data; - private CurScreen curScreen; - private int state; - private CurScreen curScreen; - private CurScreen curScreen; - private CurScreen curScreen; - private CurScreen curScreen; - private CurScreen curScreen; - private CurScreen curScreen; - private CurScreen curScreen; - private BusinessCardManagement businessCardManagement; - private CurScreen curScreen; - private BusinessCardManagement businessCardManagement; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private Widget1 widget1; - private BusinessCardManagement businessCardManagement; - private CurScreen curScreen; - private Widget1 widget1; - private Screen screen; + private boolean visible; + private int x; + private int y; + private int width; + private int height; + private int state; + private Map> data; + private Widget1 widget; + private CurScreen curScreen; + private ScreenTemplates screenTemplates; + private SwingPresenter presenter; + public Widget(String type, String text, boolean visible, int x, int y, int width, int height, int state, Map> data, ScreenTemplates screenTemplates, SwingPresenter presenter) { + this.type = type; + this.text = text; + this.visible = visible; + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.state = state; + this.data = data; + this.screenTemplates = screenTemplates; + this.presenter = presenter; + } public Map getValue() { - Map temp_nil1 = new HashMap<>(); - temp_nil1.put("state",this.getState()); - temp_nil1.put("data",this.getData()); - temp_nil1.put("text",this.getText()); - return temp_nil1; + Map temp_nil3 = new HashMap<>(); + temp_nil3.put("type",this.getType()); + temp_nil3.put("text",this.getText()); + temp_nil3.put("visible",this.getVisible()); + temp_nil3.put("x",this.getX()); + temp_nil3.put("y",this.getY()); + temp_nil3.put("width",this.getWidth()); + temp_nil3.put("height",this.getHeight()); + temp_nil3.put("state",this.getState()); + temp_nil3.put("data",this.getData()); + return temp_nil3; } - public void updateTextFromText(String self, String self2, String wid, String text, String curScreen) { - this.text = text; - } + public String getType() { + return this.type; + } public String getText() { return this.text; } - public void updateDataFromBusinessCardManagement(String self, String self2, Map> businessCardManagement, String companyList, String w2d109ad3739d4744a1874ac179fc38b9) { - this.data = businessCardManagement; - this.presenter.setTable(scId, wid, businessCardManagement); + public boolean getVisible() { + return this.visible; + } + public int getX() { + return this.x; + } + public int getY() { + return this.y; } - public void updateDataFromBusinessCardManagement2(String self, String self2, Map> businessCardManagement, String searchCriteriaScreen, String result) { - this.data = businessCardManagement; - this.presenter.setTable(scId, wid, businessCardManagement); + public int getWidth() { + return this.width; } - public void updateDataFromBusinessCardManagement3(String self, String self2, Map> businessCardManagement, String w4ca84254d30c423ab8e449171a5b5123, String searchScreen) { - this.data = businessCardManagement; - this.presenter.setTable(scId, wid, businessCardManagement); + public int getHeight() { + return this.height; } - public Map> getData() { - return this.data; + public int getState() { + return this.state; + } + public Map> getData() { + return this.data; + } + public void changeX(String wid, int x) { + this.x = x; + this.presenter.setX(wid, x); + } + public void changeY(String wid, int y) { + this.y = y; + this.presenter.setY(wid, y); + } + public void changeVisible(String wid, boolean visible) { + this.visible = visible; + this.presenter.setVisible(wid, visible); + } + public void updateFromWidget(String self, String scId, String wid, Map widget, String curScreen) { + this.value = widget; + } + public void updateDataFromState(String self, String screenId, String widId, int state, String text, String searchCriteriaScreen, String text, String text, String result, String text, Map> businessCardManagement, String search2, String search3, String search1, String text, String search6, String search5) { + Map> temp_if0; + if ((state==0)) { + Map temp_json92 = new HashMap<>(); + temp_json92.put("事業内容1", text); + temp_json92.put("会社概要", text); + temp_json92.put("住所1", text); + temp_json92.put("事業内容2", text); + temp_json92.put("住所2", text); + Map temp_search0 = new HashMap<>(); + for (String key: businessCardManagement.keySet()) { + boolean isMatch = true; + for (String qKey: temp_json92.keySet()) { + Map value = businessCardManagement.get(key).getValue(); + for (String valKey: value.keySet()) { + if (valKey.equals(qKey)) { + if (value.get(valKey).equals(temp_json92.get(qKey))) { + isMatch = false; + } + break; + } + } + if (!isMatch) break; + } + if (isMatch) { + temp_search0.put(key, businessCardManagement.get(key)); + } + } + temp_if0 = temp_search0; + } else { + temp_if0 = this.data; + }this.data = temp_if0; + this.presenter.setTable(wid, temp_if1); } - public void updateStateFromState(String self, String self2, String wid, int state, String curScreen) { - this.state = state; - this.state = state; - this.state = state; - this.state = state; - this.state = state; - this.state = state; - this.state = state; - this.state = state; - this.state = state; - this.state = state; - this.state = state; - this.state = state; - if ((scId.equals("編集画面2")&&wid.equals("w71f9e06eb3654cc2bb57ce3482579e11"))) { - this.curScreen.updateFromState10(scId, wid, this.state); - } - if ((scId.equals("検索項目画面")&&wid.equals("w614b5ee1e161473d8f859fbfb5c8074e"))) { - this.curScreen.updateFromState9(scId, wid, this.state); - } - if ((scId.equals("登録画面1")&&wid.equals("wf10ab1752fe44c4d97ffb2ca2afdeba0"))) { - this.curScreen.updateFromState6(scId, wid, this.state); - } - if ((scId.equals("検索画面")&&wid.equals("w7de33900c55f4379983056aee325c057"))) { - this.curScreen.updateFromState5(scId, wid, this.state); - } - if ((scId.equals("企業一覧")&&wid.equals("w0498c4eb3524489494c288e2fc7a3211"))) { - this.curScreen.updateFromState4(scId, wid, this.state); - } - if ((scId.equals("企業一覧")&&wid.equals("w191cc519b2344758b8d9878328b41cd9"))) { - this.curScreen.updateFromState3(scId, wid, this.state); - } - if ((scId.equals("検索画面")&&wid.equals("web3d4ea933244ee195c972cec50c9474"))) { - this.curScreen.updateFromState2(scId, wid, this.state); - } - if ((scId.equals("検索画面結果")&&wid.equals("w0becbeb6b2d54c03a69d63e3facd2eaa"))) { - this.curScreen.updateFromState(scId, wid, this.state); - } - String company = this.company.getValue(); - String text = this.text; - String representative = this.representative.getValue(); - String position = this.position.getValue(); - String address1 = this.address1.getValue(); - String establishment = this.establishment.getValue(); - String text = this.text; - Map> businessCardManagement = this.businessCardManagement.getValue(); - String text = this.text; - String text = this.text; - String text = this.text; - String text = this.text; - String address2 = this.address2.getValue(); - if ((scId.equals("登録画面1")&&wid.equals("w7c6cfb14ed4f410aa33a440e6ab2e4bf"))) { - this.businessCardManagement.updateFromState2(scId, wid, this.state, company, text, representative, position, address1, establishment, text, businessCardManagement, text, text, text, text, address2); - } - String company = this.company.getValue(); - String text = this.text; - String representative = this.representative.getValue(); - String position = this.position.getValue(); - String address1 = this.address1.getValue(); - String establishment = this.establishment.getValue(); - String text = this.text; - Map> businessCardManagement = this.businessCardManagement.getValue(); - String text = this.text; - String text = this.text; - String text = this.text; - String text = this.text; - String address2 = this.address2.getValue(); - if ((scId.equals("登録画面1")&&wid.equals("w7c6cfb14ed4f410aa33a440e6ab2e4bf"))) { - this.curScreen.updateFromState8(scId, wid, this.state, company, text, representative, position, address1, establishment, text, businessCardManagement, text, text, text, text, address2); - } - String text = this.text; - String uRL = this.uRL.getValue(); - String text = this.text; - String businessdescription1 = this.businessdescription1.getValue(); - String address1 = this.address1.getValue(); - String text = this.text; - String text = this.text; - String establishment = this.establishment.getValue(); - String address2 = this.address2.getValue(); - Map> businessCardManagement = this.businessCardManagement.getValue(); - String text = this.text; - String text = this.text; - String text = this.text; - String text = this.text; - String text = this.text; - String representative = this.representative.getValue(); - String text = this.text; - String companyoverview = this.companyoverview.getValue(); - String businessdescription2 = this.businessdescription2.getValue(); - String company = this.company.getValue(); - String position = this.position.getValue(); - if ((scId.equals("登録画面1")&&wid.equals("wf10ab1752fe44c4d97ffb2ca2afdeba0"))) { - this.businessCardManagement.updateFromState(scId, wid, this.state, text, uRL, text, businessdescription1, address1, text, text, establishment, address2, businessCardManagement, text, text, text, text, text, representative, text, companyoverview, businessdescription2, company, position); - } - String text = this.text; - String text = this.text; - String editaddress1 = this.editaddress1.getValue(); - Map> businessCardManagement = this.businessCardManagement.getValue(); - String editposition = this.editposition.getValue(); - String text = this.text; - String editURL = this.editURL.getValue(); - String editestablish = this.editestablish.getValue(); - String text = this.text; - String editbusiness1 = this.editbusiness1.getValue(); - String text = this.text; - String text = this.text; - String text = this.text; - String editcompany = this.editcompany.getValue(); - String editbusiness2 = this.editbusiness2.getValue(); - String text = this.text; - String editaddress2 = this.editaddress2.getValue(); - String editrepresentative = this.editrepresentative.getValue(); - String editcompanydetail = this.editcompanydetail.getValue(); - String text = this.text; - String text = this.text; - this.widget1 = screen.getWidgets1().getWidget1(editaddress1.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editposition.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editcompanydetail.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editcompany.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editaddress2.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editbusiness2.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editrepresentative.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editestablish.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editbusiness1.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editURL.getValue()); - if ((scId.equals("編集画面2")&&wid.equals("w11dd0f050a5044d384b10351b83ad390"))) { - this.businessCardManagement.updateFromState3(scId, wid, this.state, text, text, editaddress1, businessCardManagement, editposition, text, editURL, editestablish, text, editbusiness1, text, text, text, editcompany, editbusiness2, text, editaddress2, editrepresentative, editcompanydetail, text, text); - } - String text = this.text; - String text = this.text; - String editaddress1 = this.editaddress1.getValue(); - Map> businessCardManagement = this.businessCardManagement.getValue(); - String editposition = this.editposition.getValue(); - String text = this.text; - String editURL = this.editURL.getValue(); - String editestablish = this.editestablish.getValue(); - String text = this.text; - String editbusiness1 = this.editbusiness1.getValue(); - String text = this.text; - String text = this.text; - String text = this.text; - String editcompany = this.editcompany.getValue(); - String editbusiness2 = this.editbusiness2.getValue(); - String text = this.text; - String editaddress2 = this.editaddress2.getValue(); - String editrepresentative = this.editrepresentative.getValue(); - String editcompanydetail = this.editcompanydetail.getValue(); - String text = this.text; - String text = this.text; - this.widget1 = screen.getWidgets1().getWidget1(editaddress1.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editposition.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editcompanydetail.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editcompany.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editaddress2.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editbusiness2.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editrepresentative.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editestablish.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editbusiness1.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(editURL.getValue()); - if ((scId.equals("編集画面2")&&wid.equals("w11dd0f050a5044d384b10351b83ad390"))) { - this.curScreen.updateFromState7(scId, wid, this.state, text, text, editaddress1, businessCardManagement, editposition, text, editURL, editestablish, text, editbusiness1, text, text, text, editcompany, editbusiness2, text, editaddress2, editrepresentative, editcompanydetail, text, text); - } - String text = this.text; - String search2 = this.search2.getValue(); - String text = this.text; - String text = this.text; - String text = this.text; - String search5 = this.search5.getValue(); - String search1 = this.search1.getValue(); - String text = this.text; - Map> businessCardManagement = this.businessCardManagement.getValue(); - String search3 = this.search3.getValue(); - String result = this.result.getValue(); - String search6 = this.search6.getValue(); - String searchCriteriaScreen = this.searchCriteriaScreen.getValue(); - this.widget1 = screen.getWidgets1().getWidget1(search1.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(search5.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(search3.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(search6.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(result.getValue()); - this.widget1 = screen.getWidgets1().getWidget1(search2.getValue()); - if ((screenId.equals("検索項目画面")&&widId.equals("w725d1e48b8584a70bad1fbdc07ea8280"))) { - this.widget1.updateDataFromState(screenId, widId, this.state, text, search2, text, text, text, search5, search1, text, businessCardManagement, search3, result, search6, searchCriteriaScreen); - } + public void textEvent(String wid, String nextText) { + this.text = nextText; + } + public void mouseEvent(String wid, int nextState) { + this.state = nextState; + this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets1().getWidget1(wid); + this.widget.updateStateFromState(wid, wid, wid, this.state, curScreen.getValue()); } - public int getState() { - return this.state; - } - public Widget(SwingPresenter presenter, Widget1 widget1, Map> data, Screen screen, String text, int state, BusinessCardManagement businessCardManagement, CurScreen curScreen) { - this.presenter = presenter; - this.widget1 = widget1; - this.data = data; - this.screen = screen; - this.text = text; - this.state = state; - this.businessCardManagement = businessCardManagement; - this.curScreen = curScreen; - } + public void setCurScreen(CurScreen curScreen) { + this.curScreen = curScreen; + } } \ No newline at end of file diff --git a/src/Widget1.java b/src/Widget1.java index 622ed59..5056eb2 100644 --- a/src/Widget1.java +++ b/src/Widget1.java @@ -1,187 +1,186 @@ import java.util.*; public class Widget1 { - private String text; - private int y; - private int width; - private int height; - private SwingPresenter presenter; + private String type; + private String text; + private boolean visible; + private int x; + private int y; + private int width; + private int height; + private int state; private Map> data; - private boolean visible; - private int x; - private Widget widget; - private ScreenTemplates screenTemplates; - private Widget widget; - private Widget widget; - private Widget widget; - private Widget widget; - private Widget widget; - private Widget widget; - private Widget widget; - private Widget widget; - private Widget widget; - private Widget widget; - private Widget widget; - private Widget widget; - private int state; + private BusinessCardManagement businessCardManagement; + private Widget widget1; + private Screen screen; + private CurScreen curScreen; + private SwingPresenter presenter; + public Widget1(String type, String text, boolean visible, int x, int y, int width, int height, int state, Map> data, Screen screen, BusinessCardManagement businessCardManagement, CurScreen curScreen, SwingPresenter presenter) { + this.type = type; + this.text = text; + this.visible = visible; + this.x = x; + this.y = y; + this.width = width; + this.height = height; + this.screen = screen; + this.state = state; + this.data = data; + this.businessCardManagement = businessCardManagement; + this.curScreen = curScreen; + this.presenter = presenter; + } public Map getValue() { - Map temp_nil3 = new HashMap<>(); - temp_nil3.put("visible",this.getVisible()); - temp_nil3.put("data",this.getData()); - temp_nil3.put("width",this.getWidth()); - temp_nil3.put("height",this.getHeight()); - temp_nil3.put("text",this.getText()); - temp_nil3.put("x",this.getX()); - temp_nil3.put("state",this.getState()); - temp_nil3.put("y",this.getY()); - return temp_nil3; + Map temp_nil1 = new HashMap<>(); + temp_nil1.put("type",this.getType()); + temp_nil1.put("text",this.getText()); + temp_nil1.put("visible",this.getVisible()); + temp_nil1.put("x",this.getX()); + temp_nil1.put("y",this.getY()); + temp_nil1.put("width",this.getWidth()); + temp_nil1.put("height",this.getHeight()); + temp_nil1.put("state",this.getState()); + temp_nil1.put("data",this.getData()); + return temp_nil1; } + public String getType() { + return this.type; + } public String getText() { return this.text; } - public void textEvent(String wid, String nextText) { - this.text = nextText; + public boolean getVisible() { + return this.visible; + } + public int getX() { + return this.x; + } + public int getY() { + return this.y; + } + public int getWidth() { + return this.width; + } + public int getHeight() { + return this.height; + } + public int getState() { + return this.state; + } + public void updateTextFromText(String self, String self2, String wid, String text, String curScreen) { + this.text = text; + } + public void updateDataFromBusinessCardManagement(String self, String self2, Map> businessCardManagement, String companyList, String w2d109ad3739d4744a1874ac179fc38b9) { + this.data = businessCardManagement; + this.presenter.setTable(scId, wid, businessCardManagement); } - public void updateFromWidget(String self, String scId, String wid, Map widget, String curScreen) { - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; - this.value = widget; + public void updateDataFromBusinessCardManagement2(String self, String self2, Map> businessCardManagement, String searchCriteriaScreen, String result) { + this.data = businessCardManagement; + this.presenter.setTable(scId, wid, businessCardManagement); } - public int getY() { - return this.y; - } - public int getWidth() { - return this.width; - } - public int getHeight() { - return this.height; - } - public void updateDataFromState(String self, String screenId, String widId, int state, String text, String searchCriteriaScreen, String text, String text, String result, String text, Map> businessCardManagement, String search2, String search3, String search1, String text, String search6, String search5) { - Map> temp_if0; - if ((state==0)) { - Map temp_json92 = new HashMap<>(); - temp_json92.put("事業内容1", text); - temp_json92.put("会社概要", text); - temp_json92.put("住所1", text); - temp_json92.put("事業内容2", text); - temp_json92.put("住所2", text); - Map temp_search0 = new HashMap<>(); - for (String key: businessCardManagement.keySet()) { - boolean isMatch = true; - for (String qKey: temp_json92.keySet()) { - Map value = businessCardManagement.get(key).getValue(); - for (String valKey: value.keySet()) { - if (valKey.equals(qKey)) { - if (value.get(valKey).equals(temp_json92.get(qKey))) { - isMatch = false; - } - break; - } - } - if (!isMatch) break; - } - if (isMatch) { - temp_search0.put(key, businessCardManagement.get(key)); - } - } - temp_if0 = temp_search0; - } else { - temp_if0 = this.data; - }this.data = temp_if0; - this.presenter.setTable(wid, temp_if1); + public void updateDataFromBusinessCardManagement3(String self, String self2, Map> businessCardManagement, String w4ca84254d30c423ab8e449171a5b5123, String searchScreen) { + this.data = businessCardManagement; + this.presenter.setTable(scId, wid, businessCardManagement); } public Map> getData() { return this.data; } - public boolean getVisible() { - return this.visible; - } - public int getX() { - return this.x; - } - public int getState() { - return this.state; - } - public void mouseEvent(String wid, int nextState) { - this.state = nextState; - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - String curScreen = this.curScreen.getValue(); - this.widget = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets().getWidget(wid); - this.widget.updateStateFromState(wid, wid, this.state, curScreen); - } - public Widget1(SwingPresenter presenter, boolean visible, ScreenTemplates screenTemplates, Map> data, int width, int x, int y, String text, int state, int height) { - this.presenter = presenter; - this.visible = visible; - this.screenTemplates = screenTemplates; - this.data = data; - this.width = width; - this.x = x; - this.y = y; - this.text = text; + public void updateStateFromState(String self, String self2, String wid, int state, String curScreen) { this.state = state; - this.height = height; + if ((curScreen.equals("編集画面2")&&wid.equals("w71f9e06eb3654cc2bb57ce3482579e11"))) { + this.curScreen.updateFromState10(curScreen, wid, this.state); + } + if ((curScreen.equals("検索項目画面")&&wid.equals("w614b5ee1e161473d8f859fbfb5c8074e"))) { + this.curScreen.updateFromState9(curScreen, wid, this.state); + } + if ((curScreen.equals("登録画面1")&&wid.equals("wf10ab1752fe44c4d97ffb2ca2afdeba0"))) { + this.curScreen.updateFromState6(curScreen, wid, this.state); + } + if ((curScreen.equals("検索画面")&&wid.equals("w7de33900c55f4379983056aee325c057"))) { + this.curScreen.updateFromState5(curScreen, wid, this.state); + } + if ((curScreen.equals("企業一覧")&&wid.equals("w0498c4eb3524489494c288e2fc7a3211"))) { + this.curScreen.updateFromState4(curScreen, wid, this.state); + } + if ((curScreen.equals("企業一覧")&&wid.equals("w191cc519b2344758b8d9878328b41cd9"))) { + this.curScreen.updateFromState3(curScreen, wid, this.state); + } + if ((curScreen.equals("検索画面")&&wid.equals("web3d4ea933244ee195c972cec50c9474"))) { + this.curScreen.updateFromState2(curScreen, wid, this.state); + } + if ((curScreen.equals("検索画面結果")&&wid.equals("w0becbeb6b2d54c03a69d63e3facd2eaa"))) { + this.curScreen.updateFromState(curScreen, wid, this.state); + } + String company = this.company.getValue(); + String text = this.text; + String representative = this.representative.getValue(); + String position = this.position.getValue(); + String address1 = this.address1.getValue(); + String address2 = this.address2.getValue(); + String establishment = this.establishment.getValue(); + Map> businessCardManagement = this.businessCardManagement.getValue(); + if ((curScreen.equals("登録画面1")&&wid.equals("w7c6cfb14ed4f410aa33a440e6ab2e4bf"))) { + this.businessCardManagement.updateFromState2(curScreen, wid, this.state, company, text, representative, position, address1, establishment, text, businessCardManagement, text, text, text, text, address2); + } + if ((curScreen.equals("登録画面1")&&wid.equals("w7c6cfb14ed4f410aa33a440e6ab2e4bf"))) { + this.curScreen.updateFromState8(curScreen, wid, text, this.state, company, representative, position, address1, address2, establishment, businessCardManagement); + } + String uRL = this.uRL.getValue(); + String businessdescription1 = this.businessdescription1.getValue(); + String companyoverview = this.companyoverview.getValue(); + String businessdescription2 = this.businessdescription2.getValue(); + if ((curScreen.equals("登録画面1")&&wid.equals("wf10ab1752fe44c4d97ffb2ca2afdeba0"))) { + this.businessCardManagement.updateFromState(curScreen, wid, this.state, text, uRL, text, businessdescription1, address1, text, text, establishment, address2, businessCardManagement, text, text, text, text, text, representative, text, companyoverview, businessdescription2, company, position); + } + String editaddress1 = this.editaddress1.getValue(); + String editposition = this.editposition.getValue(); + String editURL = this.editURL.getValue(); + String editestablish = this.editestablish.getValue(); + String editbusiness1 = this.editbusiness1.getValue(); + String editcompany = this.editcompany.getValue(); + String editbusiness2 = this.editbusiness2.getValue(); + String editaddress2 = this.editaddress2.getValue(); + String editrepresentative = this.editrepresentative.getValue(); + String editcompanydetail = this.editcompanydetail.getValue(); + this.widget1 = screen.getWidgets1().getWidget1(editaddress1.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editposition.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editcompanydetail.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editcompany.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editaddress2.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editbusiness2.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editrepresentative.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editestablish.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editbusiness1.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editURL.getValue()); + if ((curScreen.equals("編集画面2")&&wid.equals("w11dd0f050a5044d384b10351b83ad390"))) { + this.businessCardManagement.updateFromState3(curScreen, wid, this.state, text, text, editaddress1, businessCardManagement, editposition, text, editURL, editestablish, text, editbusiness1, text, text, text, editcompany, editbusiness2, text, editaddress2, editrepresentative, editcompanydetail, text, text); + } + this.widget1 = screen.getWidgets1().getWidget1(editaddress1.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editposition.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editcompanydetail.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editcompany.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editaddress2.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editbusiness2.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editrepresentative.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editestablish.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editbusiness1.getValue()); + this.widget1 = screen.getWidgets1().getWidget1(editURL.getValue()); + if ((curScreen.equals("編集画面2")&&wid.equals("w11dd0f050a5044d384b10351b83ad390"))) { + this.curScreen.updateFromState7(curScreen, wid, editaddress1, this.state, editaddress2, editURL, editbusiness1, editposition, text, businessCardManagement, editestablish, editcompanydetail, editcompany, editrepresentative, editbusiness2); + } + String search2 = this.search2.getValue(); + String search5 = this.search5.getValue(); + String search1 = this.search1.getValue(); + String search3 = this.search3.getValue(); + String result = this.result.getValue(); + String search6 = this.search6.getValue(); + String searchCriteriaScreen = this.searchCriteriaScreen.getValue(); + this.widget1 = screen.getWidgets1().getWidget1(search1.getValue()); + if ((curScreen.equals("検索項目画面")&&wid.equals("w725d1e48b8584a70bad1fbdc07ea8280"))) { + this.widget1.updateDataFromState(curScreen, wid, this.state, text, search2, text, text, text, search5, search1, text, businessCardManagement, search3, result, search6, searchCriteriaScreen); + } } + public void setCurScreen(CurScreen curScreen) { + this.curScreen = curScreen; + } } \ No newline at end of file diff --git a/src/Widgets.java b/src/Widgets.java index a021624..3faaf02 100644 --- a/src/Widgets.java +++ b/src/Widgets.java @@ -1,11 +1,77 @@ import java.util.*; public class Widgets { - private Map value = new HashMap<>(); - public Map getValue() { - return new HashMap<>(this.value); - } - public Widget getWidget(String wid) { - return this.value.get(wid); - } + private Map value = new HashMap<>(); + ScreenTemplates screenTemplates; + CurScreen curScreen; + SwingPresenter presenter; + public Widgets(ScreenTemplates screenTemplates, SwingPresenter presenter) { + this.screenTemplates = screenTemplates; + this.presenter = presenter; + } + public Map getValue() { + return new HashMap<>(this.value); + } + public void setValue(Map value) { + for (String key: value.keySet()) { + String type = ""; + if (((Map) value.get(key)) != null) type = (String) ((Map) value.get(key)).get("type"); + String text = ""; + if (((Map) value.get(key)) != null) text = (String) ((Map) value.get(key)).get("text"); + boolean visible = true; + if (((Map) value.get(key)) != null) visible = (boolean) ((Map) value.get(key)).get("visible"); + int x = 0; + if (((Map) value.get(key)) != null) x = (int) ((Map) value.get(key)).get("x"); + int y = 0; + if (((Map) value.get(key)) != null) y = (int) ((Map) value.get(key)).get("y"); + int width = 0; + if (((Map) value.get(key)) != null) width = (int) ((Map) value.get(key)).get("width"); + int height = 0; + if (((Map) value.get(key)) != null) height = (int) ((Map) value.get(key)).get("height"); + int state = 0; + if (((Map) value.get(key)) != null) state = (int) ((Map) value.get(key)).get("state"); + Widget widget = new Widget(type, text, visible, x, y, width, height, state, null, screenTemplates, presenter); + widget.setCurScreen(curScreen); + this.value.put(key, widget); + } + } + public Widget getWidget(String wid) { + return this.value.get(wid); + } + public void addMovableButton(String text, int x, int y, int width, int height, String wid) { + Widget widget = new Widget("button", text, true, x, y, width, height, 0, null, screenTemplates, presenter); + widget.setCurScreen(curScreen); + this.value.put(wid, widget); + } + public void addMovableTextInput(int x, int y, int width, int height, String wid) { + Widget widget = new Widget("textInput", "", true, x, y, width, height, 0, null, screenTemplates, presenter); + widget.setCurScreen(curScreen); + this.value.put(wid, widget); + } + public void addMovableLabel(String text, int x, int y, int width, int height, String wid) { + Widget widget = new Widget("label", text, true, x, y, width, height, 0, null, screenTemplates, presenter); + widget.setCurScreen(curScreen); + this.value.put(wid, widget); + } + public void addButton(String text, String wid) { + Widget widget = new Widget("button", text, true, 0, 0, 0, 0, 0, null, screenTemplates, presenter); + widget.setCurScreen(curScreen); + this.value.put(wid, widget); + } + public void addTextInput(String wid) { + Widget widget = new Widget("textInput", "", true, 0, 0, 0, 0, 0, null, screenTemplates, presenter); + widget.setCurScreen(curScreen); + this.value.put(wid, widget); + } + public void addLabel(String text, String wid) { + Widget widget = new Widget("label", text, true, 0, 0, 0, 0, 0, null, screenTemplates, presenter); + widget.setCurScreen(curScreen); + this.value.put(wid, widget); + } + public void setCurScreen(CurScreen curScreen) { + this.curScreen = curScreen; + for (Widget widget: value.values()) { + widget.setCurScreen(curScreen); + } + } } \ No newline at end of file diff --git a/src/Widgets1.java b/src/Widgets1.java index 9e3d740..61171b3 100644 --- a/src/Widgets1.java +++ b/src/Widgets1.java @@ -1,11 +1,48 @@ import java.util.*; public class Widgets1 { - private Map value = new HashMap<>(); - public Map getValue() { - return new HashMap<>(this.value); - } - public Widget1 getWidget1(String wid) { - return this.value.get(wid); - } + private CurScreen curScreen; + private Map value = new HashMap<>(); + private SwingPresenter presenter; + public Widgets1(SwingPresenter presenter) { + this.presenter = presenter; + } + public Map getValue() { + Map 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 value) { + for (String key: value.keySet()) { + String type = ""; + if (((Map) value.get(key)).get("type") != null) type = (String) ((Map) value.get(key)).get("type"); + int y = 0; + if (((Map) value.get(key)).get("y") != null) y = (int) ((Map) value.get(key)).get("y"); + int x = 0; + if (((Map) value.get(key)).get("x") != null) x = (int) ((Map) value.get(key)).get("x"); + int height = 0; + if (((Map) value.get(key)).get("height") != null) height = (int) ((Map) value.get(key)).get("height"); + String text = ""; + if (((Map) value.get(key)).get("text") != null) text = (String) ((Map) value.get(key)).get("text"); + boolean visible = false; + if (((Map) value.get(key)).get("visible") != null) visible = (boolean) ((Map) value.get(key)).get("visible"); + int width = 0; + if (((Map) value.get(key)).get("width") != null) width = (int) ((Map) value.get(key)).get("width"); + int state = 0; + if (((Map) value.get(key)).get("state") != null) state = (int) ((Map) value.get(key)).get("state"); + this.value.put(key, new Widget1(type, text,true, x, y, width, height, 0, null, null, null, null, presenter)); + } + } + public Widget1 getWidget1(String wid) { + return this.value.get(wid); + } + public void setCurScreen(CurScreen curScreen) { + this.curScreen = curScreen; + for (Widget1 widget: value.values()) { + widget.setCurScreen(curScreen); + } + } } \ No newline at end of file