closeBar.setBackground(background);
if (gradientColors != null && gradientColors.length > 0) { closeBar.setBackground(gradientColors[gradientColors.length - 1]); } else { closeBar.setBackground(background); }
private void createCloseBar() {	Color background = getBackground();	closeBar = new ToolBar(this, SWT.FLAT);	closeBar.setVisible(false);	closeBar.setBackground(background);	ToolItem closeItem = new ToolItem(closeBar, SWT.PUSH);		inactiveCloseBar = new ToolBar(this, SWT.FLAT);	inactiveCloseBar.setVisible(false);	inactiveCloseBar.setBackground(background);	ToolItem inactiveCloseItem = new ToolItem(inactiveCloseBar, SWT.PUSH);	closeItem.addListener(SWT.Selection, new Listener() {		public void handleEvent(Event event) {			closeNotify(getSelection(), event.time);		}	});	inactiveCloseItem.addListener(SWT.Selection, new Listener() {		public void handleEvent(Event event) {			closeNotify(inactiveItem, event.time);			inactiveCloseBar.setVisible(false);			inactiveItem = null;		}	});	inactiveCloseBar.addListener (SWT.MouseExit, new Listener() {		public void handleEvent(Event event) {			if (inactiveItem != null) {				Rectangle itemBounds = inactiveItem.getBounds();				if (itemBounds.contains(event.x, event.y)) return;			}			inactiveCloseBar.setVisible(false);			inactiveItem = null;		}	});	}