Object
PositionChoices

public class PositionChoices extends Object
The choices of text that may describe the position of an entity along a particular axis.

All choices are case insensitive.

  • Constructor Details

    • PositionChoices

      public PositionChoices(String textMin, String textCenter, String textMax, Optional<String> textMinAlternative)
      Creates a new PositionChoices instance.
      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

      public PositionChoices(String textMin, String textCenter, String textMax)
      Creates a new PositionChoices instance.
      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.