Package org.geotools.styling

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


           
            result = IconPropertyInjector.injectProperties(input, properties);
        }
        {
            FeatureTypeStyle fts = assumeSingleElement(result.featureTypeStyles());
            Rule rule = assertSingleElement(fts.rules());
            PointSymbolizer symb = assertSingleElement(rule.symbolizers(), PointSymbolizer.class);
            Mark mark = assertSingleElement(symb.getGraphic().graphicalSymbols(), Mark.class);
            assertThat(mark.getFill().getColor().evaluate(null, Color.class), is(Color.RED));
        }
    }
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);
            Mark mark = assertSingleElement(symb.getGraphic().graphicalSymbols(), Mark.class);
            assertThat(mark.getFill().getColor().evaluate(null, Color.class), is(Color.BLUE));
        }
    }
View Full Code Here

                reduced.add(current);
            } else {
                // flatten, we don't need to draw a pretty picture and having multiple FTS
                // would result in the feature being returned twice, since we cannot
                // assume feature ids to be stable either
                current.rules().addAll(fts.rules());
            }
        }
       
        // replace
        copy.featureTypeStyles().clear();
View Full Code Here

    public void visit(FeatureTypeStyle fts) {
        extraRules.clear();
        super.visit(fts);
        if(extraRules.size() > 0) {
            FeatureTypeStyle copy = (FeatureTypeStyle) pages.peek();
            copy.rules().addAll(extraRules);
        }
    }

    @Override
    public void visit(Rule rule) {
View Full Code Here

        return rule;
    }

    protected final FeatureTypeStyle featureTypeStyle(Rule... rules) {
        FeatureTypeStyle ftStyle = styleFactory.createFeatureTypeStyle();
        for (Rule r : rules) ftStyle.rules().add(r);
        return ftStyle;
    }

    protected final Style styleFromRules(Rule... rules) {
        return style(featureTypeStyle(rules));
View Full Code Here

                    && ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator)) {
                rulesCopy.add(r);
            }

        }
        copy.rules().clear();
        copy.rules().addAll(rulesCopy);
        pages.push(copy);
    }

    public Style getSimplifiedStyle() {
View Full Code Here

                rulesCopy.add(r);
            }

        }
        copy.rules().clear();
        copy.rules().addAll(rulesCopy);
        pages.push(copy);
    }

    public Style getSimplifiedStyle() {
        return (Style) getCopy();
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.