Search in sources :

Example 1 with NewLineSLD

use of com.sldeditor.create.sld.NewLineSLD in project sldeditor by robward-scisys.

the class NewLineSLDTest method testNewLineSLD.

/**
 * Test new line sld.
 */
@Test
public void testNewLineSLD() {
    NewLineSLD newData = new NewLineSLD();
    StyledLayerDescriptor sld = newData.create();
    assertTrue(sld.layers().size() == 1);
    StyledLayer styledLayer = sld.layers().get(0);
    NamedLayer namedLayer = (NamedLayer) styledLayer;
    Symbolizer symbolizer = namedLayer.styles().get(0).featureTypeStyles().get(0).rules().get(0).symbolizers().get(0);
    assertTrue(symbolizer instanceof LineSymbolizer);
}
Also used : StyledLayerDescriptor(org.geotools.styling.StyledLayerDescriptor) StyledLayer(org.geotools.styling.StyledLayer) LineSymbolizer(org.geotools.styling.LineSymbolizer) NewLineSLD(com.sldeditor.create.sld.NewLineSLD) NamedLayer(org.geotools.styling.NamedLayer) Symbolizer(org.geotools.styling.Symbolizer) LineSymbolizer(org.geotools.styling.LineSymbolizer) Test(org.junit.Test)

Example 2 with NewLineSLD

use of com.sldeditor.create.sld.NewLineSLD in project sldeditor by robward-scisys.

the class NewSLDFactory method populateAvailableList.

/**
 * Populate available list of SLDs.
 *
 * @return the list
 */
private static List<NewSLDInterface> populateAvailableList() {
    List<NewSLDInterface> list = new ArrayList<NewSLDInterface>();
    list.add(new NewPointSLD());
    list.add(new NewLineSLD());
    list.add(new NewPolygonSLD());
    list.add(new NewRasterSLD());
    return list;
}
Also used : NewPointSLD(com.sldeditor.create.sld.NewPointSLD) NewRasterSLD(com.sldeditor.create.sld.NewRasterSLD) NewSLDInterface(com.sldeditor.create.sld.NewSLDInterface) NewPolygonSLD(com.sldeditor.create.sld.NewPolygonSLD) ArrayList(java.util.ArrayList) NewLineSLD(com.sldeditor.create.sld.NewLineSLD)

Aggregations

NewLineSLD (com.sldeditor.create.sld.NewLineSLD)2 NewPointSLD (com.sldeditor.create.sld.NewPointSLD)1 NewPolygonSLD (com.sldeditor.create.sld.NewPolygonSLD)1 NewRasterSLD (com.sldeditor.create.sld.NewRasterSLD)1 NewSLDInterface (com.sldeditor.create.sld.NewSLDInterface)1 ArrayList (java.util.ArrayList)1 LineSymbolizer (org.geotools.styling.LineSymbolizer)1 NamedLayer (org.geotools.styling.NamedLayer)1 StyledLayer (org.geotools.styling.StyledLayer)1 StyledLayerDescriptor (org.geotools.styling.StyledLayerDescriptor)1 Symbolizer (org.geotools.styling.Symbolizer)1 Test (org.junit.Test)1