Search in sources :

Example 46 with PolygonSymbolizer

use of org.geotools.styling.PolygonSymbolizer in project sldeditor by robward-scisys.

the class SLDTreeLeafPolygonTest method testGetStroke.

/**
 * Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon#getStroke(org.opengis.style.Symbolizer)}.
 */
@Test
public void testGetStroke() {
    SLDTreeLeafPolygon leaf = new SLDTreeLeafPolygon();
    assertNull(leaf.getStroke(null));
    assertNull(leaf.getStroke(DefaultSymbols.createDefaultPointSymbolizer()));
    PolygonSymbolizer polygonSymbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
    assertEquals(polygonSymbolizer.getStroke(), leaf.getStroke(polygonSymbolizer));
}
Also used : PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) SLDTreeLeafPolygon(com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon) Test(org.junit.Test)

Example 47 with PolygonSymbolizer

use of org.geotools.styling.PolygonSymbolizer in project sldeditor by robward-scisys.

the class SLDTreeLeafPolygonTest method testRemoveFill.

/**
 * Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon#removeFill(org.opengis.style.Symbolizer)}.
 */
@Test
public void testRemoveFill() {
    SLDTreeLeafPolygon leaf = new SLDTreeLeafPolygon();
    PolygonSymbolizer polygonSymbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
    leaf.removeFill(polygonSymbolizer);
    assertNull(polygonSymbolizer.getFill());
}
Also used : PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) SLDTreeLeafPolygon(com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon) Test(org.junit.Test)

Example 48 with PolygonSymbolizer

use of org.geotools.styling.PolygonSymbolizer in project sldeditor by robward-scisys.

the class SLDTreeLeafPolygonTest method testHasFill.

/**
 * Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon#hasFill(org.opengis.style.Symbolizer)}.
 */
@Test
public void testHasFill() {
    SLDTreeLeafPolygon leaf = new SLDTreeLeafPolygon();
    assertFalse(leaf.hasFill(null));
    assertFalse(leaf.hasFill(DefaultSymbols.createDefaultPointSymbolizer()));
    PolygonSymbolizer polygonSymbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
    assertTrue(leaf.hasFill(polygonSymbolizer));
    polygonSymbolizer.setFill(null);
    assertFalse(leaf.hasFill(polygonSymbolizer));
}
Also used : PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) SLDTreeLeafPolygon(com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon) Test(org.junit.Test)

Example 49 with PolygonSymbolizer

use of org.geotools.styling.PolygonSymbolizer in project sldeditor by robward-scisys.

the class SLDTreeLeafPolygonTest method testCreateStroke.

/**
 * Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon#createStroke(org.opengis.style.Symbolizer)}.
 */
@Test
public void testCreateStroke() {
    SLDTreeLeafPolygon leaf = new SLDTreeLeafPolygon();
    PolygonSymbolizer polygonSymbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
    polygonSymbolizer.setStroke(null);
    leaf.createStroke(polygonSymbolizer);
    assertTrue(polygonSymbolizer.getStroke() != null);
}
Also used : PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) SLDTreeLeafPolygon(com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon) Test(org.junit.Test)

Example 50 with PolygonSymbolizer

use of org.geotools.styling.PolygonSymbolizer in project sldeditor by robward-scisys.

the class SLDTreeLeafPolygonTest method testGetFill.

/**
 * Test method for {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon#getFill(org.opengis.style.Symbolizer)}.
 */
@Test
public void testGetFill() {
    SLDTreeLeafPolygon leaf = new SLDTreeLeafPolygon();
    assertNull(leaf.getFill(null));
    assertNull(leaf.getFill(DefaultSymbols.createDefaultPointSymbolizer()));
    PolygonSymbolizer polygonSymbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
    assertEquals(polygonSymbolizer.getFill(), leaf.getFill(polygonSymbolizer));
}
Also used : PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) SLDTreeLeafPolygon(com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon) Test(org.junit.Test)

Aggregations

PolygonSymbolizer (org.geotools.styling.PolygonSymbolizer)65 Test (org.junit.Test)28 PointSymbolizer (org.geotools.styling.PointSymbolizer)25 LineSymbolizer (org.geotools.styling.LineSymbolizer)24 FeatureTypeStyle (org.geotools.styling.FeatureTypeStyle)19 Rule (org.geotools.styling.Rule)18 Style (org.geotools.styling.Style)18 Symbolizer (org.geotools.styling.Symbolizer)15 Fill (org.geotools.styling.Fill)14 NamedLayer (org.geotools.styling.NamedLayer)12 StyledLayerDescriptor (org.geotools.styling.StyledLayerDescriptor)12 Stroke (org.geotools.styling.Stroke)10 RasterSymbolizer (org.geotools.styling.RasterSymbolizer)9 TextSymbolizer (org.geotools.styling.TextSymbolizer)9 SLDTreeLeafPolygon (com.sldeditor.common.tree.leaf.SLDTreeLeafPolygon)8 Graphic (org.geotools.styling.Graphic)8 ArrayList (java.util.ArrayList)7 Expression (org.opengis.filter.expression.Expression)7 JsonObject (com.google.gson.JsonObject)5 SelectedSymbol (com.sldeditor.common.data.SelectedSymbol)5