Search in sources :

Example 21 with LegendOptionData

use of com.sldeditor.ui.legend.option.LegendOptionData in project sldeditor by robward-scisys.

the class LegendOptionDataTest method testLabelFontColour.

/**
 * Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#getLabelFontColour()}.
 * Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#setLabelFontColour(java.awt.Color)}.
 */
@Test
public void testLabelFontColour() {
    LegendOptionData data = new LegendOptionData();
    Color expectedColor = Color.CYAN;
    data.setLabelFontColour(expectedColor);
    assertEquals(expectedColor, data.getLabelFontColour());
}
Also used : Color(java.awt.Color) LegendOptionData(com.sldeditor.ui.legend.option.LegendOptionData) Test(org.junit.Test)

Example 22 with LegendOptionData

use of com.sldeditor.ui.legend.option.LegendOptionData in project sldeditor by robward-scisys.

the class LegendOptionDataTest method testFontAntiAliasing.

/**
 * Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#isFontAntiAliasing()}.
 * Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#setFontAntiAliasing(boolean)}.
 */
@Test
public void testFontAntiAliasing() {
    LegendOptionData data = new LegendOptionData();
    data.setFontAntiAliasing(true);
    assertTrue(data.isFontAntiAliasing());
    data.setFontAntiAliasing(false);
    assertFalse(data.isFontAntiAliasing());
}
Also used : LegendOptionData(com.sldeditor.ui.legend.option.LegendOptionData) Test(org.junit.Test)

Example 23 with LegendOptionData

use of com.sldeditor.ui.legend.option.LegendOptionData in project sldeditor by robward-scisys.

the class LegendOptionDataTest method testImageWidth.

/**
 * Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#setImageWidth(int)}.
 * Test method for {@link com.sldeditor.ui.legend.option.LegendOptionData#getImageWidth()}.
 */
@Test
public void testImageWidth() {
    LegendOptionData data = new LegendOptionData();
    int imageWidth = 42;
    data.setImageWidth(imageWidth);
    assertEquals(imageWidth, data.getImageWidth());
}
Also used : LegendOptionData(com.sldeditor.ui.legend.option.LegendOptionData) Test(org.junit.Test)

Example 24 with LegendOptionData

use of com.sldeditor.ui.legend.option.LegendOptionData in project sldeditor by robward-scisys.

the class LegendOptionPanelTest method testLegendOptionPanel.

/**
 * Test method for {@link com.sldeditor.ui.legend.option.LegendOptionPanel#LegendOptionPanel()}.
 */
@Test
public void testLegendOptionPanel() {
    LegendOptionPanel testObj = new LegendOptionPanel();
    testObj.addListener(new LegendOptionDataUpdateInterface() {

        @Override
        public void updateLegendOptionData(LegendOptionData data) {
        }
    });
    LegendOptionData newOptionData = new LegendOptionData();
    testObj.updateData(newOptionData);
    LegendOptionData actualData = testObj.getData();
    assertEquals(actualData, newOptionData);
}
Also used : LegendOptionDataUpdateInterface(com.sldeditor.ui.legend.option.LegendOptionDataUpdateInterface) LegendOptionPanel(com.sldeditor.ui.legend.option.LegendOptionPanel) LegendOptionData(com.sldeditor.ui.legend.option.LegendOptionData) Test(org.junit.Test)

Aggregations

LegendOptionData (com.sldeditor.ui.legend.option.LegendOptionData)24 Test (org.junit.Test)21 Color (java.awt.Color)3 IOException (java.io.IOException)3 DocumentBuilder (javax.xml.parsers.DocumentBuilder)3 DocumentBuilderFactory (javax.xml.parsers.DocumentBuilderFactory)3 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)3 Document (org.w3c.dom.Document)3 DataSourcePropertiesInterface (com.sldeditor.common.DataSourcePropertiesInterface)2 SLDData (com.sldeditor.common.data.SLDData)2 VersionData (com.sldeditor.common.vendoroption.VersionData)2 SLDEditorFile (com.sldeditor.datasource.SLDEditorFile)2 EnvVar (com.sldeditor.filter.v2.envvar.EnvVar)2 Font (java.awt.Font)2 File (java.io.File)2 StyledLayerDescriptor (org.geotools.styling.StyledLayerDescriptor)2 Element (org.w3c.dom.Element)2 SLDDataInterface (com.sldeditor.common.SLDDataInterface)1 StyleWrapper (com.sldeditor.common.data.StyleWrapper)1 VendorOptionVersion (com.sldeditor.common.vendoroption.VendorOptionVersion)1