Search in sources :

Example 16 with Displacement

use of org.geotools.styling.Displacement in project sldeditor by robward-scisys.

the class PolygonSymbolizerDetails method updateSymbol.

/**
 * Update symbol.
 */
private void updateSymbol() {
    if (!Controller.getInstance().isPopulating()) {
        Expression geometryField = ExtractGeometryField.getGeometryField(fieldConfigVisitor);
        Expression perpendicularOffset = fieldConfigVisitor.getExpression(FieldIdEnum.PERPENDICULAR_OFFSET);
        // 
        // Displacement
        // 
        Displacement displacement = null;
        StandardData standardData = getStandardData();
        PolygonSymbolizer polygonSymbolizer = (PolygonSymbolizer) SelectedSymbol.getInstance().getSymbolizer();
        if (polygonSymbolizer != null) {
            polygonSymbolizer.setName(standardData.name);
            polygonSymbolizer.setDescription(standardData.description);
            polygonSymbolizer.setUnitOfMeasure(standardData.unit);
            polygonSymbolizer.setDisplacement(displacement);
            polygonSymbolizer.setGeometry(geometryField);
            polygonSymbolizer.setPerpendicularOffset(perpendicularOffset);
            this.fireUpdateSymbol();
        }
    }
}
Also used : Expression(org.opengis.filter.expression.Expression) PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) Displacement(org.geotools.styling.Displacement)

Aggregations

Displacement (org.geotools.styling.Displacement)16 Expression (org.opengis.filter.expression.Expression)15 AnchorPoint (org.geotools.styling.AnchorPoint)12 GraphicalSymbol (org.opengis.style.GraphicalSymbol)9 Graphic (org.geotools.styling.Graphic)8 Fill (org.geotools.styling.Fill)7 GroupConfigInterface (com.sldeditor.ui.detail.config.base.GroupConfigInterface)6 JsonObject (com.google.gson.JsonObject)5 Stroke (org.geotools.styling.Stroke)5 ExternalGraphic (org.geotools.styling.ExternalGraphic)4 Mark (org.geotools.styling.Mark)4 GraphicFill (org.opengis.style.GraphicFill)4 JsonElement (com.google.gson.JsonElement)3 ArrayList (java.util.ArrayList)3 Font (org.geotools.styling.Font)3 PolygonSymbolizer (org.geotools.styling.PolygonSymbolizer)3 FieldConfigColour (com.sldeditor.ui.detail.config.FieldConfigColour)2 MultiOptionGroup (com.sldeditor.ui.detail.config.base.MultiOptionGroup)2 ConstantExpression (org.geotools.filter.ConstantExpression)2 Halo (org.geotools.styling.Halo)2