java.lang.Object
java.lang.Enum<Region>
io.guise.framework.component.layout.Region
All Implemented Interfaces:
Serializable, Comparable<Region>

public enum Region extends Enum<Region>
Indicates a region of a larger area in internationalized relative terms.
Author:
Garret Wilson
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    In the center of the area.
    At the end of a line; "right" in left-to-right, top-to-bottom orientation.
    At the beginning of a line; "left" in left-to-right, top-to-bottom orientation.
    At the end of a page; "bottom" in left-to-right, top-to-bottom orientation.
    At the beginning of a page; "top" in left-to-right, top-to-bottom orientation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The number of regions for each of the the line and page flows.
    protected static final Region[][][]
    The three regions for each axis/direction combination.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Region
    getRegion(Orientation orientation, Flow flow, int regionIndex)
    Determines the corresponding region for an orientation flow and absolute region number.
    static Region
    Returns the enum constant of this type with the specified name.
    static Region[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • LINE_START

      public static final Region LINE_START
      At the beginning of a line; "left" in left-to-right, top-to-bottom orientation.
    • LINE_END

      public static final Region LINE_END
      At the end of a line; "right" in left-to-right, top-to-bottom orientation.
    • PAGE_START

      public static final Region PAGE_START
      At the beginning of a page; "top" in left-to-right, top-to-bottom orientation.
    • PAGE_END

      public static final Region PAGE_END
      At the end of a page; "bottom" in left-to-right, top-to-bottom orientation.
    • CENTER

      public static final Region CENTER
      In the center of the area.
  • Field Details

    • FLOW_REGION_COUNT

      public static final int FLOW_REGION_COUNT
      The number of regions for each of the the line and page flows.
      See Also:
    • REGIONS

      protected static final Region[][][] REGIONS
      The three regions for each axis/direction combination.
  • Method Details

    • values

      public static Region[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Region valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getRegion

      public static Region getRegion(Orientation orientation, Flow flow, int regionIndex)
      Determines the corresponding region for an orientation flow and absolute region number. For example, a left-to-right, top-to-bottom page flow of index 2 will yield PAGE_END, while a right-to-left, top-to-bottom line flow of index 2 will yield LINE_START.
      Parameters:
      orientation - The component orientation.
      flow - The flow (line or page).
      regionIndex - The absolute region index (0, 1, or 2) from the upper left-hand corner.
      Returns:
      The corresponding region for the orientation.
      Throws:
      IllegalArgumentException - if the given region index is less than 0 or greater than 2.