Package org.codemap.util

Examples of org.codemap.util.CodemapColors


    Value<MapScheme<MColor>> colorValue = theController.getActiveMap().getValues().colorScheme;

    HeatMapColors heatMap = new HeatMapColors(HISTORY_LENGTH);
    MColor cold = heatMap.getColdest();
   
    CodemapColors colorScheme = new CodemapColors(cold);
    for(String each: history) { // from hottest to cold
      colorScheme.setColor(each, heatMap.colder());      
    }
    colorValue.setValue(colorScheme);
  }
View Full Code Here


        background = new Image(device, mapSize, mapSize);
        GC gc = new GC(background);
       
        String makeRed = "MapPerProject";
       
        CodemapColors colors = new CodemapColors();
        colors.setColor(makeRed, new MColor(255, 0, 0));
        Iterable<Location> locations = mapInstance.locations();
        ColorBrewer colorBrewer = new ColorBrewer();
        for (Location location : locations) {
            MColor color = colorBrewer.forPackage(location.getDocument());
            colors.setColor(location.getDocument(), color);
        }
       
        Color black = new Color(gc.getDevice(), 0, 0, 0);
        gc.setBackground(black);
        gc.fillRectangle(gc.getClipping());
View Full Code Here

    private void maybeDisplayCoverage() {
        if (!enabled) return;
        MapValues values = theController.getActiveMap().getValues();
        if (values == null) return;
        Value<MapScheme<MColor>> colorValue = values.colorScheme;
        CodemapColors colorScheme = new CodemapColors(MColor.GRAY_204);
        for (Pair<String, Double> pair : lastCoverageInfo) {
            String identifier = pair.fst;
            Double ratio = pair.snd;
            int redVal = (int) ((1 - ratio) * 255);
            int greenVal = (int) (ratio * 255);
            MColor col = new MColor(redVal, greenVal, 0);
            colorScheme.setColor(identifier, col);
        }
        colorValue.setValue(colorScheme);
    }
View Full Code Here

        }
        return colorScheme.forLocation(location);
    }
   
    private void init() {
        colorScheme = new CodemapColors();
        HashMap<String, List<String>> forPackage = findPackageDeclarations();
       
        GoodColorGenerator colors = new GoodColorGenerator(forPackage.keySet().size());
       
        for(String pack: forPackage.keySet()) {
View Full Code Here

TOP

Related Classes of org.codemap.util.CodemapColors

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.