Package org.geotools.styling

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


        Style style = new StrokeBuilder().color(Color.BLACK).width(3).buildStyle();
        // print(style);

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

        // check the size
        LineSymbolizer ls = (LineSymbolizer) collector.symbolizers.get(0);
        assertEquals(3, (int) ls.getStroke().getWidth().evaluate(null, Integer.class));
View Full Code Here


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

        // round up the basic elements and check its simple
        StyleCollector collector = new StyleCollector();
        style.accept(collector);
        assertEquals(2, collector.featureTypeStyles.size());
        assertEquals(2, collector.rules.size());
        assertEquals(2, collector.symbolizers.size());

        // check the first line
View Full Code Here

        Style style = new StrokeBuilder().color(Color.BLUE).width(3).dashArray(5, 2).buildStyle();
        // print(style);

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

        // check the size
        LineSymbolizer ls = (LineSymbolizer) collector.symbolizers.get(0);
        assertEquals(3, (int) ls.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(2, collector.rules.size());
        assertEquals(2, collector.symbolizers.size());

        // check the simple line
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 dots
        LineSymbolizer ls = (LineSymbolizer) collector.symbolizers.get(0);
        assertTrue(Arrays.equals(new float[] { 4, 6 }, ls.getStroke().getDashArray()));
View Full Code Here

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

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

        // check the line
View Full Code Here

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

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

        TextSymbolizer ps = (TextSymbolizer) collector.symbolizers.get(1);
View Full Code Here

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

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

        TextSymbolizer ts = (TextSymbolizer) collector.symbolizers.get(1);
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

                ff.literal("highway"), ff.literal("#FF0000"));
        Style style = new LineSymbolizerBuilder().stroke().color(color).width(width).buildStyle();
        // print(style);

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

        // check the function is there were we expect it
        LineSymbolizer ls = (LineSymbolizer) collector.symbolizers.get(0);
        assertTrue(ls.getStroke().getColor() instanceof RecodeFunction);
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.