question: public synchronized void updateLineWidthIfNecessary ( int logicalLine , int widthInPixels ) { if ( logicalLine < myLineWidths . size ( ) ) { int currentWidth = myLineWidths . get ( logicalLine ) ; if ( widthInPixels > currentWidth ) { myLineWidths . set ( logicalLine , widthInPixels ) ; } if ( widthInPixels > myMaxWidth ) { myMaxWidth = widthInPixels ; } maxCalculatedLine = Math . max ( maxCalculatedLine , logicalLine ) ; } }
target:  Notifies current container about visual width change of the target logical line. <p/> Please note that there is a possible case that particular logical line is represented in more than one visual lines, hence, this method may be called multiple times with the same logical line argument but different with values. Current container is expected to store max of the given values then.