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

import org.csstudio.utility.adlparser.fileParser.ADLWidget;
import org.csstudio.utility.adlparser.fileParser.widgetParts.ADLBasicAttribute;
import org.csstudio.utility.adlparser.fileParser.widgetParts.ADLControl;
import org.csstudio.utility.adlparser.fileParser.widgetParts.ADLDynamicAttribute;
import org.csstudio.utility.adlparser.fileParser.widgetParts.ADLMonitor;
import org.csstudio.utility.adlparser.fileParser.widgetParts.ADLObject;
import org.csstudio.utility.adlparser.fileParser.widgetParts.ADLPoints;
import org.csstudio.utility.adlparser.fileParser.widgetParts.RelatedDisplayItem;

public abstract class ADLAbstractWidget {
	protected ADLObject _adlObject= null;
	protected ADLBasicAttribute _adlBasicAttribute= null;
	protected ADLControl _adlControl= null;
	protected ADLMonitor _adlMonitor= null;
	protected ADLPoints _adlPoints= null;
	protected RelatedDisplayItem[] _relatedDisplayItem = null;
	protected ADLDynamicAttribute _adlDynamicAttribute = null;

	protected boolean _hasBasicAttribute = false;
	protected boolean _hasObject = false;
	protected boolean _hasControl = false;
	protected boolean _hasMonitor = false;
	protected boolean _hasPoints = false;
	protected boolean _hasRelatedDisplayItem = false;
	protected boolean _hasDynamicAttribute = false;
	
	public ADLAbstractWidget(final ADLWidget adlWidget){
		
	}
	
	public boolean hasADLObject(){
		return _hasObject;
	}
	
	public boolean hasADLBasicAttribute(){
		return _hasBasicAttribute;
	}

	public boolean hasADLControl(){
		return _hasControl;
	}
	
	public boolean hasADLMonitor(){
		return _hasMonitor;
	}
	
	public boolean hasADLPoints(){
		return _hasPoints;
	}
	
	public boolean hasRelatedDisplayItem(){
		return _hasRelatedDisplayItem;
	}
	
	public boolean hasADLDynamicAttribute(){
		return _hasDynamicAttribute;
	}
	

	/**
	 * @return ADLObject
	 */
	public ADLObject getAdlObject(){
		return _adlObject;
	}

	/**
	 * @return ADLBasicAttribute
	 */
	public ADLBasicAttribute getAdlBasicAttribute(){
		return _adlBasicAttribute;
	}

	/**
	 * @return ADLControl
	 */
	public ADLControl getAdlControl(){
		return _adlControl;
	}

	/**
	 * @return ADLMonitor
	 */
	public ADLMonitor getAdlMonitor(){
		return _adlMonitor;
	}

	/**
	 * @return ADLPoints
	 */
	public ADLPoints getAdlPoints(){
		return _adlPoints;
	}

	/**
	 * @return RelatedDisplayItem[]
	 */
	public RelatedDisplayItem[] getRelatedDisplayItem(){
		return _relatedDisplayItem;
	}

	/**
	 * @return ADLDynamicAttribute
	 */
	public ADLDynamicAttribute getAdlDynamicAttribute(){
		return _adlDynamicAttribute;
	}

}	

@@ -340,32 +340,104 @@
 namicAttribute;%0A
+import org.csstudio.utility.adlparser.fileParser.widgetParts.ADLLimits;%0A
 import org.csstu
@@ -493,16 +493,16 @@
 onitor;%0A
-
 import o
@@ -1096,17 +1096,58 @@
 = null;%0A
+%09protected ADLLimits _adlLimits = null;%0A%09
 %0A
-
 %09protect
@@ -1443,16 +1443,55 @@
  false;%0A
+%09protected boolean _hasLimits = false;%0A
 %09%0A%09publi
@@ -2011,16 +2011,74 @@
 te;%0A%09%7D%0A%09
+%0A%09public boolean hasADLLimits()%7B%0A%09%09return _hasLimits;%0A%09%7D%0A%09
 %0A%0A%09/**%0A%09
@@ -2785,32 +2785,32 @@
 micAttribute()%7B%0A
-
 %09%09return _adlDyn
@@ -2828,11 +2828,102 @@
 te;%0A%09%7D%0A%0A
+%09/**%0A%09 * @return ADLLimits%0A%09 */%0A%09public ADLLimits getAdlLimits()%7B%0A%09%09return _adlLimits;%0A%09%7D%0A%0A
 %7D%09%0A

Add ADLLimits