Package org.geotools.styling

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


        tb.fill().color(Color.WHITE);
        Style style = fts.buildStyle();
        // print(style);
       
        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertEquals(1, collector.featureTypeStyles.size());
        assertEquals(2, collector.rules.size());
        assertEquals(2, collector.symbolizers.size());
       
        assertEquals(SI.METER, collector.symbolizers.get(0).getUnitOfMeasure());
View Full Code Here


        fts.rule().name("Small").min(320000000).point().graphic().size(4).mark().reset(mark);
        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 PointSymbolizerBuilder().uom(SI.METER).graphic().size(50).mark()
                .name("circle").fill().color(Color.RED).buildStyle();
        // print(style);

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

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

                .buildStyle();
        // print(style);

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

        // check the size
        PointSymbolizer ps = (PointSymbolizer) collector.symbolizers.get(0);
        Graphic graphic = ps.getGraphic();
View Full Code Here

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

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

        // check the size
        PointSymbolizer ps = (PointSymbolizer) collector.symbolizers.get(0);
        Graphic graphic = ps.getGraphic();
View Full Code Here

                .color(Color.GREEN).buildStyle();
        // print(style);

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

        // check the size and rotation
        PointSymbolizer ps = (PointSymbolizer) collector.symbolizers.get(0);
        Graphic graphic = ps.getGraphic();
View Full Code Here

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

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

        // check the size and rotation
        PointSymbolizer ps = (PointSymbolizer) collector.symbolizers.get(0);
        Graphic graphic = ps.getGraphic();
View Full Code Here

                .buildStyle();
        // print(style);

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

        // check the size and rotation
        PointSymbolizer ps = (PointSymbolizer) collector.symbolizers.get(0);
        Graphic graphic = ps.getGraphic();
View Full Code Here

        rb.text().label("name").fill().color(Color.BLACK);
        Style style = rb.buildStyle();

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

        TextSymbolizer ps = (TextSymbolizer) collector.symbolizers.get(1);
        assertEquals(ff.property("name"), ps.getLabel());
        assertEquals(Color.BLACK, ps.getFill().getColor().evaluate(null, Color.class));
View Full Code Here

        tb.pointPlacement().anchor().x(0.5);
        Style style = rb.buildStyle();

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

        TextSymbolizer ps = (TextSymbolizer) collector.symbolizers.get(1);
        assertEquals(ff.property("name"), ps.getLabel());
        assertEquals(Color.BLACK, ps.getFill().getColor().evaluate(null, Color.class));
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.