Newer
Older
SimpleUI / src / Widget1.java
import java.util.*;

public class Widget1 {
	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 int state;
	public Map<String, Object> getValue() {
		Map temp_nil2 = new HashMap<>();
		temp_nil2.put("type",this.getType());
		temp_nil2.put("y",this.getY());
		temp_nil2.put("x",this.getX());
		temp_nil2.put("height",this.getHeight());
		temp_nil2.put("text",this.getText());
		temp_nil2.put("visible",this.getVisible());
		temp_nil2.put("width",this.getWidth());
		temp_nil2.put("state",this.getState());
		return temp_nil2;
	}
	public String getType() {
		return this.type;
	}
	public int getY() {
		return this.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 int getX() {
		return this.x;
	}
	public void updateStateFromState(String self, String self2, String wid, int state, String curScreen) {
		this.state = state;
		if ((curScreen.equals("001")&&wid.equals("004"))) {
			this.curScreen.updateFromState(curScreen, wid, this.state);
		}
		if ((curScreen.equals("000")&&wid.equals("002"))) {
			this.curScreen.updateFromState2(curScreen, wid, this.state);
		}
	}
	public int getState() {
		return this.state;
	}
	public Widget1(String type, boolean visible, int width, int x, int y, String text, int state, int height) {
		this.type = type;
		this.visible = visible;
		this.width = width;
		this.x = x;
		this.y = y;
		this.text = text;
		this.state = state;
		this.height = height;
	}

	public void setCurScreen(CurScreen curScreen) {
		this.curScreen = curScreen;
	}
}