public void setStyle( Style style, boolean ignoreBackground) { super.setStyle(style); if (ignoreBackground) { this.background = null; this.border = null; this.borderWidth = 0; this.marginTop = 0; this.marginBottom = 0; this.marginLeft = 0; this.marginRight = 0;
public void setStyle(Style style) {  if (this.parent == null) {  System.out.println("Container.setStyle without boolean parameter for container " + toString() );
	public void setStyle( Style style, boolean ignoreBackground) {		super.setStyle(style);		if (ignoreBackground) {			this.background = null;			this.border = null;			this.borderWidth = 0;			this.marginTop = 0;			this.marginBottom = 0;			this.marginLeft = 0;			this.marginRight = 0;		}		//#if polish.css.focused-style			this.focusedTopMargin = this.focusedStyle.marginTop + this.focusedStyle.paddingTop;			if (this.focusedStyle.border != null) {				this.focusedTopMargin += this.focusedStyle.border.borderWidth;			}			if (this.focusedStyle.background != null) {				this.focusedTopMargin += this.focusedStyle.background.borderWidth;			}		//#endif				//#ifdef polish.css.view-type			ContainerView viewType = (ContainerView) style.getObjectProperty("view-type");//			if (this instanceof ChoiceGroup) {//				System.out.println("SET.STYLE / CHOICEGROUP: found view-type (1): " + (viewType != null) + " for " + this);//			}			if (viewType != null) {				if (this.view != null && this.view.getClass() == viewType.getClass()) {					this.view.focusFirstElement = this.autoFocusEnabled;					//System.out.println("SET.STYLE / CHOICEGROUP: found OLD view-type (2): " + viewType + " for " + this);				} else {					//System.out.println("SET.STYLE / CHOICEGROUP: found new view-type (2): " + viewType + " for " + this);					try {						if (viewType.parentContainer != null) {							viewType = (ContainerView) viewType.getClass().newInstance();						}						viewType.parentContainer = this;						viewType.focusFirstElement = this.autoFocusEnabled;						//#if polish.Container.allowCycling != false							viewType.allowCycling = this.allowCycling;						//#else							viewType.allowCycling = false;						//#endif						this.view = viewType;					} catch (Exception e) {						//#debug error						System.out.println("Container: Unable to init view-type " + e );						viewType = null;					}				}			}		//#endif		//#ifdef polish.css.columns			if (this.view == null) {				Integer columns = style.getIntProperty("columns");				if (columns != null) {					if (columns.intValue() > 1) {						//System.out.println("Container: Using default container view for displaying table");						this.view = new ContainerView();  						this.view.parentContainer = this;						this.view.focusFirstElement = this.autoFocusEnabled;						//#if polish.Container.allowCycling != false							this.view.allowCycling = this.allowCycling;						//#else							this.view.allowCycling = false;						//#endif					}				}			}		//#endif		//#if polish.css.scroll-mode			Integer scrollModeInt = style.getIntProperty("scroll-mode");			if ( scrollModeInt != null ) {				this.scrollSmooth = (scrollModeInt.intValue() == SCROLL_SMOOTH);			}		//#endif			//#ifdef tmp.supportViewType			if (this.view != null) {				this.view.setStyle(style);			}		//#endif	}