Package org.geotools.styling

Examples of org.geotools.styling.Style.accept()


        fts.rule().name("Small").min(360000000).line().stroke().colorHex("#009933").width(2);
        Style style = fts.buildStyle();
        // print(style);

        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertEquals(1, collector.featureTypeStyles.size());
        assertEquals(3, collector.rules.size());
        assertEquals(3, collector.symbolizers.size());

        // check rules and styles
View Full Code Here


        Style style = new LineSymbolizerBuilder().uom(SI.METER).stroke().width(50)
                .colorHex("#009933").buildStyle();
        // print(style);

        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertSimpleStyle(collector);

        LineSymbolizer ls = (LineSymbolizer) collector.symbolizers.get(0);
        assertEquals(SI.METER, ls.getUnitOfMeasure());
    }
View Full Code Here

        Style style = new FillBuilder().color(Color.BLUE).buildStyle();
        // print(style);

        // round up the basic elements and check its simple
        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertSimpleStyle(collector);

        // check the symbolizer
        PolygonSymbolizer ps = (PolygonSymbolizer) collector.symbolizers.get(0);
        assertEquals(Color.BLUE, ps.getFill().getColor().evaluate(null, Color.class));
View Full Code Here

        Style style = psb.stroke().color(Color.WHITE).width(2).buildStyle();
        // print(style);

        // round up the basic elements and check its simple
        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertSimpleStyle(collector);

        // check the symbolizer
        PolygonSymbolizer ps = (PolygonSymbolizer) collector.symbolizers.get(0);
        assertEquals(Color.BLUE, ps.getFill().getColor().evaluate(null, Color.class));
View Full Code Here

        Style style = psb.buildStyle();
        // print(style);

        // round up the basic elements and check its simple
        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertSimpleStyle(collector);

        // check the symbolizer
        PolygonSymbolizer ps = (PolygonSymbolizer) collector.symbolizers.get(0);
        assertEquals(Color.BLUE, ps.getFill().getColor().evaluate(null, Color.class));
View Full Code Here

                .externalGraphic("colorblocks.png", "image/png").buildStyle();
        // print(style);

        // round up the basic elements and check its simple
        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertSimpleStyle(collector);

        // check the symbolizer
        PolygonSymbolizer ps = (PolygonSymbolizer) collector.symbolizers.get(0);
        assertNull(ps.getStroke());
View Full Code Here

                .stroke().colorHex("#990099").width(1).buildStyle();
        // print(style);

        // round up the basic elements and check its simple
        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertSimpleStyle(collector);

        // check the symbolizer
        PolygonSymbolizer ps = (PolygonSymbolizer) collector.symbolizers.get(0);
        assertNull(ps.getStroke());
View Full Code Here

        Style style = rb.buildStyle();
        // print(style);

        // round up the basic elements and check its simple
        StyleCollector collector = new StyleCollector();
        style.accept(collector);

        PolygonSymbolizer ps = (PolygonSymbolizer) collector.symbolizers.get(0);
        assertEquals("#40FF40", ps.getFill().getColor().evaluate(null, String.class));
        assertEquals(Color.WHITE, ps.getStroke().getColor().evaluate(null, Color.class));
        assertEquals(2, (int) ps.getStroke().getWidth().evaluate(null, Integer.class));
View Full Code Here

        Style style = fts.buildStyle();
        // print(style);

        // round up the elements and check the basics
        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertEquals(1, collector.featureTypeStyles.size());
        assertEquals(3, collector.rules.size());
        assertEquals(3, collector.symbolizers.size());

        // check rules
View Full Code Here

       
        Style style = fts.buildStyle();
        // print(style);
       
        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertEquals(1, collector.featureTypeStyles.size());
        assertEquals(3, collector.rules.size());
        assertEquals(4, collector.symbolizers.size());
       
        // happy that it built, does not really add anything that we don't have already tested
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.