package org.csstudio.utility.adlparser.fileParser.widgets;

import org.csstudio.utility.adlparser.fileParser.ADLWidget;
import org.csstudio.utility.adlparser.fileParser.WrongADLFormatException;
import org.csstudio.utility.adlparser.fileParser.widgetParts.ADLObject;

public class ADLDisplay extends ADLAbstractWidget {

	public ADLDisplay(ADLWidget adlWidget) {
		super(adlWidget);
		try {
			for (ADLWidget childWidget : adlWidget.getObjects()) {
	        	if (childWidget.getType().equals("object")){
	        		_adlObject = new ADLObject(childWidget);
	        		if (_adlObject != null){
	        			_hasObject = true;
	        		}
	        		
	        	}
	        }
		}
		catch (WrongADLFormatException ex) {
			
		}
	}

}

@@ -113,16 +113,75 @@
 Widget;%0A
+import org.csstudio.utility.adlparser.fileParser.FileLine;%0A
 import o
@@ -246,16 +246,16 @@
 eption;%0A
-
 import o
@@ -317,16 +317,85 @@
 LObject;
+%0Aimport org.csstudio.utility.adlparser.internationalization.Messages;
 %0A%0Apublic
@@ -440,17 +440,63 @@
 idget %7B%0A
+%09private String _clr;%0A%09private String _bclr;%0A%09
 %0A
-
 %09public 
@@ -837,20 +837,985 @@
       %7D%0A
+%09        for (FileLine fileLine : adlWidget.getBody()) %7B%0A%09            String parameter = fileLine.getLine();%0A%09            if(parameter.trim().startsWith(%22//%22))%7B //$NON-NLS-1$%0A%09                continue;%0A%09            %7D%0A%09            String%5B%5D row = parameter.split(%22=%22); //$NON-NLS-1$%0A%09            if(row.length!=2)%7B%0A%09                throw new WrongADLFormatException(Messages.ADLMonitor_WrongADLFormatException_Begin+parameter+Messages.ADLMonitor_WrongADLFormatException_End);%0A%09            %7D%0A%09            if(row%5B0%5D.trim().toLowerCase().equals(%22clr%22))%7B //$NON-NLS-1$%0A%09                set_clr(row%5B1%5D.trim());%0A%09            %7Delse if(row%5B0%5D.trim().toLowerCase().equals(%22bclr%22))%7B //$NON-NLS-1$%0A%09                set_bclr(row%5B1%5D.trim());%0A%09            %7Delse %7B%0A%09                throw new WrongADLFormatException(Messages.ADLMonitor_WrongADLFormatException_Parameter_Begin+row%5B0%5D+Messages.ADLMonitor_WrongADLFormatException_Parameter_End+parameter);%0A%09            %7D%0A%09        %7D%0A
 %09%09%7D%0A
+%09%09%0A
 %09%09catch 
@@ -1857,10 +1857,379 @@
 %09%09%7D%0A%09%7D%0A%0A
+%09/**%0A%09 * @param _clr the _clr to set%0A%09 */%0A%09public void set_clr(String _clr) %7B%0A%09%09this._clr = _clr;%0A%09%7D%0A%0A%09/**%0A%09 * @return the _clr%0A%09 */%0A%09public String get_clr() %7B%0A%09%09return _clr;%0A%09%7D%0A%0A%09/**%0A%09 * @param _bclr the _bclr to set%0A%09 */%0A%09public void set_bclr(String _bclr) %7B%0A%09%09this._bclr = _bclr;%0A%09%7D%0A%0A%09/**%0A%09 * @return the _bclr%0A%09 */%0A%09public String get_bclr() %7B%0A%09%09return _bclr;%0A%09%7D%0A%0A%09%0A
 %7D%0A

Deal with colors for the display