private void updateUndrawnTiles(final List<Tile> undrawnTiles,final int preDrawMargin,final boolean forceInMemory){
  if (undrawnTiles.isEmpty()) {
    final Rectangle2D extendedBounds=new Rectangle2D.Double(Math.max(m_model.getX() - preDrawMargin,0),Math.max(m_model.getY() - preDrawMargin,0),getScaledWidth() + (2 * preDrawMargin),getScaledHeight() + (2 * preDrawMargin));
    final List<Tile> tileList=tileManager.getTiles(extendedBounds);
    for (    final Tile tile : tileList) {
      if (tile.isDirty()) {
        undrawnTiles.add(tile);
      }
 else       if (forceInMemory) {
        images.add(tile);
      }
    }
  }
}

private void updateUndrawnTiles ( final List < Tile > undrawnTiles , final int preDrawMargin , final boolean forceInMemory ) { if ( undrawnTiles . isEmpty ( ) ) { final Rectangle2D extendedBounds = new Rectangle2D . Double ( Math . max ( m_model . getX ( ) - preDrawMargin , 0 ) , Math . max ( m_model . getY ( ) - preDrawMargin , 0 ) , getScaledWidth ( ) + ( 2 * preDrawMargin ) , getScaledHeight ( ) + ( 2 * preDrawMargin ) ) ; final List < Tile > tileList = tileManager . getTiles ( extendedBounds ) ; for ( final Tile tile : tileList ) { if ( tile . isDirty ( ) ) { undrawnTiles . add ( tile ) ; } else if ( forceInMemory ) { images . add ( tile ) ; } } } }
if we have nothing left undrawn , draw the tiles within predrawmargin of us , optionally forcing the tiles to remain in memory .
