private void drawDurations( List<MetricsDuration> durations, List<MetricsDrawArea> areas, double pixelsPerMs ) { // set top indent int y = 20; for ( MetricsDuration duration : durations ) { Long realDuration = duration.getEndDate().getTime() - duration.getDate().getTime(); // How many pixels does it take to drawn this duration? // int durationWidth = (int) ( realDuration * pixelsPerMs ); int x = 2 + (int) ( ( duration.getDate().getTime() - periodStart ) * pixelsPerMs ); getGc().setBackground( EColor.BACKGROUND ); getGc().setForeground( EColor.LIGHTBLUE ); getGc().fillGradientRectangle( x, y, durationWidth, barHeight, false ); getGc().setForeground( EColor.BLACK ); getGc().drawRectangle( x, y, durationWidth, barHeight ); areas.add( new MetricsDrawArea( new Rectangle( x, y, durationWidth, barHeight ), duration ) ); LoggingObjectInterface loggingObject = LoggingRegistry.getInstance().getLoggingObject( duration.getLogChannelId() ); String message = duration.getDescription() + " - " + loggingObject.getObjectName() + " : " + duration.getDuration() + "ms"; if ( duration.getCount() > 1 ) { message += " " + duration.getCount() + " calls, avg=" + ( duration.getDuration() / duration.getCount() ); } getGc().setFont( EFont.GRAPH ); getGc().textExtent( message ); getGc().drawText( message, x + 3, y + 4, true ); y += barHeight + 5; } }
gc.setForeground( EColor.GRAY ); gc.setBackground( EColor.BACKGROUND ); gc.setFont( EFont.GRAPH ); String nrInput = Integer.toString( stepMeta.getRemoteInputSteps().size() ); Point textExtent = gc.textExtent( nrInput ); gc.setForeground( EColor.GRAY ); gc.setBackground( EColor.BACKGROUND ); gc.setFont( EFont.GRAPH ); String nrOutput = Integer.toString( stepMeta.getRemoteOutputSteps().size() ); Point textExtent = gc.textExtent( nrOutput ); gc.setForeground( EColor.RED ); gc.setBackground( EColor.BACKGROUND ); gc.setFont( EFont.GRAPH ); gc.setFont( EFont.GRAPH ); gc.drawText( name, namePosition.x, namePosition.y + 2, true ); boolean partitioned = false; gc.setFont( EFont.SMALL ); String trimmedName = stepMeta.getName().length() < 30 ? stepMeta.getName() : stepMeta.getName().substring( 0, 30 ); gc.setFont( EFont.GRAPH ); areaOwners.add( new AreaOwner( AreaType.MINI_ICONS_BALLOON, translateTo1To1( areaX ), translateTo1To1( areaY ), translateTo1To1( totalWidth ), translateTo1To1( totalHeight ), offset, stepMeta, ioMeta ) );
gc.setFont( EFont.SMALL ); String trimmedName = jobEntryCopy.getName().length() < 30 ? jobEntryCopy.getName() : jobEntryCopy.getName().substring( 0, 30 ); gc.setBackground( EColor.CRYSTAL ); gc.setFont( EFont.GRAPH ); areaOwners.add( new AreaOwner( AreaType.MINI_ICONS_BALLOON, translateTo1To1( areaX ), translateTo1To1( areaY ), translateTo1To1( totalWidth ), translateTo1To1( totalHeight ), offset, jobMeta, jobEntryCopy ) );
int popupHeight = 1; gc.setFont( EFont.SMALL ); Point p = gc.textExtent( "0000000000" ); int colWidth = p.x + MINI_ICON_MARGIN;
} else { gc.setFont( Const.NVL( notePadMeta.getFontName(), noteFontName ), notePadMeta.getFontSize() == -1 ? noteFontHeight : notePadMeta.getFontSize(), notePadMeta.isFontBold(), notePadMeta.isFontItalic() );