Package org.geotools.styling

Examples of org.geotools.styling.FeatureTypeStyle.rules()


        Style style = sb.createStyle();
        LineSymbolizer ls = sb.createLineSymbolizer();
        ls.getStroke().setWidth(sb.getFilterFactory().property("myAttribute"));
        FeatureTypeStyle fts = sb.createFeatureTypeStyle(sb.createPolygonSymbolizer());
        style.featureTypeStyles().add(fts);
        fts.rules().get(0).symbolizers().add(ls);
        fts.rules().get(0).symbolizers().add(sb.createLineSymbolizer());
       
        checkSingleSymbolizer(style, ls);
    }
View Full Code Here


        LineSymbolizer ls = sb.createLineSymbolizer();
        ls.getStroke().setWidth(sb.getFilterFactory().property("myAttribute"));
        FeatureTypeStyle fts = sb.createFeatureTypeStyle(sb.createPolygonSymbolizer());
        style.featureTypeStyles().add(fts);
        fts.rules().get(0).symbolizers().add(ls);
        fts.rules().get(0).symbolizers().add(sb.createLineSymbolizer());
       
        checkSingleSymbolizer(style, ls);
    }

    private void checkSingleSymbolizer(Style style, LineSymbolizer ls) {
View Full Code Here

           
            result = IconPropertyInjector.injectProperties(input, properties);
        }
        {
            FeatureTypeStyle fts = assertSingleElement(result.featureTypeStyles());
            Rule rule = assertSingleElement(fts.rules());
            PointSymbolizer symb = assertSingleElement(rule.symbolizers(), PointSymbolizer.class);
            assertSingleElement(symb.getGraphic().graphicalSymbols(), Mark.class);
        }
    }
   
View Full Code Here

           
            result = IconPropertyInjector.injectProperties(input, properties);
        }
        {
            FeatureTypeStyle fts = assumeSingleElement(result.featureTypeStyles());
            Rule rule = assumeSingleElement(fts.rules());
            assertThat(rule.symbolizers().size(), is(0));
        }
    }
   
    @Test
View Full Code Here

           
            result = IconPropertyInjector.injectProperties(input, properties);
        }
        {
            FeatureTypeStyle fts = assumeSingleElement(result.featureTypeStyles());
            Rule rule = assumeSingleElement(fts.rules());
            PointSymbolizer symb = assertSingleElement(rule.symbolizers(), PointSymbolizer.class);
            ExternalGraphic eg = assertSingleElement(symb.getGraphic().graphicalSymbols(), ExternalGraphic.class);
            assertThat(eg.getOnlineResource().getLinkage().toString(), is("http://example.com/foo.png"));
        }
    }
View Full Code Here

           
            result = IconPropertyInjector.injectProperties(input, properties);
        }
        {
            FeatureTypeStyle fts = assumeSingleElement(result.featureTypeStyles());
            Rule rule = assumeSingleElement(fts.rules());
            PointSymbolizer symb = assertSingleElement(rule.symbolizers(), PointSymbolizer.class);
            ExternalGraphic eg = assertSingleElement(symb.getGraphic().graphicalSymbols(), ExternalGraphic.class);
            assertThat(eg.getOnlineResource().getLinkage().toString(), is("http://example.com/BC.png"));
        }
    }
View Full Code Here

           
            result = IconPropertyInjector.injectProperties(input, properties);
        }
        {
            FeatureTypeStyle fts = assumeSingleElement(result.featureTypeStyles());
            Rule rule = assumeSingleElement(fts.rules());
            PointSymbolizer symb = assertSingleElement(rule.symbolizers(), PointSymbolizer.class);
            ExternalGraphic eg = assertSingleElement(symb.getGraphic().graphicalSymbols(), ExternalGraphic.class);
            assertThat(eg.getOnlineResource().getLinkage().toString(), is("http://example.com/NF.png"));
        }
    }
View Full Code Here

           
            result = IconPropertyInjector.injectProperties(input, properties);
        }
        {
            FeatureTypeStyle fts = assumeSingleElement(result.featureTypeStyles());
            Rule rule = assumeSingleElement(fts.rules());
            PointSymbolizer symb = assertSingleElement(rule.symbolizers(), PointSymbolizer.class);
            Graphic eg = symb.getGraphic();
            assertThat(eg.getRotation().evaluate(null).toString(), is("45.0"));
        }
    }
View Full Code Here

           
            result = IconPropertyInjector.injectProperties(input, properties);
        }
        {
            FeatureTypeStyle fts = assumeSingleElement(result.featureTypeStyles());
            Rule rule = assertSingleElement(fts.rules());
            PointSymbolizer symb = assertSingleElement(rule.symbolizers(), PointSymbolizer.class);
            ExternalGraphic eg = assertSingleElement(symb.getGraphic().graphicalSymbols(), ExternalGraphic.class);
            assertThat(eg.getOnlineResource().getLinkage().toString(), is("http://example.com/foo.png"));
        }
    }
View Full Code Here

           
            result = IconPropertyInjector.injectProperties(input, properties);
        }
        {
            FeatureTypeStyle fts = assumeSingleElement(result.featureTypeStyles());
            Rule rule = assertSingleElement(fts.rules());
            PointSymbolizer symb = assertSingleElement(rule.symbolizers(), PointSymbolizer.class);
            ExternalGraphic eg = assertSingleElement(symb.getGraphic().graphicalSymbols(), ExternalGraphic.class);
            assertThat(eg.getOnlineResource().getLinkage().toString(), is("http://example.com/bar.png"));
        }
    }
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.