import java.util.*;
public class Widget {
private CurScreen curScreen;
private String type;
private int y;
private boolean visible;
private int height;
private int width;
private String text;
private int x;
private Widget1 widget1;
private ScreenTemplates screenTemplates;
private int state;
public Map<String, Object> getValue() {
Map temp_nil0 = new HashMap<>();
temp_nil0.put("type",this.getType());
temp_nil0.put("y",this.getY());
temp_nil0.put("x",this.getX());
temp_nil0.put("height",this.getHeight());
temp_nil0.put("text",this.getText());
temp_nil0.put("visible",this.getVisible());
temp_nil0.put("width",this.getWidth());
temp_nil0.put("state",this.getState());
return temp_nil0;
}
public String getType() {
return type;
}
public int getY() {
return this.y;
}
public void changeY(String wid, int y) {
this.y = y;
}
public boolean getVisible() {
return this.visible;
}
public int getHeight() {
return this.height;
}
public int getWidth() {
return this.width;
}
public String getText() {
return this.text;
}
public void textEvent(String wid, String nextText) {
this.text = nextText;
}
public int getX() {
return this.x;
}
public void changeX(String wid, int x) {
this.x = x;
}
public int getState() {
return this.state;
}
public void mouseEvent(String wid, int nextState) {
this.state = nextState;
this.widget1 = screenTemplates.getScreenTemplate(curScreen.getValue()).getWidgets1().getWidget1(wid);
this.widget1.updateStateFromState(wid, wid, wid, this.state, curScreen.getValue());
}
public Widget(String type, boolean visible, ScreenTemplates screenTemplates, int width, int x, int y, String text, int state, int height, CurScreen curScreen) {
this.type = type;
this.visible = visible;
this.screenTemplates = screenTemplates;
this.width = width;
this.x = x;
this.y = y;
this.text = text;
this.state = state;
this.height = height;
this.curScreen = curScreen;
}
}