All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.cmu.sv.domain.smart_house.GUI.GUIElectronic Maven / Gradle / Ivy

Go to download

A library that allows rapid prototyping of dialog systems (language understanding, discourse modelling, dialog management, language generation).

There is a newer version: 0.7.0
Show newest version
package edu.cmu.sv.domain.smart_house.GUI;

import edu.cmu.sv.domain.smart_house.SmartHouseCommandLineSystem;

public abstract class GUIElectronic extends GUIThing {
	private boolean state; // true -> on, false -> off
	
	public GUIElectronic(String name, GUIRoom room, boolean state, String correspondingURI) {
		super(name, room, correspondingURI);
		this.state = state;
	}

	public void toggleSwitch() {
		state = state ? false : true;
		if (Simulator.runningGUI)
			((MainFrame) SmartHouseCommandLineSystem.frame).refreshGUI();
	}
	
	public boolean getState() {
		return state;
	}
	public void setState(boolean newState) {state = newState;}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy