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);
}
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);
}
}
}
Aggregations