Class PropertyEditorFieldInfo
- java.lang.Object
-
- org.uberfire.ext.properties.editor.model.PropertyEditorFieldInfo
-
- Direct Known Subclasses:
CustomPropertyEditorFieldInfo
@Portable public class PropertyEditorFieldInfo extends Object
-
-
Constructor Summary
Constructors Constructor Description PropertyEditorFieldInfo()PropertyEditorFieldInfo(String label, String currentStringValue, PropertyEditorType type)Create a PropertyEditorFieldInfoPropertyEditorFieldInfo(String label, PropertyEditorType type)Create a PropertyEditorFieldInfo
-
Method Summary
-
-
-
Constructor Detail
-
PropertyEditorFieldInfo
public PropertyEditorFieldInfo()
-
PropertyEditorFieldInfo
public PropertyEditorFieldInfo(String label, PropertyEditorType type)
Create a PropertyEditorFieldInfo- Parameters:
label- field descriptortype- Property Editor Type of this field
-
PropertyEditorFieldInfo
public PropertyEditorFieldInfo(String label, String currentStringValue, PropertyEditorType type)
Create a PropertyEditorFieldInfo- Parameters:
label- field descriptortype- Property Editor Type of this fieldcurrentStringValue- Current value of this field
-
-
Method Detail
-
withKey
public PropertyEditorFieldInfo withKey(String key)
Key is a helper to identify a field. Sometimes labels can have complex descriptions. This key is a nice way to identify a property in a PropertyEditorChangeEvent.- Parameters:
key-
-
withComboValues
public PropertyEditorFieldInfo withComboValues(List<String> comboValues)
Combo values used in PropertyEditorType.COMBO fields.- Parameters:
comboValues- a list of combo values
-
withPriority
public PropertyEditorFieldInfo withPriority(int priority)
The priority value is used to sort the categories (lower values toward the beginning).- Parameters:
priority-- Returns:
-
withHelpInfo
public PropertyEditorFieldInfo withHelpInfo(String helpHeading, String helpText)
-
withValidators
public PropertyEditorFieldInfo withValidators(PropertyFieldValidator... validators)
Add validators to a specific field. This validators are executed before the change event.- Parameters:
validators-- Returns:
-
withValidators
public PropertyEditorFieldInfo withValidators(Collection<PropertyFieldValidator> validators)
-
withRemovalSupported
public PropertyEditorFieldInfo withRemovalSupported(boolean isRemovalSupported)
-
withOptions
public PropertyEditorFieldInfo withOptions(PropertyEditorFieldOption... options)
-
undo
public void undo()
-
getType
public PropertyEditorType getType()
-
getOriginalValue
public String getOriginalValue()
-
getCurrentStringValue
public String getCurrentStringValue()
-
setCurrentStringValue
public void setCurrentStringValue(String currentStringValue)
-
isRemovalSupported
public boolean isRemovalSupported()
-
hasHelpInfo
public boolean hasHelpInfo()
-
setPropertyEditorCategory
public void setPropertyEditorCategory(PropertyEditorCategory category)
-
getLabel
public String getLabel()
-
getPriority
public int getPriority()
-
getValidators
public List<PropertyFieldValidator> getValidators()
-
getEventId
public String getEventId()
-
getKey
public String getKey()
-
getHelpHeading
public String getHelpHeading()
-
getHelpText
public String getHelpText()
-
getOptions
public List<PropertyEditorFieldOption> getOptions()
-
-