Package org.codemap.layers

Examples of org.codemap.layers.Label


        for(Point each: points.keySet()) {
            int x = toMapCoords(each.x);
            int y = toMapCoords(each.y);
            org.eclipse.swt.graphics.Point extent = new org.eclipse.swt.graphics.Point(x, y);
            int fontsize = (points.get(each))/3;
            labels.add(new Label(x-20, y-60, extent, fontsize, each.getDocument(), new Location(each, 0, x, y)));
        }
        labeling = new Labeling(labels);
       
        MapInstance mapInstance = configuration.withSize(mapSize, new MapScheme<Double>() {
            @Override
View Full Code Here


            int height = (int) (Math.sqrt(each.getElevation()) * CodemapCore.colorScheme().getLabelHeightFactor());
            for (FontData fd: fontData) fd.setHeight(height);
            Font font = new Font(gc.getDevice(), fontData);
            gc.setFont(font);
            Point extent = gc.stringExtent(text);
            labels.add(new Label(each.px, each.py, extent, height, text, each));
            font.dispose();
        }
        basefont.dispose();
        return labels;
    }
View Full Code Here

TOP

Related Classes of org.codemap.layers.Label

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.