String labelStyleName = style.getProperty("label-style"); if (labelStyleName != null) { this.labelStyle = StyleSheet.getStyle( labelStyleName );
Style labStyle = (Style) style.getObjectProperty("label-style"); if (labStyle != null) { this.labelStyle = labStyle;
	public void setStyle( Style style ) {		this.isInitialised = false;		this.isStyleInitialised = true;		this.style = style;		if (style != StyleSheet.defaultStyle) {			this.layout = style.layout;		}		// horizontal styles: center -> right -> left		if ( ( this.layout & LAYOUT_CENTER ) == LAYOUT_CENTER ) {			this.isLayoutCenter = true;			this.isLayoutRight = false;		} else {			this.isLayoutCenter = false;			if ( ( this.layout & LAYOUT_RIGHT ) == LAYOUT_RIGHT ) {				this.isLayoutRight = true;			} else {				this.isLayoutRight = false;			}		}		//System.out.println(" style [" + style.name + "]: right: " + this.isLayoutRight + " center: " + this.isLayoutCenter);		// vertical styles: vcenter -> bottom -> top		// expanding layouts:		if ( ( this.layout & LAYOUT_EXPAND ) == LAYOUT_EXPAND ) {			this.isLayoutExpand = true;		} else {			this.isLayoutExpand = false;		}		this.background = style.background;		this.border = style.border;		if (this.border != null) {			this.borderWidth = this.border.borderWidth;		} else if (this.background != null){			this.borderWidth = this.background.borderWidth;		} else {			this.borderWidth = 0;		}		this.paddingLeft = style.paddingLeft;		this.paddingRight = style.paddingRight;		this.paddingTop = style.paddingTop;		this.paddingBottom = style.paddingBottom;		this.paddingVertical = style.paddingVertical;		this.paddingHorizontal = style.paddingHorizontal;		this.marginLeft = style.marginLeft;		this.marginRight = style.marginRight;		this.marginTop = style.marginTop;		this.marginBottom = style.marginBottom;		//#ifdef polish.useBeforeStyle			if (style.before != null) {				this.beforeWidth = style.beforeWidth + this.paddingHorizontal;				this.beforeHeight = style.beforeHeight;			} else {				this.beforeWidth = 0;				this.beforeHeight = 0;			}			this.beforeImage = style.before;		//#endif		//#ifdef polish.useAfterStyle			if (style.after != null) {				this.afterWidth = style.afterWidth + this.paddingHorizontal;				this.afterHeight = style.afterHeight;			} else {				this.afterWidth = 0;				this.afterHeight = 0;			}			this.afterImage = style.after;		//#endif		//#ifdef polish.css.label-style			String labelStyleName = style.getProperty("label-style");			if (labelStyleName != null) {				this.labelStyle = StyleSheet.getStyle( labelStyleName );			} else {				this.labelStyle = StyleSheet.labelStyle;			}		//#else			this.labelStyle = StyleSheet.labelStyle;		//#endif		if (this.label != null) {			this.label.setStyle( this.labelStyle );					}	}