Search in sources :

Example 6 with VendorOptionInterface

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

the class VendorOptionFTSFactory method getFieldDataManager.

/**
 * Gets the field data manager.
 *
 * @param fieldConfigManager the field config manager
 */
public void getFieldDataManager(GraphicPanelFieldManager fieldConfigManager) {
    for (VendorOptionInterface vendorOption : vendorOptionList) {
        if (vendorOption != null) {
            PopulateDetailsInterface populateInterface = (PopulateDetailsInterface) vendorOption;
            fieldConfigManager.add(populateInterface.getFieldDataManager());
        }
    }
}
Also used : VendorOptionInterface(com.sldeditor.ui.detail.vendor.geoserver.VendorOptionInterface) PopulateDetailsInterface(com.sldeditor.ui.iface.PopulateDetailsInterface)

Example 7 with VendorOptionInterface

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

the class VendorOptionTextFactory method getFieldDataManager.

/**
 * Gets the field data manager.
 *
 * @param fieldConfigManager the field config manager
 */
public void getFieldDataManager(GraphicPanelFieldManager fieldConfigManager) {
    for (VendorOptionInterface vendorOption : vendorOptionList) {
        if (vendorOption != null) {
            PopulateDetailsInterface populateInterface = (PopulateDetailsInterface) vendorOption;
            fieldConfigManager.add(populateInterface.getFieldDataManager());
        }
    }
}
Also used : VendorOptionInterface(com.sldeditor.ui.detail.vendor.geoserver.VendorOptionInterface) PopulateDetailsInterface(com.sldeditor.ui.iface.PopulateDetailsInterface)

Example 8 with VendorOptionInterface

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

the class VendorOptionInfoManagerTest method testAddVendorOptionInfo.

/**
 * Test method for
 * {@link com.sldeditor.common.vendoroption.info.VendorOptionInfoManager#addVendorOptionInfo(com.sldeditor.ui.detail.vendor.VendorOptionFactoryInterface)}.
 * {@link com.sldeditor.common.vendoroption.info.VendorOptionInfoManager#getPanel(java.lang.Class)}.
 * {@link com.sldeditor.common.vendoroption.info.VendorOptionInfoManager#setSelectedVersion(java.lang.Class, com.sldeditor.common.vendoroption.VersionData)}.
 */
@Test
public void testAddVendorOptionInfo() {
    VendorOptionInfoManager.getInstance().addVendorOptionInfo(null);
    VendorOptionFactoryInterface f1 = new VendorOptionFactoryInterface() {

        @Override
        public List<VendorOptionInterface> getVendorOptionList() {
            return null;
        }

        @Override
        public List<VendorOptionInterface> getVendorOptionList(String className) {
            return null;
        }

        @Override
        public List<VendorOptionInfo> getVendorOptionInfoList() {
            List<VendorOptionInfo> list = new ArrayList<VendorOptionInfo>();
            return list;
        }
    };
    VendorOptionInfoManager.getInstance().addVendorOptionInfo(f1);
    VendorOptionInfoManager.getInstance().addVendorOptionInfo(f1);
    VendorOptionInfoPanel panel1 = VendorOptionInfoManager.getInstance().getPanel(String.class);
    VendorOptionInfoPanel panel2 = VendorOptionInfoManager.getInstance().getPanel(Double.class);
    VendorOptionInfoPanel panel3 = VendorOptionInfoManager.getInstance().getPanel(String.class);
    assertTrue(panel1 == panel3);
    assertTrue(panel1 != panel2);
    VendorOptionInfoManager.getInstance().setSelectedVersion(null, null);
    VersionData versionData = VersionData.decode(GeoServerVendorOption.class, "3.1.4");
    VendorOptionInfoManager.getInstance().setSelectedVersion(String.class, versionData);
}
Also used : VendorOptionInfoPanel(com.sldeditor.common.vendoroption.info.VendorOptionInfoPanel) VersionData(com.sldeditor.common.vendoroption.VersionData) ArrayList(java.util.ArrayList) VendorOptionInfo(com.sldeditor.common.vendoroption.info.VendorOptionInfo) VendorOptionFactoryInterface(com.sldeditor.ui.detail.vendor.VendorOptionFactoryInterface) VendorOptionInterface(com.sldeditor.ui.detail.vendor.geoserver.VendorOptionInterface) Test(org.junit.Test)

Example 9 with VendorOptionInterface

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

the class TextSymbolizerDetails method createVendorOptionPanel.

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

Example 10 with VendorOptionInterface

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

the class FieldConfigVendorOption method updateVendorOptionPanels.

/**
 * Update vendor option panels.
 *
 * @param vendorOptionVersionsList the vendor option versions list
 */
private void updateVendorOptionPanels(List<VersionData> vendorOptionVersionsList) {
    if (veList != null) {
        for (VendorOptionInterface vendorOption : veList) {
            boolean displayVendorOption = VendorOptionManager.getInstance().isAllowed(vendorOptionVersionsList, vendorOption.getVendorOption());
            BasePanel extensionPanel = vendorOption.getPanel();
            if (extensionPanel != null) {
                BasePanel parentPanel = (BasePanel) vendorOption.getParentPanel();
                if (parentPanel != null) {
                    parentPanel.removePanel(extensionPanel);
                    if (displayVendorOption) {
                        parentPanel.insertPanel(this, extensionPanel, this.optionBox);
                    }
                }
            }
        }
    }
}
Also used : BasePanel(com.sldeditor.ui.detail.BasePanel) VendorOptionInterface(com.sldeditor.ui.detail.vendor.geoserver.VendorOptionInterface)

Aggregations

VendorOptionInterface (com.sldeditor.ui.detail.vendor.geoserver.VendorOptionInterface)16 Test (org.junit.Test)6 FieldConfigCommonData (com.sldeditor.ui.detail.config.FieldConfigCommonData)5 FieldConfigVendorOption (com.sldeditor.ui.detail.config.FieldConfigVendorOption)5 PopulateDetailsInterface (com.sldeditor.ui.iface.PopulateDetailsInterface)4 VersionData (com.sldeditor.common.vendoroption.VersionData)2 VendorOptionFillFactory (com.sldeditor.ui.detail.vendor.geoserver.fill.VendorOptionFillFactory)2 VendorOptionRasterFactory (com.sldeditor.ui.detail.vendor.geoserver.raster.VendorOptionRasterFactory)2 ArrayList (java.util.ArrayList)2 GeoServerVendorOption (com.sldeditor.common.vendoroption.GeoServerVendorOption)1 VendorOptionInfo (com.sldeditor.common.vendoroption.info.VendorOptionInfo)1 VendorOptionInfoPanel (com.sldeditor.common.vendoroption.info.VendorOptionInfoPanel)1 BasePanel (com.sldeditor.ui.detail.BasePanel)1 RasterSymbolizerDetails (com.sldeditor.ui.detail.RasterSymbolizerDetails)1 VendorOptionFactoryInterface (com.sldeditor.ui.detail.vendor.VendorOptionFactoryInterface)1 VendorOptionFTSFactory (com.sldeditor.ui.detail.vendor.geoserver.featuretypestyle.VendorOptionFTSFactory)1 VendorOptionTextFactory (com.sldeditor.ui.detail.vendor.geoserver.text.VendorOptionTextFactory)1