Package net.mcreator.ui.minecraft.states
Class PropertyData.IntegerType
java.lang.Object
net.mcreator.ui.minecraft.states.PropertyData<Integer>
net.mcreator.ui.minecraft.states.PropertyData.IntegerType
- Enclosing class:
PropertyData<T>
A subclass for integer number type properties.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.mcreator.ui.minecraft.states.PropertyData
PropertyData.IntegerType, PropertyData.LogicType, PropertyData.NumberType, PropertyData.StringType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetComponent
(MCreator mcreator, Object value) Generates a UI component accepting values of typePropertyData
and sets its value to the passed one.Provides the default value of type of this property.int
getMax()
int
getMin()
getValue
(JComponent component) Extracts possible value of this property from the provided UI component.final Integer
parseObj
(com.google.gson.JsonElement value) Parses string representation of passed value of this property.final String
Converts passed value of this property to its string representation.Methods inherited from class net.mcreator.ui.minecraft.states.PropertyData
equals, getName, getPrefixedName, hashCode, toString
-
Constructor Details
-
IntegerType
-
IntegerType
-
-
Method Details
-
getMin
public int getMin() -
getMax
public int getMax() -
getDefaultValue
Description copied from class:PropertyData
Provides the default value of type of this property. This is the "null" value of this type, which means it may be outside value limits defined for a particular property.- Specified by:
getDefaultValue
in classPropertyData<Integer>
- Returns:
- A default value of this property's type.
-
toString
Description copied from class:PropertyData
Converts passed value of this property to its string representation.- Specified by:
toString
in classPropertyData<Integer>
- Parameters:
value
- A value of this property's type.- Returns:
- Possible value of this property as a string.
-
parseObj
Description copied from class:PropertyData
Parses string representation of passed value of this property.- Specified by:
parseObj
in classPropertyData<Integer>
- Parameters:
value
- Possible value of this property as JsonElement.- Returns:
- A value of this property's type.
-
getComponent
Description copied from class:PropertyData
Generates a UI component accepting values of typePropertyData
and sets its value to the passed one.- Specified by:
getComponent
in classPropertyData<Integer>
- Parameters:
mcreator
- The future parent window of the component returned.value
- Possible value of this property.- Returns:
- A UI component that accepts values of type
PropertyData
.
-
getValue
Description copied from class:PropertyData
Extracts possible value of this property from the provided UI component.- Specified by:
getValue
in classPropertyData<Integer>
- Parameters:
component
- A UI component that accepts values of typePropertyData
.- Returns:
- A value of this property's type.
-