Search in sources :

Example 1 with RenderPanelImpl

use of com.sldeditor.render.RenderPanelImpl in project sldeditor by robward-scisys.

the class RenderPanelImplTest method testRasterData.

/**
 * Test method for {@link com.sldeditor.render.RenderPanelImpl#RenderPanelImpl()}.
 */
@Test
void testRasterData() {
    RenderPanelImpl render = new RenderPanelImpl(false);
    render.setSize(200, 200);
    RenderPanelImpl.setUnderTest(false);
    DummyInternalSLDFile4 testSLD = new DummyInternalSLDFile4();
    DataSourceInterface dataSource = DataSourceFactory.getDataSource();
    dataSource.connect("test", SLDEditorFile.getInstance(), CheckAttributeFactory.getCheckList());
    SelectedSymbol.getInstance().setSld(testSLD.getSLD());
    render.renderSymbol();
    render.dataSourceLoaded(GeometryTypeEnum.RASTER, false);
    render.dataSourceLoaded(GeometryTypeEnum.RASTER, false);
    render.useAntiAliasUpdated(true);
    assertNotNull(render.getRuleRenderOptions());
    render.backgroundColourUpdate(null);
    render.backgroundColourUpdate(Color.WHITE);
    RenderPanelImpl.setUnderTest(true);
    DataSourceFactory.reset();
    SelectedSymbol.destroyInstance();
}
Also used : DataSourceInterface(com.sldeditor.datasource.DataSourceInterface) RenderPanelImpl(com.sldeditor.render.RenderPanelImpl) DummyInternalSLDFile4(com.sldeditor.test.unit.datasource.impl.DummyInternalSLDFile4) Test(org.junit.jupiter.api.Test)

Example 2 with RenderPanelImpl

use of com.sldeditor.render.RenderPanelImpl in project sldeditor by robward-scisys.

the class RenderPanelImplTest method testVectorData.

/**
 * Test method for {@link com.sldeditor.render.RenderPanelImpl#RenderPanelImpl()}.
 */
@Test
void testVectorData() {
    RenderPanelImpl render = new RenderPanelImpl(false);
    render.setSize(200, 200);
    RenderPanelImpl.setUnderTest(false);
    DummyInternalSLDFile3 testSLD = new DummyInternalSLDFile3();
    DataSourceInterface dataSource = DataSourceFactory.getDataSource();
    dataSource.connect("test", SLDEditorFile.getInstance(), CheckAttributeFactory.getCheckList());
    SelectedSymbol.getInstance().setSld(testSLD.getSLD());
    render.renderSymbol();
    render.dataSourceLoaded(GeometryTypeEnum.POINT, false);
    render.dataSourceLoaded(GeometryTypeEnum.POINT, false);
    render.useAntiAliasUpdated(true);
    assertNotNull(render.getRuleRenderOptions());
    render.backgroundColourUpdate(null);
    render.backgroundColourUpdate(Color.BLUE);
    RenderPanelImpl.setUnderTest(true);
    DataSourceFactory.reset();
    SelectedSymbol.destroyInstance();
}
Also used : DataSourceInterface(com.sldeditor.datasource.DataSourceInterface) RenderPanelImpl(com.sldeditor.render.RenderPanelImpl) DummyInternalSLDFile3(com.sldeditor.test.unit.datasource.impl.DummyInternalSLDFile3) Test(org.junit.jupiter.api.Test)

Aggregations

DataSourceInterface (com.sldeditor.datasource.DataSourceInterface)2 RenderPanelImpl (com.sldeditor.render.RenderPanelImpl)2 Test (org.junit.jupiter.api.Test)2 DummyInternalSLDFile3 (com.sldeditor.test.unit.datasource.impl.DummyInternalSLDFile3)1 DummyInternalSLDFile4 (com.sldeditor.test.unit.datasource.impl.DummyInternalSLDFile4)1