Package org.geotools.styling

Examples of org.geotools.styling.GraphicLegend


       
        // Get graphic legend from style
        final Style style = RendererBaseTest.loadStyle(
                this, "testGraphicLegend.sld");
        final Rule rule = style.featureTypeStyles().get(0).rules().get(0);
        final GraphicLegend legend = (GraphicLegend) rule.getLegend();
       
        // Paint legend using StyledShapePainter
        final Point point = new GeometryFactory().createPoint(
                new Coordinate(width / 2, height / 2));
        final LiteShape2 shape = new LiteShape2(point, null, null, false);
View Full Code Here


       
        // Get graphic legend from style
        final Style style = RendererBaseTest.loadStyle(
                this, "testGraphicLegend.sld");
        final Rule rule = style.featureTypeStyles().get(0).rules().get(0);
        final GraphicLegend legend = (GraphicLegend) rule.getLegend();
       
       
        // Set rotation to 45 degrees
        legend.setRotation( ff.literal(45.0) );
       
        // Paint legend using StyledShapePainter
        final Point point = gf.createPoint(new Coordinate(width / 2, height / 2));
        final LiteShape2 shape = new LiteShape2(point, null, null, false);
       
View Full Code Here

        rule.setMinScaleDenominator(minScaleDenominator);
        rule.setMaxScaleDenominator(maxScaleDenominator);
        rule.setFilter(filter);
        rule.setElseFilter(elseFilter);
        rule.symbolizers().addAll(symbolizers);
        GraphicLegend gl = legend.build();
        if (gl != null) {
            rule.setLegend(gl);
        }

        if (parent == null) {
View Full Code Here

    public GraphicLegend build() {
        if (unset) {
            return null;
        }
        GraphicLegend graphic = sf.graphicLegend(symbols, opacity, size, rotation,
                anchorPoint.build(), displacement.build());
        return graphic;
    }
View Full Code Here

TOP

Related Classes of org.geotools.styling.GraphicLegend

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.