Enum ScreenPart

    • Enum Constant Detail

      • LEFT

        public static final ScreenPart LEFT
        From left part of screen to left part + border size.
      • RIGHT

        public static final ScreenPart RIGHT
        From right part of screen to right part - border size.
      • UP

        public static final ScreenPart UP
        From top part to top part + border size.
      • BOTTOM

        public static final ScreenPart BOTTOM
        From bottom part to bottom part - border size.
      • LEFT_UP

        public static final ScreenPart LEFT_UP
        From top and left part.
      • RIGHT_UP

        public static final ScreenPart RIGHT_UP
        From top and right part.
      • LEFT_BOTTOM

        public static final ScreenPart LEFT_BOTTOM
        From bottom and left part.
      • RIGHT_BOTTOM

        public static final ScreenPart RIGHT_BOTTOM
        From bottom and right part.
      • CENTER

        public static final ScreenPart CENTER
        If in none of the other screen parts.
    • Method Detail

      • values

        public static ScreenPart[] 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 ScreenPart 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
      • getFromPosition

        public static ScreenPart getFromPosition​(ScreenSize res,
                                                 MousePosition position)
        Retrieve the screen part containing the given position.
        Parameters:
        res - Rectangle with the screen size.
        position - Position to check.
        Returns:
        The screen part where the given position is.