if (this.scrollSmooth) {  this.targetXOffset = -startX;  } else { this.xOffset = -startX; }
this.xOffset = -startX;
	protected void initContent(Container parent, int firstLineWidth,			int lineWidth) 	{		//#debug		System.out.println("Initalizing ExclusiveSingleLineView");		if (this.isFocused && this.parentBackground == null) {			Background bg = parent.background;			if (bg != null) {				this.parentBackground = bg; 				parent.background = null;			}			//System.out.println("EXCLUSIVE:   INIT CONTENT WITH NO PARENT BG, now parentBackround != null: " + (this.parentBackground != null));		}		//TODO allow no selection for MULTIPLE		int selectedItemIndex = ((ChoiceGroup) parent).getSelectedIndex();		if (selectedItemIndex == -1) {			selectedItemIndex = 0;		}		if ( selectedItemIndex < parent.size() ) {			parent.focus (selectedItemIndex, parent.get( selectedItemIndex ), 0);		}		//parent.focusedIndex = selectedItemIndex;		int height = 0;		//#if polish.css.horizontalview-left-arrow || polish.css.horizontalview-right-arrow			int width = 0;			//#ifdef polish.css.horizontalview-left-arrow				if (this.leftArrow != null) {					width = this.leftArrow.getWidth();					height = this.leftArrow.getHeight();				}			//#endif			//#ifdef polish.css.horizontalview-right-arrow				if (this.rightArrow != null) {					if ( this.rightArrow.getWidth() > width) {						width = this.rightArrow.getWidth();						if (this.leftArrow.getHeight() > height) {							height = this.leftArrow.getHeight();						}					}				}			//#endif			//#if polish.css.horizontalview-left-arrow && polish.css.horizontalview-right-arrow				if (this.rightArrow != null && this.leftArrow != null) {					this.arrowWidth = width;				} else {			//#endif					if (width > this.arrowWidth) {						this.arrowWidth = width;					}			//#if polish.css.horizontalview-left-arrow && polish.css.horizontalview-right-arrow				}			//#endif		//#endif		//#if polish.css.horizontalview-arrow-padding			int completeArrowWidth = ( this.arrowWidth * 2 ) + this.paddingHorizontal + this.arrowPadding;		//#else			//# int completeArrowWidth = ( this.arrowWidth + this.paddingHorizontal ) << 1;		//#endif		//#ifdef polish.css.horizontalview-arrow-position			if (this.arrowPosition == POSITION_BOTH_SIDES) {		//#endif				this.leftArrowStartX = 0;				this.leftArrowEndX = this.arrowWidth;				this.rightArrowStartX = lineWidth - this.arrowWidth;				this.rightArrowEndX = lineWidth;		//#ifdef polish.css.horizontalview-arrow-position			} else if (this.arrowPosition == POSITION_RIGHT ){				this.leftArrowStartX = lineWidth - completeArrowWidth + this.paddingHorizontal;				this.leftArrowEndX = this.leftArrowStartX + this.arrowWidth;				this.rightArrowStartX = lineWidth - this.arrowWidth;				this.rightArrowEndX = lineWidth;			} else {				this.leftArrowStartX = 0;				this.leftArrowEndX = this.arrowWidth;				this.rightArrowStartX = this.arrowWidth + this.paddingHorizontal;				this.rightArrowEndX = this.rightArrowStartX + this.arrowWidth;			}		//#endif		lineWidth -= completeArrowWidth;		int completeWidth = 0;		Item[] items = parent.getItems();		for (int i = 0; i < items.length; i++) {			Item item = items[i];			//TODO allow drawing of boxes as well			((ChoiceItem) item).drawBox = false;			int itemHeight = item.getItemHeight(lineWidth, lineWidth);			int itemWidth = item.itemWidth;			if (itemHeight > height ) {				height = itemHeight;			}			int startX = completeWidth;			completeWidth += itemWidth + this.paddingHorizontal;			if ( i == selectedItemIndex) {				if ( startX + this.xOffset < 0 ) {					//#ifdef polish.css.horizontalview-scroll-mode						if (this.scrollSmooth) {					//#endif							this.targetXOffset = -startX;					//#ifdef polish.css.horizontalview-scroll-mode						} else {							this.xOffset = -startX;						}					//#endif				} else if ( completeWidth + this.xOffset > lineWidth ) {					//#ifdef polish.css.horizontalview-scroll-mode						if (this.scrollSmooth) {					//#endif							this.targetXOffset = lineWidth - completeWidth;					//#ifdef polish.css.horizontalview-scroll-mode						} else {							this.xOffset = lineWidth - completeWidth;							this.xOffset = -startX;						}					//#endif				}			}		}		this.contentHeight = height;		this.contentWidth = lineWidth + completeArrowWidth;				if (items.length > 0) {			this.appearanceMode = Item.INTERACTIVE;		} else {			this.appearanceMode = Item.PLAIN;		}		if (selectedItemIndex < items.length ) {			this.focusedItem = (ChoiceItem) items[ selectedItemIndex ];			this.currentItemIndex = selectedItemIndex;		}		//if ( selectedItem.isFocused ) {			//System.out.println("Exclusive Single Line View: contentHeight=" + this.contentHeight);		//}		//this.isInitialized = true;				//#if polish.css.horizontalview-left-arrow						if (this.leftArrow != null) {				this.leftYOffset = (this.contentHeight - this.leftArrow.getHeight()) / 2; // always center vertically			}		//#endif		//#if polish.css.horizontalview-right-arrow			if (this.rightArrow != null) {				this.rightYOffset = (this.contentHeight - this.rightArrow.getHeight()) / 2; // always center vertically			}		//#endif		//		System.out.println("leftX=" + this.leftArrowStartX);//		System.out.println("rightX=" + this.rightArrowStartX);//		System.out.println("arrowColor=" + Integer.toHexString(this.arrowColor));	}