Search in sources :

Example 1 with VendorOptionFTSFactory

use of com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VendorOptionFTSFactory in project sldeditor by robward-scisys.

the class VendorOptionFTSFactoryTest method testVendorOptionFTSFactory.

/**
 * Test method for
 * {@link com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VendorOptionFTSFactory#VendorOptionFTSFactory(java.lang.Class)}.
 */
@Test
public void testVendorOptionFTSFactory() {
    VendorOptionFTSFactory obj = new VendorOptionFTSFactory(FeatureTypeStyleDetails.class);
    int expectedNoOfVO = 4;
    assertEquals(expectedNoOfVO, obj.getVendorOptionList().size());
    List<VendorOptionPresent> vendorOptionsPresentList = new ArrayList<VendorOptionPresent>();
    StyleFactoryImpl styleFactory = (StyleFactoryImpl) CommonFactoryFinder.getStyleFactory();
    FeatureTypeStyle fts = styleFactory.createFeatureTypeStyle();
    obj.getMinimumVersion(null, fts, vendorOptionsPresentList);
    assertEquals(0, vendorOptionsPresentList.size());
    // Valid string
    String expectedValue = "exclude,0.12";
    fts.getOptions().put(FeatureTypeStyle.COMPOSITE, expectedValue);
    obj.getMinimumVersion(null, fts, vendorOptionsPresentList);
    assertEquals(1, vendorOptionsPresentList.size());
    assertEquals(expectedNoOfVO, obj.getVendorOptionInfoList().size());
    assertEquals(1, obj.getVendorOptionList(VOGeoServerFTSComposite.class.getName()).size());
    GraphicPanelFieldManager fieldMgr = new GraphicPanelFieldManager(FeatureTypeStyleDetails.class);
    obj.getFieldDataManager(fieldMgr);
    obj.populate(fts);
    obj.updateSymbol(fts);
}
Also used : VendorOptionPresent(com.sldeditor.common.vendoroption.minversion.VendorOptionPresent) StyleFactoryImpl(org.geotools.styling.StyleFactoryImpl) ArrayList(java.util.ArrayList) FeatureTypeStyle(org.geotools.styling.FeatureTypeStyle) VOGeoServerFTSComposite(com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VOGeoServerFTSComposite) VendorOptionFTSFactory(com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VendorOptionFTSFactory) GraphicPanelFieldManager(com.sldeditor.ui.detail.GraphicPanelFieldManager) Test(org.junit.Test)

Example 2 with VendorOptionFTSFactory

use of com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VendorOptionFTSFactory in project sldeditor by robward-scisys.

the class FeatureTypeStyleDetails method createVendorOptionPanel.

/**
 * Creates the vendor option panel.
 *
 * @return the detail panel
 */
private void createVendorOptionPanel() {
    vendorOptionFTSFactory = new VendorOptionFTSFactory(getClass());
    List<VendorOptionInterface> veList = vendorOptionFTSFactory.getVendorOptionList();
    if (veList != null) {
        for (VendorOptionInterface extension : veList) {
            extension.setParentPanel(this);
        }
    }
}
Also used : VendorOptionFTSFactory(com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VendorOptionFTSFactory) VendorOptionInterface(com.sldeditor.ui.detail.vendor.geoserver.VendorOptionInterface)

Aggregations

VendorOptionFTSFactory (com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VendorOptionFTSFactory)2 VendorOptionPresent (com.sldeditor.common.vendoroption.minversion.VendorOptionPresent)1 GraphicPanelFieldManager (com.sldeditor.ui.detail.GraphicPanelFieldManager)1 VendorOptionInterface (com.sldeditor.ui.detail.vendor.geoserver.VendorOptionInterface)1 VOGeoServerFTSComposite (com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VOGeoServerFTSComposite)1 ArrayList (java.util.ArrayList)1 FeatureTypeStyle (org.geotools.styling.FeatureTypeStyle)1 StyleFactoryImpl (org.geotools.styling.StyleFactoryImpl)1 Test (org.junit.Test)1