else if (numChunkSources == 0) toColor = red; else { int colorIntensity = 255 - ( int ) ((float) numChunkSources * factor) * 25; intenseColor = new Color(null, 0, colorIntensity, 255); toColor = intenseColor; }
	private void createFileInfoImage() {					this.chunks = fileInfo.getChunks();		this.avail = fileInfo.getAvail();		int length = 0;				Display thisDisplay = MainTab.getShell().getDisplay();				Color red = thisDisplay.getSystemColor( SWT.COLOR_RED );		Color black = thisDisplay.getSystemColor( SWT.COLOR_BLACK );		Color yellow = thisDisplay.getSystemColor( SWT.COLOR_YELLOW );			Color darkGray = new Color (null, 107, 81, 9) ;				Color fromColor = black;		Color toColor;		if ( avail.length() != 0 ) 				length = avail.length();		if (length == 0) return;						int numChunkSources;			int highestNumSources = 0;		float factor = 1f;			for (int i = 0; i < avail.length(); i++) 		{			numChunkSources = avail.charAt( i );			if (numChunkSources > highestNumSources)				highestNumSources = numChunkSources;					}		if (highestNumSources > 0) 			factor = 10f / highestNumSources; 			if ( image != null ) image.dispose();		image = new Image( thisDisplay, length, initialHeight );				GC imageGC = new GC( image );				for ( int i = 0; i < avail.length(); i++ ) {								numChunkSources = avail.charAt( i ) ;						int colorIntensity = 255 - ( int ) ((float) numChunkSources * factor) * 25;			toColor = new Color(null, 0, colorIntensity, 255);								if ( numChunkSources == 0 )						toColor = red;							if ( chunks.charAt( i ) == '2' ) 							toColor = darkGray;			else if ( chunks.charAt( i ) == '3' ) 						toColor = yellow;									imageGC.setBackground (toColor);			imageGC.setForeground (fromColor);			imageGC.fillGradientRectangle(i, 0, 1, initialHeight / 2, true);						imageGC.setForeground(toColor);			imageGC.setBackground(fromColor);			imageGC.fillGradientRectangle(i, initialHeight / 2, 1, initialHeight / 2, true);						}			darkGray.dispose();		imageGC.dispose();			imageData = image.getImageData();		if (resizedImageData == null) resizedImageData = imageData;		resizeImage(null);	}