if (this.style == null) { this.cssSelector = createCssSelector(); setStyle( StyleSheet.getStyle( this ) ); } else { this.cssSelector = this.style.name;
if (this.style == null) { this.cssSelector = createCssSelector(); setStyle( StyleSheet.getStyle( this ) ); } else { this.cssSelector = this.style.name; }   Style menuStyle = StyleSheet.getStyle("menu"); if (menuStyle != null) { String colorStr = menuStyle.getProperty("menubar-color"); if (colorStr != null) { this.menuBarColor = Integer.parseInt(colorStr); } this.menuFontColor = menuStyle.labelFontColor; if (menuStyle.labelFont != null) { this.menuFont = menuStyle.labelFont; } else { this.menuFont = Font.getFont( Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM ); } } else { this.menuFont = Font.getFont( Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM ); } this.menuBarHeight = this.menuFont.getHeight() + 2; this.screenHeight = this.fullScreenHeight - this.menuBarHeight;    setTitle( this.titleText );  if (StyleSheet.animationThread == null) { StyleSheet.animationThread = new AnimationThread(); StyleSheet.animationThread.start();
	public void init() {		if (this.style != null) {			setStyle( this.style );		}		//StyleSheet.gauge = null;		if (StyleSheet.animationThread == null) {			StyleSheet.animationThread = new AnimationThread();			StyleSheet.animationThread.start();		}		// inform all root items that they belong to this screen:		if (this.container != null) {			this.container.screen = this;			//TODO rob check scrolling dimensions			// this.container.setVerticalDimensions( this.titleHeight, this.screenHeight );			this.container.setVerticalDimensions( 0, this.screenHeight );		}		Item[] items = getRootItems();		for (int i = 0; i < items.length; i++) {			Item item = items[i];			item.screen = this;		}		//#ifdef polish.useDynamicStyles		// check if this screen has got a style:		if (this.style == null) {			this.cssSelector = createCssSelector();			setStyle( StyleSheet.getStyle( this ) );		} else {			this.cssSelector = this.style.name;		}		//#endif		this.isInitialised = true;		StyleSheet.currentScreen = this;	}