Ignore:
Timestamp:
2014-05-09T04:49:54+02:00 (10 years ago)
Author:
Don-vip
Message:

fixes for unit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r7080 r7081  
    8080    final public static int noThreads;
    8181    final public static ExecutorService styleCreatorPool;
    82    
     82
    8383    static {
    8484        noThreads = Main.pref.getInteger(
     
    330330    private boolean leftHandTraffic;
    331331
     332    /**
     333     * Constructs a new {@code StyledMapRenderer}.
     334     *
     335     * @param g the graphics context. Must not be null.
     336     * @param nc the map viewport. Must not be null.
     337     * @param isInactiveMode if true, the paint visitor shall render OSM objects such that they
     338     * look inactive. Example: rendering of data in an inactive layer using light gray as color only.
     339     * @throws IllegalArgumentException thrown if {@code g} is null
     340     * @throws IllegalArgumentException thrown if {@code nc} is null
     341     */
    332342    public StyledMapRenderer(Graphics2D g, NavigatableComponent nc, boolean isInactiveMode) {
    333343        super(g, nc, isInactiveMode);
     
    13291339        return null;
    13301340    }
    1331    
     1341
    13321342    @Override
    13331343    public void render(final DataSet data, boolean renderVirtualNodes, Bounds bounds) {
     
    13431353       
    13441354        highlightWaySegments = data.getHighlightedWaySegments();
    1345        
     1355
    13461356        long timeStart=0, timePhase1=0, timeFinished;
    13471357        if (Main.isTraceEnabled()) {
     
    13691379                this.output = output;
    13701380            }
    1371            
     1381
    13721382            @Override
    13731383            public List<StyleRecord> call() throws Exception {
     
    13801390                return output;
    13811391            }
    1382            
     1392
    13831393            @Override
    13841394            public void visit(Node n) {
     
    14561466       
    14571467        final List<StyleRecord> allStyleElems = new ArrayList<>(nodes.size()+ways.size()+relations.size());
    1458        
     1468
    14591469        class ConcurrentTasksHelper {
    1460            
     1470
    14611471            void process(List<? extends OsmPrimitive> prims) {
    14621472                final List<ComputeStyleListWorker> tasks = new ArrayList<>();
     
    14901500        }
    14911501        ConcurrentTasksHelper helper = new ConcurrentTasksHelper();
    1492        
     1502
    14931503        // Need to process all relations first.
    14941504        // Reason: Make sure, ElemStyles.getStyleCacheWithRange is
     
    15051515            System.err.print("phase 1 (calculate styles): " + (timePhase1 - timeStart) + " ms");
    15061516        }
    1507        
     1517
    15081518        Collections.sort(allStyleElems);
    1509        
     1519
    15101520        for (StyleRecord r : allStyleElems) {
    15111521            r.style.paintPrimitive(
Note: See TracChangeset for help on using the changeset viewer.