import javax.swing.*;
import java.util.*;
public class CurScreen {
private Screen screen;
private ScreenTemplates screenTemplates;
private String value = "企業一覧";
public CurScreen(Screen screen, ScreenTemplates screenTemplates) {
this.screen = screen;
this.screenTemplates = screenTemplates;
}
public String getValue() {
return new String(this.value);
}
public void updateFromState(String scId, String wid, int state) {
String temp_if2;
if ((state==0)) {
temp_if2 = "企業一覧";
} else {
temp_if2 = this.value;
}
this.value = temp_if2;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void updateFromState2(String scId, String wid, int state) {
String temp_if3;
if ((state==0)) {
temp_if3 = "登録画面1";
} else {
temp_if3 = this.value;
}
this.value = temp_if3;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void updateFromState3(String scId, String wid, int state) {
String temp_if4;
if ((state==0)) {
temp_if4 = "検索項目画面";
} else {
temp_if4 = this.value;
}
this.value = temp_if4;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void updateFromState4(String scId, String wid, int state) {
String temp_if5;
if ((state==0)) {
temp_if5 = "企業一覧";
} else {
temp_if5 = this.value;
}
this.value = temp_if5;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void updateFromState5(String scId, String wid, int state, String company_, String representative_, String position_, String establish_, String address1_, String address2_, String business1_, String business2_, String companydetail_, String URL_, Map<String, Map<String, Object>> businessCardManagement, String companyList, String w2d109ad3739d4744a1874ac179fc38b9) {
String temp_if7;
if ((state==0)) {
String temp_if6;
if (!company_.isEmpty()) {
Widget1 widget = screenTemplates.getScreenTemplate(companyList).getWidgets1().getWidget1(w2d109ad3739d4744a1874ac179fc38b9);
String prevCompany = widget.getText();
if (!company_.equals(prevCompany)) {
if (businessCardManagement.containsKey(prevCompany)) {
temp_if6 = this.value;
} else {
temp_if6 = "企業一覧";
}
} else {
temp_if6 = "企業一覧";
}
} else {
temp_if6 = this.value;
}
temp_if7 = temp_if6;
} else {
temp_if7 = this.value;
}
this.value = temp_if7;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void updateFromState6(String scId, String wid, int state, String company, String representative, String position, String establishment, String address1, String address2, String businessdescription1, String businessdescription2, String companyoverview, String URL, Map<String, Map<String, Object>> businessCardManagement) {
String temp_if9;
if ((state==0)) {
String temp_if8;
if ((!company.equals("")&&!(businessCardManagement.containsKey(company)))) {
temp_if8 = "企業一覧";
} else {
temp_if8 = this.value;
}
temp_if9 = temp_if8;
} else {
temp_if9 = this.value;
}
this.value = temp_if9;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void updateFromState7(String scId, String wid, int state) {
String temp_if10;
if ((state==0)) {
temp_if10 = "検索画面";
} else {
temp_if10 = this.value;
}
this.value = temp_if10;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void updateFromState8(String scId, String wid, int state) {
String temp_if11;
if ((state==0)) {
temp_if11 = "企業一覧";
} else {
temp_if11 = this.value;
}
this.value = temp_if11;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void updateFromState9(String scId, String wid, int state) {
String temp_if12;
if ((state==0)) {
temp_if12 = "企業一覧";
} else {
temp_if12 = this.value;
}
this.value = temp_if12;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void updateFromState10(String scId, String wid, int state) {
String temp_if13;
if ((state==0)) {
temp_if13 = "検索項目画面";
} else {
temp_if13 = this.value;
}
this.value = temp_if13;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void updateFromState11(String scId, String wid, int state, String tableWid, String key, String company, String representative, String position, String establishment, String address1, String address2, String business1, String business2, String companyoverview, String URL, String contactPerson1, String position1, String tel1, String email1, String contactPerson2, String position2, String tel2, String email2, String contactPerson3, String position3, String tel3, String email3, String contactPerson4, String position4, String tel4, String email4, String company_, String representative_, String position_, String establish_, String address1_, String address2_, String business1_, String business2_, String companyoverview_, String URL_, String contactPerson1_, String position1_, String tel1_, String email1_, String contactPerson2_, String position2_, String tel2_, String email2_, String contactPerson3_, String position3_, String tel3_, String email3_, String contactPerson4_, String position4_, String tel4_, String email4_) {
String temp_if14;
if ((state==0)) {
temp_if14 = "編集画面2";
} else {
temp_if14 = this.value;
}
this.value = temp_if14;
ScreenTemplate screenTemplate = screenTemplates.getScreenTemplate(this.value);
if ((state==0)) {
screenTemplate.getWidgets1().getWidget1(company).updateText(company_);
screenTemplate.getWidgets1().getWidget1(representative).updateText(representative_);
screenTemplate.getWidgets1().getWidget1(position).updateText(position_);
screenTemplate.getWidgets1().getWidget1(establishment).updateText(establish_);
screenTemplate.getWidgets1().getWidget1(address1).updateText(address1_);
screenTemplate.getWidgets1().getWidget1(address2).updateText(address2_);
screenTemplate.getWidgets1().getWidget1(business1).updateText(business1_);
screenTemplate.getWidgets1().getWidget1(business2).updateText(business2_);
screenTemplate.getWidgets1().getWidget1(companyoverview).updateText(companyoverview_);
screenTemplate.getWidgets1().getWidget1(URL).updateText(URL_);
screenTemplate.getWidgets1().getWidget1(contactPerson1).updateText(contactPerson1_);
screenTemplate.getWidgets1().getWidget1(position1).updateText(position1_);
screenTemplate.getWidgets1().getWidget1(tel1).updateText(tel1_);
screenTemplate.getWidgets1().getWidget1(email1).updateText(email1_);
screenTemplate.getWidgets1().getWidget1(contactPerson2).updateText(contactPerson2_);
screenTemplate.getWidgets1().getWidget1(position2).updateText(position2_);
screenTemplate.getWidgets1().getWidget1(tel2).updateText(tel2_);
screenTemplate.getWidgets1().getWidget1(email2).updateText(email2_);
screenTemplate.getWidgets1().getWidget1(contactPerson3).updateText(contactPerson3_);
screenTemplate.getWidgets1().getWidget1(position3).updateText(position3_);
screenTemplate.getWidgets1().getWidget1(tel3).updateText(tel3_);
screenTemplate.getWidgets1().getWidget1(email3).updateText(email3_);
screenTemplate.getWidgets1().getWidget1(contactPerson4).updateText(contactPerson4_);
screenTemplate.getWidgets1().getWidget1(position4).updateText(position4_);
screenTemplate.getWidgets1().getWidget1(tel4).updateText(tel4_);
screenTemplate.getWidgets1().getWidget1(email4).updateText(email4_);
}
this.screen.updateFromCurScreen(this.value, screenTemplate.getValue());
}
public void changeCurScreen(String nextScId) {
this.value = nextScId;
Map<String, Object> screenTemplate = screenTemplates.getScreenTemplate(this.value).getValue();
this.screen.updateFromCurScreen(this.value, screenTemplate);
}
}