min = (int) entry.min; max = (int) entry.max;
min = manager.convertRealIntoGraphics((int) entry.min); max = manager.convertRealIntoGraphics((int) entry.max); bin[i] = max;
	public void paintComponent(Graphics g)	{		Graphics2D g2D = (Graphics2D) g;		g2D.setColor(bgColor);		g2D.fillRect(0, 0, WIDTH, HEIGHT); 		Font font = g2D.getFont();		FontMetrics fontMetrics = g2D.getFontMetrics();		int hFont = fontMetrics.getHeight();		Rectangle2D rStart = font.getStringBounds(min, 											g2D.getFontRenderContext());		int hStart = (int) rStart.getHeight();		Rectangle2D rEnd = font.getStringBounds(max, 											g2D.getFontRenderContext());		int hEnd = (int) rEnd.getHeight();		Rectangle2D rInput = font.getStringBounds("timepoint", 											g2D.getFontRenderContext());		int wInput = (int) rInput.getWidth();		g2D.setColor(axeColor);				//y-axis		g2D.drawLine(leftBorder, topBorder-8, leftBorder, tS+5);		g2D.drawLine(leftBorder, topBorder-8, leftBorder-3, topBorder-5);		g2D.drawLine(leftBorder, topBorder-8, leftBorder+3, topBorder-5);				// x-axis		g2D.drawLine(leftBorder-5, tS, lS+8, tS);		g2D.drawLine(lS+5, tS-3, lS+8, tS);		g2D.drawLine(lS+5, tS+3, lS+8, tS);				// draw output interval		g2D.drawString(min, 5, tS-window); 		g2D.drawLine(leftBorder-5, tS-window, leftBorder, tS-window);		g2D.drawString(max, 5, topBorder+window);		g2D.drawLine(leftBorder-5, topBorder+window, leftBorder, 						topBorder+window);						g2D.drawString("timepoint", leftBorder+widthStat/2-wInput/2, 						tS+hFont+5);								// cursor start output		int xStartOutputPoints[] = {xStartOutput1, xStartOutput2, xStartOutput3};		int yStartOutputPoints[] = {yStartOutput1, yStartOutput2, yStartOutput3};		GeneralPath filledPolygonStartOutput = new GeneralPath();		filledPolygonStartOutput.moveTo(xStartOutputPoints[0], 										yStartOutputPoints[0]);		for (int index = 1; index < xStartOutputPoints.length; index++)			filledPolygonStartOutput.lineTo(xStartOutputPoints[index], 										yStartOutputPoints[index]);		filledPolygonStartOutput.closePath();				// paint with selected color		g2D.setColor(startColor);		g2D.drawString(curMin, 10, tS-hStart-hFont-window); 		g2D.fill(filledPolygonStartOutput);				// cursor end output		int xEndOutputPoints[] = {xEndOutput1, xEndOutput2, xEndOutput3};		int yEndOutputPoints[] = {yEndOutput1, yEndOutput2, yEndOutput3};		GeneralPath filledPolygonEndOutput = new GeneralPath();		filledPolygonEndOutput.moveTo(xEndOutputPoints[0], yEndOutputPoints[0]);		for (int index = 1; index < xEndOutputPoints.length; index++)			filledPolygonEndOutput.lineTo(xEndOutputPoints[index], 										yEndOutputPoints[index]);		filledPolygonEndOutput.closePath();		g2D.setColor(endColor);		g2D.drawString(curMax, 10, topBorder+hEnd+hFont+window);    		g2D.fill(filledPolygonEndOutput);      		// paint histogram		g2D.setColor(binColor);		g2D.drawString("Pixel", 5, topBorder+heightStat/2);		g2D.drawString("intensity", 5, topBorder+heightStat/2+hEnd+5);		PixelsStatsEntry entry;		int min, max;		for (int i = 0; i < histogramData.length; i++) {			entry = histogramData[i];			min = (int) entry.min;			max = (int) entry.max;			g2D.fillRect(leftBorder+i*sizeBin, max, sizeBin, min-max); 		}		g2D.setColor(axeColor);		int y, x;		for (int i = 0; i < histogramData.length; i++) {			 y = (int) histogramData[i].max;			 x = leftBorder+(i+1)*sizeBin;			 g2D.drawLine(x, y, x, topBorder+heightStat+5);		}				// paint layered rectangles 		g2D.setColor(layerColor);				//end rectangle		Rectangle2D endOutput = new Rectangle2D.Double(leftBorder, 										topBorder, widthStat, heightEnd);		g2D.fill(endOutput);				// start rectangle 		Rectangle2D startOutput = new Rectangle2D.Double(leftBorder, 									controlOutputStart, widthStat, heightStart);		g2D.fill(startOutput);		g2D.setColor(endColor);		g2D.draw(endOutput);		g2D.setColor(startColor);		g2D.draw(startOutput);                              	}