Package org.geotools.styling

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


    Rule rule2 = styleFactory.createRule();
    rule2.setIsElseFilter(true);
    rule2.setName("rule2");
    fts2.rules().add(rule2);
   
    style.featureTypeStyles().add(fts2);
    // twoFeatureTypeStyles end
}

private void quickPointSymbolizer() {
    // quickPointSymbolizer start
View Full Code Here


   
    // creation of the style
    Style style = sb.createStyle();
    FeatureTypeStyle featureTypeStyle = sb.createFeatureTypeStyle("labelPoint", new Symbolizer[] {
            textSymbolizer, pointSymbolizer });
    style.featureTypeStyles().add(featureTypeStyle);
   
    // creation of the style
    // quickTextSymbolizer end
}
View Full Code Here

    // "testPoint" feature type style
    Mark testMark = sb.createMark(sb.attributeExpression("name"), sb.createFill(Color.RED, 0.5),
            null);
    Graphic graph = sb.createGraphic(null, new Mark[] { testMark }, null, sb.literalExpression(1),
            sb.attributeExpression("size"), sb.attributeExpression("rotation"));
    style.featureTypeStyles().add(
            sb.createFeatureTypeStyle("testPoint", sb.createPointSymbolizer(graph)));
   
    // "labelPoint" feature type style
    AnchorPoint anchorPoint = sb.createAnchorPoint(sb.attributeExpression("X"),
            sb.attributeExpression("Y"));
View Full Code Here

            sb.createFont("Lucida Sans", 10), sb.createFont("Arial", 10) }, sb.createHalo(),
            sb.attributeExpression("name"), pointPlacement, null);
    Mark circle = sb.createMark(StyleBuilder.MARK_CIRCLE, Color.RED);
    Graphic graph2 = sb.createGraphic(null, circle, null, 1, 4, 0);
    PointSymbolizer pointSymbolizer = sb.createPointSymbolizer(graph2);
    style.featureTypeStyles().add(
            sb.createFeatureTypeStyle("labelPoint", new Symbolizer[] { textSymbolizer,
                    pointSymbolizer }));
    // markTestSLD end
}
}
View Full Code Here

    }

    protected void refresh() {
        Style style = getStyle(); // grab an SLD style or bust

        List<FeatureTypeStyle> ftsList = style.featureTypeStyles();
        FeatureTypeStyle fts = null;
        if (ftsList.size() > 0) {
            fts = ftsList.get(0);
        }
View Full Code Here

        style.setDefault(true);
        if (replace.getSelection()) {
            // if repalce was hit we are going to completly redfine the style
            // based on what the user has here
            //
            style.featureTypeStyles().clear();
            style.featureTypeStyles().add(featureTypeStyle);
        } else {
            // if we are just responding to what is going on we will try and update the existing
            // style in place (leaving any other content alone)
            //
View Full Code Here

        if (replace.getSelection()) {
            // if repalce was hit we are going to completly redfine the style
            // based on what the user has here
            //
            style.featureTypeStyles().clear();
            style.featureTypeStyles().add(featureTypeStyle);
        } else {
            // if we are just responding to what is going on we will try and update the existing
            // style in place (leaving any other content alone)
            //
            List<FeatureTypeStyle> fts = style.featureTypeStyles();
View Full Code Here

            style.featureTypeStyles().add(featureTypeStyle);
        } else {
            // if we are just responding to what is going on we will try and update the existing
            // style in place (leaving any other content alone)
            //
            List<FeatureTypeStyle> fts = style.featureTypeStyles();
            boolean match = false;
            for( int i = fts.size() - 1; i > -1; i-- ) {
                if (SLDs.isSemanticTypeMatch(fts.get(i), "simple")) { //$NON-NLS-1$
                    fts.set(i, featureTypeStyle);
                    match = true;
View Full Code Here

                    match = true;
                    break;
                }
            }
            if (match) {
                style.featureTypeStyles().clear();
                style.featureTypeStyles().addAll(fts);
            } else {
                // add the new entry to the array
                List<FeatureTypeStyle> fts2 = new ArrayList<FeatureTypeStyle>(fts);
                Collections.copy(fts2, fts);
View Full Code Here

                    break;
                }
            }
            if (match) {
                style.featureTypeStyles().clear();
                style.featureTypeStyles().addAll(fts);
            } else {
                // add the new entry to the array
                List<FeatureTypeStyle> fts2 = new ArrayList<FeatureTypeStyle>(fts);
                Collections.copy(fts2, fts);
                fts2.add(featureTypeStyle);
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.