Class PositionChoices
Object
PositionChoices
The choices of text that may describe the position of an entity along a particular axis.
All choices are case insensitive.
-
Constructor Summary
ConstructorsConstructorDescriptionPositionChoices(String textMin, String textCenter, String textMax) Creates a newPositionChoicesinstance.PositionChoices(String textMin, String textCenter, String textMax, Optional<String> textMinAlternative) Creates a newPositionChoicesinstance. -
Method Summary
Modifier and TypeMethodDescriptionalignmentForDimension(String fieldName, String fieldValue) Calculates how to align a particular axis.
-
Constructor Details
-
PositionChoices
public PositionChoices(String textMin, String textCenter, String textMax, Optional<String> textMinAlternative) Creates a newPositionChoicesinstance.- Parameters:
textMin- The text to describe the minimum position along the axis.textCenter- The text to describe the center position along the axis.textMax- The text to describe the maximum position along the axis.textMinAlternative- An additional alternative text to describe the minimum position along the axis, if one exists.
-
PositionChoices
Creates a newPositionChoicesinstance.- Parameters:
textMin- The text to describe the minimum position along the axis.textCenter- The text to describe the center position along the axis.textMax- The text to describe the maximum position along the axis.
-
-
Method Details
-
alignmentForDimension
public AlignmentOnDimension alignmentForDimension(String fieldName, String fieldValue) throws BeanMisconfiguredException Calculates how to align a particular axis.- Parameters:
fieldName- the name of the field where the position was specified.fieldValue- the value of the field.- Returns:
- the minimum corner on the particular axis to locate the overlay.
- Throws:
BeanMisconfiguredException- if an invalid value for a field was used.
-