Search in sources :

Example 1 with FieldConfigFilename

use of com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename in project sldeditor by robward-scisys.

the class FieldConfigFilenameTest method testSetUpdateSymbolListener.

/**
 * Test method for
 * {@link com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename#setUpdateSymbolListener(com.sldeditor.ui.iface.UpdateSymbolInterface)}.
 */
@Test
public void testSetUpdateSymbolListener() {
    boolean valueOnly = true;
    FieldConfigFilename field = new FieldConfigFilename(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly), null, null, null);
    field.setUpdateSymbolListener(null);
}
Also used : FieldConfigFilename(com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename) FieldConfigCommonData(com.sldeditor.ui.detail.config.FieldConfigCommonData) Test(org.junit.Test)

Example 2 with FieldConfigFilename

use of com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename in project sldeditor by robward-scisys.

the class FieldConfigFilenameTest method testGetFieldList.

/**
 * Test method for
 * {@link com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename#getFieldList(com.sldeditor.ui.detail.GraphicPanelFieldManager)}.
 */
@Test
public void testGetFieldList() {
    boolean valueOnly = true;
    FieldConfigFilename field = new FieldConfigFilename(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly), null, null, null);
    assertEquals(1, field.getFieldList(null).size());
}
Also used : FieldConfigFilename(com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename) FieldConfigCommonData(com.sldeditor.ui.detail.config.FieldConfigCommonData) Test(org.junit.Test)

Example 3 with FieldConfigFilename

use of com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename in project sldeditor by robward-scisys.

the class FieldConfigFilenameTest method testCreateCopy.

/**
 * Test method for
 * {@link com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename#createCopy(com.sldeditor.ui.detail.config.FieldConfigBase)}.
 */
@Test
public void testCreateCopy() {
    boolean valueOnly = true;
    class TestFieldConfigFilename extends FieldConfigFilename {

        public TestFieldConfigFilename(FieldConfigCommonData commonData) {
            super(commonData, null, null, null);
        }

        public FieldConfigPopulate callCreateCopy(FieldConfigBase fieldConfigBase) {
            return createCopy(fieldConfigBase);
        }
    }
    TestFieldConfigFilename field = new TestFieldConfigFilename(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly));
    FieldConfigFilename copy = (FieldConfigFilename) field.callCreateCopy(null);
    assertNull(copy);
    copy = (FieldConfigFilename) field.callCreateCopy(field);
    assertEquals(field.getFieldId(), copy.getFieldId());
    assertTrue(field.getLabel().compareTo(copy.getLabel()) == 0);
    assertEquals(field.isValueOnly(), copy.isValueOnly());
}
Also used : FieldConfigBase(com.sldeditor.ui.detail.config.FieldConfigBase) FieldConfigFilename(com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename) FieldConfigCommonData(com.sldeditor.ui.detail.config.FieldConfigCommonData) Test(org.junit.Test)

Example 4 with FieldConfigFilename

use of com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename in project sldeditor by robward-scisys.

the class FieldConfigFilenameTest method testJustSelected.

/**
 * Test method for
 * {@link com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename#justSelected()}.
 */
@Test
public void testJustSelected() {
    boolean valueOnly = true;
    FieldConfigFilename field = new FieldConfigFilename(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly), null, null, null);
    field.justSelected();
}
Also used : FieldConfigFilename(com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename) FieldConfigCommonData(com.sldeditor.ui.detail.config.FieldConfigCommonData) Test(org.junit.Test)

Example 5 with FieldConfigFilename

use of com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename in project sldeditor by robward-scisys.

the class FieldConfigFilenameTest method testAttributeSelection.

/**
 * Test method for
 * {@link com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename#attributeSelection(java.lang.String)}.
 */
@Test
public void testAttributeSelection() {
    boolean valueOnly = true;
    FieldConfigFilename field = new FieldConfigFilename(new FieldConfigCommonData(String.class, FieldIdEnum.NAME, "test label", valueOnly), null, null, null);
    field.attributeSelection("field");
// Does nothing
}
Also used : FieldConfigFilename(com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename) FieldConfigCommonData(com.sldeditor.ui.detail.config.FieldConfigCommonData) Test(org.junit.Test)

Aggregations

FieldConfigCommonData (com.sldeditor.ui.detail.config.FieldConfigCommonData)16 FieldConfigFilename (com.sldeditor.ui.detail.config.symboltype.externalgraphic.FieldConfigFilename)16 Test (org.junit.Test)16 StyleBuilder (org.geotools.styling.StyleBuilder)3 GraphicPanelFieldManager (com.sldeditor.ui.detail.GraphicPanelFieldManager)2 PointFillDetails (com.sldeditor.ui.detail.PointFillDetails)2 FieldConfigBase (com.sldeditor.ui.detail.config.FieldConfigBase)2 File (java.io.File)2 IOException (java.io.IOException)2 MalformedURLException (java.net.MalformedURLException)2 ExternalGraphicImpl (org.geotools.styling.ExternalGraphicImpl)2 Mark (org.geotools.styling.Mark)2 FieldIdEnum (com.sldeditor.common.xml.ui.FieldIdEnum)1 FieldConfigColour (com.sldeditor.ui.detail.config.FieldConfigColour)1 FieldConfigSlider (com.sldeditor.ui.detail.config.FieldConfigSlider)1 FieldConfigSymbolType (com.sldeditor.ui.detail.config.FieldConfigSymbolType)1 Fill (org.geotools.styling.Fill)1 GraphicFill (org.opengis.style.GraphicFill)1 GraphicalSymbol (org.opengis.style.GraphicalSymbol)1