Interface IConfigValueEditorMetadataFactory
@NonExtendable
public interface IConfigValueEditorMetadataFactory
Creates editor metadata for values with a text serializer.
Obtain this factory from
IConfigGuiRegistration.getEditorMetadataFactory().- Since:
- 0.6.0
-
Method Summary
Modifier and TypeMethodDescription<T> IConfigValueEditorMetadata<T> create(net.mezzdev.config.api.value.serializer.IConfigValueSerializer<T> serializer, ConfigValueEditorType<T> editorType) Create metadata for a chosen editor with standard localized text.<T> IConfigValueEditorMetadata<T> create(net.mezzdev.config.api.value.serializer.IConfigValueSerializer<T> serializer, T value) Create metadata for a standard editor appropriate for the value and its storage constraints.createRange(net.mezzdev.config.api.value.serializer.IConfigValueSerializer<net.mezzdev.config.api.value.serializer.ConfigValueRange<T>> serializer, net.mezzdev.config.api.value.serializer.ConfigValueRange<T> bounds) Create metadata for editing a numeric interval with two slider handles.
-
Method Details
-
create
<T> IConfigValueEditorMetadata<T> create(net.mezzdev.config.api.value.serializer.IConfigValueSerializer<T> serializer, T value) Create metadata for a standard editor appropriate for the value and its storage constraints.- Parameters:
serializer- the value's serialization and validation rulesvalue- a representative value for choosing the editor- Returns:
- editor metadata with storage validation, available choices, and standard localized text
- Since:
- 0.6.0
-
create
<T> IConfigValueEditorMetadata<T> create(net.mezzdev.config.api.value.serializer.IConfigValueSerializer<T> serializer, ConfigValueEditorType<T> editorType) Create metadata for a chosen editor with standard localized text.- Parameters:
serializer- the value's serialization and validation ruleseditorType- the editor to use- Throws:
IllegalArgumentException- if a list editor has no element serializer, or a range editor is requested without bounds; usecreateRange(IConfigValueSerializer, ConfigValueRange)for ranges- Since:
- 0.6.0
-
createRange
<T> IConfigRangeValueEditorMetadata<T> createRange(net.mezzdev.config.api.value.serializer.IConfigValueSerializer<net.mezzdev.config.api.value.serializer.ConfigValueRange<T>> serializer, net.mezzdev.config.api.value.serializer.ConfigValueRange<T> bounds) Create metadata for editing a numeric interval with two slider handles.- Parameters:
serializer- the interval's serialization and validation rulesbounds- the inclusive bounds for both endpoints- Since:
- 0.6.0
-