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

import java.util.ArrayList;

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

/**
 * 
 * @author hammonds
 *
 */
public class ChoiceButton extends ADLAbstractWidget {

	public ChoiceButton(ADLWidget adlWidget) {
		super(adlWidget);
		name = new String("choice button");
		descriptor = Activator.getImageDescriptor(IImageKeys.ADL_CHOICE_BUTTON);
		try {
			for (ADLWidget childWidget : adlWidget.getObjects()) {
	        	if (childWidget.getType().equals("object")){
	        		_adlObject = new ADLObject(childWidget);
	        		if (_adlObject != null){
	        			_hasObject = true;
	        		}
	        		
	        	}
	        	else if (childWidget.getType().equals("control")){
	        		_adlControl = new ADLControl(childWidget);
	        		if (_adlControl != null){
	        			_hasControl = true;
	        		}
	        	}
			}
		}
		catch (WrongADLFormatException ex) {
			ex.printStackTrace();
		}
		// TODO Add Color mode to ChoiceButton
		// TODO Add Stacking to ChoiceButton
	}

	@Override
	public Object[] getChildren() {
		ArrayList<Object> ret = new ArrayList<Object>();
		if (_hasObject) ret.add( _adlObject);
		if (_hasControl) ret.add( _adlControl);
		return ret.toArray();
	}

}

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

import java.util.ArrayList;

import org.csstudio.utility.adlparser.Activator;
import org.csstudio.utility.adlparser.IImageKeys;
import org.csstudio.utility.adlparser.fileParser.ADLWidget;
import org.csstudio.utility.adlparser.fileParser.FileLine;
import org.csstudio.utility.adlparser.fileParser.WrongADLFormatException;
import org.csstudio.utility.adlparser.fileParser.widgetParts.ADLControl;
import org.csstudio.utility.adlparser.fileParser.widgetParts.ADLObject;
import org.csstudio.utility.adlparser.internationalization.Messages;

/**
 * 
 * @author hammonds
 *
 */
public class ChoiceButton extends ADLAbstractWidget {
	private String color_mode = new String("static");
	private String stacking = new String("column");

	public ChoiceButton(ADLWidget adlWidget) {
		super(adlWidget);
		name = new String("choice button");
		descriptor = Activator.getImageDescriptor(IImageKeys.ADL_CHOICE_BUTTON);
		try {
			for (ADLWidget childWidget : adlWidget.getObjects()) {
	        	if (childWidget.getType().equals("object")){
	        		_adlObject = new ADLObject(childWidget);
	        		if (_adlObject != null){
	        			_hasObject = true;
	        		}
	        		
	        	}
	        	else if (childWidget.getType().equals("control")){
	        		_adlControl = new ADLControl(childWidget);
	        		if (_adlControl != null){
	        			_hasControl = true;
	        		}
	        	}
			}
			for (FileLine fileLine : adlWidget.getBody()){
				String bodyPart = fileLine.getLine();
				String[] row = bodyPart.trim().split("=");
				if (row.length < 2){
					throw new WrongADLFormatException(Messages.Label_WrongADLFormatException_Parameter_Begin + bodyPart + Messages.Label_WrongADLFormatException_Parameter_End);
				}
				if (FileLine.argEquals(row[0], "clrmod")){
					setColor_mode(FileLine.getTrimmedValue(row[1]));
				}
				else if (FileLine.argEquals(row[0], "stacking")){
					setStacking(FileLine.getTrimmedValue(row[1]));
				}
			}
		}
		catch (WrongADLFormatException ex) {
			ex.printStackTrace();
		}
		// TODO Add Color mode to ChoiceButton
		// TODO Add Stacking to ChoiceButton
	}

	@Override
	public Object[] getChildren() {
		ArrayList<Object> ret = new ArrayList<Object>();
		if (_hasObject) ret.add( _adlObject);
		if (_hasControl) ret.add( _adlControl);
		return ret.toArray();
	}

	/**
	 * @param color_mode the color_mode to set
	 */
	public void setColor_mode(String color_mode) {
		this.color_mode = color_mode;
	}

	/**
	 * @return the color_mode
	 */
	public String getColor_mode() {
		return color_mode;
	}

	/**
	 * @param stacking the stacking to set
	 */
	public void setStacking(String stacking) {
		this.stacking = stacking;
	}

	/**
	 * @return the stacking
	 */
	public String getStacking() {
		return stacking;
	}

}

Add code to get color model and stacking