Search in sources :

Example 26 with PointSymbolizer

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

the class SLDTreeLeafFactoryTest method testHasStroke.

/**
 * Test method for
 * {@link com.sldeditor.common.tree.leaf.SLDTreeLeafFactory#hasStroke(org.opengis.style.Symbolizer)}.
 */
@Test
public void testHasStroke() {
    PolygonSymbolizer polygonSymbolizer = DefaultSymbols.createDefaultPolygonSymbolizer();
    PointSymbolizer pointSymbolizer = DefaultSymbols.createDefaultPointSymbolizer();
    // CHECKSTYLE:OFF
    LineSymbolizer lineSymbolizer = DefaultSymbols.createDefaultLineSymbolizer();
    TextSymbolizer textSymbolizer = DefaultSymbols.createDefaultTextSymbolizer();
    // CHECKSTYLE:ON
    assertFalse(SLDTreeLeafFactory.getInstance().hasStroke(null));
    assertTrue(SLDTreeLeafFactory.getInstance().hasStroke(polygonSymbolizer));
    assertFalse(SLDTreeLeafFactory.getInstance().hasStroke(pointSymbolizer));
    assertTrue(SLDTreeLeafFactory.getInstance().hasStroke(lineSymbolizer));
    assertFalse(SLDTreeLeafFactory.getInstance().hasStroke(textSymbolizer));
}
Also used : PointSymbolizer(org.geotools.styling.PointSymbolizer) PolygonSymbolizer(org.geotools.styling.PolygonSymbolizer) TextSymbolizer(org.geotools.styling.TextSymbolizer) LineSymbolizer(org.geotools.styling.LineSymbolizer) Test(org.junit.Test)

Example 27 with PointSymbolizer

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

the class SLDTreeLeafPointTest method testCreateStroke.

/**
 * Test method for
 * {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPoint#createStroke(org.opengis.style.Symbolizer)}.
 */
@Test
public void testCreateStroke() {
    SLDTreeLeafPoint leaf = new SLDTreeLeafPoint();
    PointSymbolizer pointSymbolizer = DefaultSymbols.createDefaultPointSymbolizer();
    leaf.removeStroke(pointSymbolizer);
// Does nothing
}
Also used : PointSymbolizer(org.geotools.styling.PointSymbolizer) SLDTreeLeafPoint(com.sldeditor.common.tree.leaf.SLDTreeLeafPoint) Test(org.junit.Test)

Example 28 with PointSymbolizer

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

the class SLDTreeLeafPointTest method testGetStroke.

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

Example 29 with PointSymbolizer

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

the class SLDTreeLeafPointTest method testHasFill.

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

Example 30 with PointSymbolizer

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

the class SLDTreeLeafPointTest method testHasStroke.

/**
 * Test method for
 * {@link com.sldeditor.common.tree.leaf.SLDTreeLeafPoint#hasStroke(org.opengis.style.Symbolizer)}.
 */
@Test
public void testHasStroke() {
    SLDTreeLeafPoint leaf = new SLDTreeLeafPoint();
    assertFalse(leaf.hasStroke(null));
    assertFalse(leaf.hasStroke(DefaultSymbols.createDefaultPointSymbolizer()));
    PointSymbolizer pointSymbolizer = DefaultSymbols.createDefaultPointSymbolizer();
    assertFalse(leaf.hasStroke(pointSymbolizer));
}
Also used : PointSymbolizer(org.geotools.styling.PointSymbolizer) SLDTreeLeafPoint(com.sldeditor.common.tree.leaf.SLDTreeLeafPoint) Test(org.junit.Test)

Aggregations

PointSymbolizer (org.geotools.styling.PointSymbolizer)67 Test (org.junit.Test)32 PolygonSymbolizer (org.geotools.styling.PolygonSymbolizer)25 FeatureTypeStyle (org.geotools.styling.FeatureTypeStyle)23 LineSymbolizer (org.geotools.styling.LineSymbolizer)23 Style (org.geotools.styling.Style)22 Rule (org.geotools.styling.Rule)19 Graphic (org.geotools.styling.Graphic)16 NamedLayer (org.geotools.styling.NamedLayer)13 StyledLayerDescriptor (org.geotools.styling.StyledLayerDescriptor)13 Symbolizer (org.geotools.styling.Symbolizer)12 TextSymbolizer (org.geotools.styling.TextSymbolizer)10 GraphicalSymbol (org.opengis.style.GraphicalSymbol)9 SLDTreeLeafPoint (com.sldeditor.common.tree.leaf.SLDTreeLeafPoint)8 MarkImpl (org.geotools.styling.MarkImpl)8 Point (com.vividsolutions.jts.geom.Point)7 FeatureStyle (org.polymap.core.style.model.FeatureStyle)7 PointStyle (org.polymap.core.style.model.feature.PointStyle)7 Fill (org.geotools.styling.Fill)6 RasterSymbolizer (org.geotools.styling.RasterSymbolizer)6