Search in sources :

Example 1 with VendorOptionRasterFactory

use of com.sldeditor.ui.detail.vendor.geoserver.raster.VendorOptionRasterFactory in project sldeditor by robward-scisys.

the class FieldConfigVendorOptionTest method testVendorOptionsUpdated.

/**
 * Test method for
 * {@link com.sldeditor.ui.detail.config.FieldConfigVendorOption#vendorOptionsUpdated(java.util.List)}.
 */
@Test
public void testVendorOptionsUpdated() {
    RasterSymbolizerDetails panel = new RasterSymbolizerDetails();
    VendorOptionRasterFactory vendorOptionRasterFactory = new VendorOptionRasterFactory(getClass(), panel);
    // CHECKSTYLE:OFF
    List<VendorOptionInterface> veList = vendorOptionRasterFactory.getVendorOptionList("com.sldeditor.ui.detail.vendor.geoserver.raster.VOGeoServerContrastEnhancementNormalizeOverall");
    for (VendorOptionInterface extension : veList) {
        extension.setParentPanel(panel);
    }
    FieldConfigVendorOption field = new FieldConfigVendorOption(new FieldConfigCommonData(Double.class, FieldIdEnum.NAME, "label", false), veList);
    field.vendorOptionsUpdated(null);
    field.createUI();
    List<VersionData> vendorOptionVersionsList = new ArrayList<VersionData>();
    vendorOptionVersionsList.add(VersionData.getLatestVersion(GeoServerVendorOption.class));
    field.vendorOptionsUpdated(vendorOptionVersionsList);
}
Also used : VendorOptionRasterFactory(com.sldeditor.ui.detail.vendor.geoserver.raster.VendorOptionRasterFactory) GeoServerVendorOption(com.sldeditor.common.vendoroption.GeoServerVendorOption) FieldConfigVendorOption(com.sldeditor.ui.detail.config.FieldConfigVendorOption) VersionData(com.sldeditor.common.vendoroption.VersionData) RasterSymbolizerDetails(com.sldeditor.ui.detail.RasterSymbolizerDetails) FieldConfigCommonData(com.sldeditor.ui.detail.config.FieldConfigCommonData) ArrayList(java.util.ArrayList) VendorOptionInterface(com.sldeditor.ui.detail.vendor.geoserver.VendorOptionInterface) Test(org.junit.Test)

Example 2 with VendorOptionRasterFactory

use of com.sldeditor.ui.detail.vendor.geoserver.raster.VendorOptionRasterFactory in project sldeditor by robward-scisys.

the class RasterSymbolizerDetails method createVendorOptionPanel.

/**
 * Creates the vendor option panel.
 *
 * @return the detail panel
 */
private void createVendorOptionPanel() {
    vendorOptionRasterFactory = new VendorOptionRasterFactory(getClass(), this);
    List<VendorOptionInterface> voList = vendorOptionRasterFactory.getVendorOptionList();
    if (voList != null) {
        for (VendorOptionInterface vendorOption : voList) {
            vendorOption.setParentPanel(this);
        }
    }
}
Also used : VendorOptionRasterFactory(com.sldeditor.ui.detail.vendor.geoserver.raster.VendorOptionRasterFactory) VendorOptionInterface(com.sldeditor.ui.detail.vendor.geoserver.VendorOptionInterface)

Aggregations

VendorOptionInterface (com.sldeditor.ui.detail.vendor.geoserver.VendorOptionInterface)2 VendorOptionRasterFactory (com.sldeditor.ui.detail.vendor.geoserver.raster.VendorOptionRasterFactory)2 GeoServerVendorOption (com.sldeditor.common.vendoroption.GeoServerVendorOption)1 VersionData (com.sldeditor.common.vendoroption.VersionData)1 RasterSymbolizerDetails (com.sldeditor.ui.detail.RasterSymbolizerDetails)1 FieldConfigCommonData (com.sldeditor.ui.detail.config.FieldConfigCommonData)1 FieldConfigVendorOption (com.sldeditor.ui.detail.config.FieldConfigVendorOption)1 ArrayList (java.util.ArrayList)1 Test (org.junit.Test)1