Examples of OtherTextImpl


Examples of org.geotools.styling.OtherTextImpl

    private OtherText copy(OtherText otherText) {
      if (otherText == null) return null;
     
        // TODO: add methods to the factory to create OtherText instances
      // sf.createOtherText();
      OtherTextImpl copy = new OtherTextImpl();
      copy.setTarget( otherText.getTarget() );
      copy.setText( copy(otherText.getText()) );
    return copy;
  }
View Full Code Here

Examples of org.geotools.styling.OtherTextImpl

        symb.setGraphic(gr);
        Literal snippet = ff.literal("no idea what a snipet is good for");
    symb.setSnippet(snippet);
        Literal fD = ff.literal("some description");
    symb.setFeatureDescription(fD);
        OtherTextImpl otherText = new OtherTextImpl();
        otherText.setTarget("otherTextTarget");
        otherText.setText(ff.literal("otherTextText"));
    symb.setOtherText(otherText);

    // copy it
        TextSymbolizer2 copy = (TextSymbolizer2) visitor.copy(symb);

        // compare it
        assertEquals("Graphic of TextSymbolizer2 has not been correctly duplicated", gr, copy
                .getGraphic());
        assertEquals("Graphic of TextSymbolizer2 has not been correctly duplicated", gr.getOpacity(), copy
                .getGraphic().getOpacity());
        assertEquals("Graphic of TextSymbolizer2 has not been correctly duplicated", gr.getSize(), copy
                .getGraphic().getSize());       
        assertEquals("Snippet of TextSymbolizer2 has not been correctly duplicated", snippet, copy
                .getSnippet());
        assertEquals("FeatureDescription of TextSymbolizer2 has not been correctly duplicated", fD, copy
                .getFeatureDescription());
        assertEquals("OtherText of TextSymbolizer2 has not been correctly duplicated", otherText.getTarget(), copy
                .getOtherText().getTarget());
        assertEquals("OtherText of TextSymbolizer2 has not been correctly duplicated", otherText.getText(), copy
                .getOtherText().getText());       
    }
View Full Code Here

Examples of org.geotools.styling.OtherTextImpl

    return symbol;
  }

  protected OtherText parseOtherText(Node root) {
    // TODO: add methods to the factory to create OtherText instances
    OtherText ot = new OtherTextImpl();
    final Node targetAttribute = root.getAttributes()
        .getNamedItem("target");
    if (targetAttribute == null)
      throw new IllegalArgumentException(
          "OtherLocation does not have the "
              + "required 'target' attribute");
    String target = targetAttribute.getNodeValue();
    Expression text = parseCssParameter(root, true);
    ot.setTarget(target);
    ot.setText(text);
    return ot;
  }
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.