Search in sources :

Example 1 with Stroke

use of org.opengis.style.Stroke in project sldeditor by robward-scisys.

the class SelectedSymbolTest method testGetSymbolList.

/**
 * Test method for
 * {@link com.sldeditor.common.data.SelectedSymbol#getSymbolList(org.opengis.style.GraphicalSymbol)}.
 */
@Test
public void testGetSymbolList() {
    StyleFactoryImpl styleFactory = (StyleFactoryImpl) CommonFactoryFinder.getStyleFactory();
    FilterFactory ff = CommonFactoryFinder.getFilterFactory();
    Stroke stroke = null;
    Fill fill = styleFactory.createFill(ff.literal(DefaultSymbols.defaultColour()));
    GraphicalSymbol symbolToAdd = styleFactory.mark(ff.literal("circle"), fill, stroke);
    List<GraphicalSymbol> symbolList = SelectedSymbol.getInstance().getSymbolList(symbolToAdd);
    assertEquals(1, symbolList.size());
    assertEquals(symbolToAdd, symbolList.get(0));
}
Also used : Stroke(org.opengis.style.Stroke) Fill(org.geotools.styling.Fill) StyleFactoryImpl(org.geotools.styling.StyleFactoryImpl) GraphicalSymbol(org.opengis.style.GraphicalSymbol) FilterFactory(org.opengis.filter.FilterFactory) Test(org.junit.Test)

Aggregations

Fill (org.geotools.styling.Fill)1 StyleFactoryImpl (org.geotools.styling.StyleFactoryImpl)1 Test (org.junit.Test)1 FilterFactory (org.opengis.filter.FilterFactory)1 GraphicalSymbol (org.opengis.style.GraphicalSymbol)1 Stroke (org.opengis.style.Stroke)1