Package org.geotools.styling

Examples of org.geotools.styling.TextSymbolizer.accept()


            TextSymbolizer ps = (TextSymbolizer) arg0;
            ps.accept(this);
        }
        if (arg0 instanceof RasterSymbolizer) {
            RasterSymbolizer ps = (RasterSymbolizer) arg0;
            ps.accept(this);
        }
    }

    public void visit( PointSymbolizer arg0 ) {
        arg0.getGraphic().accept(this);
View Full Code Here


            LineSymbolizer ps = (LineSymbolizer) arg0;
            ps.accept(this);
        }
        if (arg0 instanceof TextSymbolizer) {
            TextSymbolizer ps = (TextSymbolizer) arg0;
            ps.accept(this);
        }
        if (arg0 instanceof RasterSymbolizer) {
            RasterSymbolizer ps = (RasterSymbolizer) arg0;
            ps.accept(this);
        }
View Full Code Here

    public void testTextSymbolizer() throws Exception {
        TextSymbolizer ts = sb.createTextSymbolizer(Color.BLACK, (Font) null, "label");
        ts.getOptions().put(TextSymbolizer.MAX_DISPLACEMENT_KEY, "10");
        ts.getOptions().put(TextSymbolizer.GRAPHIC_MARGIN_KEY, "10 20");
       
        ts.accept(visitor);
        TextSymbolizer clone = (TextSymbolizer) visitor.getCopy();
        assertEquals("20", clone.getOptions().get(TextSymbolizer.MAX_DISPLACEMENT_KEY));
        assertEquals("20 40", clone.getOptions().get(TextSymbolizer.GRAPHIC_MARGIN_KEY));
    }
   
View Full Code Here

    @Test
    public void testTextSymbolizerArraySingleValue() throws Exception {
        TextSymbolizer ts = sb.createTextSymbolizer(Color.BLACK, (Font) null, "label");
        ts.getOptions().put(TextSymbolizer.GRAPHIC_MARGIN_KEY, "10");
       
        ts.accept(visitor);
        TextSymbolizer clone = (TextSymbolizer) visitor.getCopy();
        assertEquals("20", clone.getOptions().get(TextSymbolizer.GRAPHIC_MARGIN_KEY));
    }
   
    @Test
View Full Code Here

    public void testTextSymbolizer() {
        TextSymbolizer textSymb = sf.createTextSymbolizer();
        Expression offset = ff.literal(10);
        textSymb.setLabelPlacement(sf.createLinePlacement(offset));

        textSymb.accept(visitor);
        TextSymbolizer clone = (TextSymbolizer) visitor.getCopy();
        assertCopy(textSymb, clone);
        assertEqualsContract(textSymb, clone);
       
        TextSymbolizer notEq = sf.getDefaultTextSymbolizer();
View Full Code Here

   
    public void testTextSymbolizerVendorParams() {
        TextSymbolizer textSymb = sf.createTextSymbolizer();
        textSymb.getOptions().put("autoWrap", "100");
       
        textSymb.accept(visitor);
        TextSymbolizer clone = (TextSymbolizer) visitor.getCopy();
        assertCopy(textSymb, clone);
        assertEqualsContract(textSymb, clone);
       
        assertEquals(1, clone.getOptions().size());
View Full Code Here

   
    public void testTextSymbolizerVendorOptions() {
        TextSymbolizer textSymb = sf.createTextSymbolizer();
        textSymb.getOptions().put("autoWrap", "100");

        textSymb.accept(visitor);
        TextSymbolizer clone = (TextSymbolizer) visitor.getCopy();
        assertCopy(textSymb, clone);
        assertEqualsContract(textSymb, clone);
    }
View Full Code Here

        TextSymbolizer textSymb = sf.createTextSymbolizer();
        textSymb.setUnitOfMeasure(UomOgcMapping.METRE.getUnit());
        Expression offset = ff.literal(10);
        textSymb.setLabelPlacement(sf.createLinePlacement(offset));

        textSymb.accept(visitor);
        TextSymbolizer clone = (TextSymbolizer) visitor.getCopy();
        assertCopy(textSymb, clone);
        assertEqualsContract(textSymb, clone);

        TextSymbolizer notEq = sf.getDefaultTextSymbolizer();
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.