Search in sources :

Example 1 with RenderTransformValueInterface

use of com.sldeditor.rendertransformation.types.RenderTransformValueInterface in project sldeditor by robward-scisys.

the class PanelField method getField.

/**
 * Gets the field.
 *
 * @param classType the class type
 * @param valueTextLocalisation the value text localisation
 * @param nodeType the node type
 * @return the field
 */
public static FieldConfigBase getField(Class<?> classType, String valueTextLocalisation, Class<?> nodeType) {
    FieldConfigBase fieldConfig = null;
    RenderTransformValueInterface value = RenderTransformValueFactory.getInstance().getValue(nodeType);
    if (value != null) {
        String valueText = Localisation.getString(classType, valueTextLocalisation);
        FieldIdEnum fieldId = FieldIdEnum.FUNCTION;
        FieldConfigCommonData commonData = new FieldConfigCommonData(null, fieldId, valueText, true);
        fieldConfig = value.getField(commonData);
    } else {
        System.err.println("Unknown field type : " + nodeType);
    }
    return fieldConfig;
}
Also used : RenderTransformValueInterface(com.sldeditor.rendertransformation.types.RenderTransformValueInterface) FieldConfigBase(com.sldeditor.ui.detail.config.FieldConfigBase) FieldConfigCommonData(com.sldeditor.ui.detail.config.FieldConfigCommonData) FieldIdEnum(com.sldeditor.common.xml.ui.FieldIdEnum)

Aggregations

FieldIdEnum (com.sldeditor.common.xml.ui.FieldIdEnum)1 RenderTransformValueInterface (com.sldeditor.rendertransformation.types.RenderTransformValueInterface)1 FieldConfigBase (com.sldeditor.ui.detail.config.FieldConfigBase)1 FieldConfigCommonData (com.sldeditor.ui.detail.config.FieldConfigCommonData)1