/** TODO summary sentence for apply ... */ public void apply() { RasterSymbolizer symbolizer = (RasterSymbolizer) getContent(); StyleBuilder styleBuilder = getStyleBuilder(); double opacity = ((double) opacityScale.getSelection()) / 100; symbolizer.setOpacity(styleBuilder.literalExpression(opacity)); }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { RasterSymbolizer rs = styleFactory.createRasterSymbolizer(); // <xsd:element ref="sld:Geometry" minOccurs="0"/> if (node.hasChild("Geometry")) { PropertyName propertyName = (PropertyName) node.getChildValue("Geometry"); rs.setGeometryPropertyName(propertyName.getPropertyName()); } // <xsd:element ref="sld:Opacity" minOccurs="0"/> if (node.hasChild("Opacity")) { rs.setOpacity((Expression) node.getChildValue("Opacity")); } // <xsd:element ref="sld:ChannelSelection" minOccurs="0"/> if (node.hasChild("ChannelSelection")) { rs.setChannelSelection((ChannelSelection) node.getChildValue("ChannelSelection")); } // <xsd:element ref="sld:OverlapBehavior" minOccurs="0"/> if (node.hasChild("OverlapBehavior")) { rs.setOverlapBehavior((OverlapBehavior) node.getChildValue("OverlapBehavior")); } // <xsd:element ref="sld:ColorMap" minOccurs="0"/> if (node.hasChild("ColorMap")) { rs.setColorMap((ColorMap) node.getChildValue("ColorMap")); } // <xsd:element ref="sld:ContrastEnhancement" minOccurs="0"/> if (node.hasChild("ContrastEnhancement")) { rs.setContrastEnhancement((ContrastEnhancement) node.getChildValue("ContrastEnhancement")); } // <xsd:element ref="sld:ShadedRelief" minOccurs="0"/> if (node.hasChild("ShadedRelief")) { rs.setShadedRelief((ShadedRelief) node.getChildValue("ShadedRelief")); } // <xsd:element ref="sld:ImageOutline" minOccurs="0"/> if (node.hasChild("ImageOutline")) { ImageOutline imageOutput = (ImageOutline) node.getChildValue("ImageOutline"); rs.setImageOutline(imageOutput.getSymbolizer()); } return rs; }