package com.sandwell.JavaSimulation3D;

import com.sandwell.JavaSimulation.ColourInput;
import com.sandwell.JavaSimulation.Keyword;

public class BooleanIndicator extends DisplayEntity {

	private PropertyReader propReader;

	@Keyword(description = "The colour of the indicator when the property is true",
	         example = "BinLevel TrueColor { green }")
	private final ColourInput trueColor;

	@Keyword(description = "The colour of the indicator when the property is false",
	         example = "BinLevel TrueColor { green }")
	private final ColourInput falseColor;

	{
		propReader = new PropertyReader();
		addInputGroup(propReader);

		trueColor = new ColourInput("TrueColour", "Key Inputs", ColourInput.GREEN);
		this.addInput(trueColor, true, "TrueColor");

		falseColor = new ColourInput("FalseColour", "Key Inputs", ColourInput.RED);
		this.addInput(falseColor, true, "FalseColor");
	}

	public BooleanIndicator() {
	}

	@Override
	public void updateGraphics( double time ) {

		String val = propReader.getPropertyValueString(time);
		if(val.equals( "true" ) ) {
			setTagColour(DisplayModelCompat.TAG_CONTENTS, trueColor.getValue());
		}
		else {
			setTagColour(DisplayModelCompat.TAG_CONTENTS, falseColor.getValue());
		}
	}

}

@@ -33,16 +33,54 @@
 ion3D;%0A%0A
+import com.jaamsim.input.OutputInput;%0A
 import c
@@ -115,24 +115,24 @@
 olourInput;%0A
-
 import com.s
@@ -232,33 +232,43 @@
 ate 
-PropertyReader propReader
+final OutputInput%3CBoolean%3E boolProp
 ;%0A%0A%09
@@ -621,69 +621,124 @@
 %7B%0A%09%09
-propReader = new PropertyReader();%0A%09%09addInputGroup(propReader
+boolProp = new OutputInput%3CBoolean%3E(Boolean.class, %22OutputName%22, %22Key Inputs%22, null);%0A%09%09this.addInput(boolProp, true
 );%0A%0A
@@ -1087,91 +1087,75 @@
 ) %7B%0A
-%0A
 %09%09
-String val = propReader.getPropertyValueString(time);%0A%09%09if(val.equals( %22true%22 ) 
+Boolean b = boolProp.getOutputValue(time);%0A%09%09if (b.booleanValue()
 ) %7B%0A

convert BooleanIndicator to use Outputs rather than target methods