/** 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();

    // &lt;xsd:element ref="sld:Geometry" minOccurs="0"/&gt;
    if (node.hasChild("Geometry")) {
      PropertyName propertyName = (PropertyName) node.getChildValue("Geometry");
      rs.setGeometryPropertyName(propertyName.getPropertyName());
    }

    // &lt;xsd:element ref="sld:Opacity" minOccurs="0"/&gt;
    if (node.hasChild("Opacity")) {
      rs.setOpacity((Expression) node.getChildValue("Opacity"));
    }

    // &lt;xsd:element ref="sld:ChannelSelection" minOccurs="0"/&gt;
    if (node.hasChild("ChannelSelection")) {
      rs.setChannelSelection((ChannelSelection) node.getChildValue("ChannelSelection"));
    }

    // &lt;xsd:element ref="sld:OverlapBehavior" minOccurs="0"/&gt;
    if (node.hasChild("OverlapBehavior")) {
      rs.setOverlapBehavior((OverlapBehavior) node.getChildValue("OverlapBehavior"));
    }

    // &lt;xsd:element ref="sld:ColorMap" minOccurs="0"/&gt;
    if (node.hasChild("ColorMap")) {
      rs.setColorMap((ColorMap) node.getChildValue("ColorMap"));
    }

    // &lt;xsd:element ref="sld:ContrastEnhancement" minOccurs="0"/&gt;
    if (node.hasChild("ContrastEnhancement")) {
      rs.setContrastEnhancement((ContrastEnhancement) node.getChildValue("ContrastEnhancement"));
    }

    // &lt;xsd:element ref="sld:ShadedRelief" minOccurs="0"/&gt;
    if (node.hasChild("ShadedRelief")) {
      rs.setShadedRelief((ShadedRelief) node.getChildValue("ShadedRelief"));
    }

    // &lt;xsd:element ref="sld:ImageOutline" minOccurs="0"/&gt;
    if (node.hasChild("ImageOutline")) {
      ImageOutline imageOutput = (ImageOutline) node.getChildValue("ImageOutline");
      rs.setImageOutline(imageOutput.getSymbolizer());
    }

    return rs;
  }