Enum Location

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Location>

    public enum Location
    extends java.lang.Enum<Location>
    A location.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BOTTOM
      The location on the bottom side.
      LEFT
      The location on the left side.
      RIGHT
      The location on the right side.
      TOP
      The location on the top side.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract @NotNull javax.swing.AbstractButton createButton​(@NotNull java.lang.String title)
      Creates an AbstractButton for this location.
      abstract int getAxis()
      Returns the BoxLayout axis of this location.
      abstract @NotNull java.lang.String getBorderLocation()
      Returns the BorderLayout constraint of this location.
      abstract @NotNull java.lang.String getBorderLocationAlternativeLocation()
      Returns the BorderLayout constraint of this location for buttons in the alternative location.
      abstract @NotNull java.lang.String getBorderLocationStandardLocation()
      Returns the BorderLayout constraint of this location for buttons in the standard location.
      abstract @NotNull java.lang.String getName()
      Returns a name for building resource keys.
      abstract int getSplitPaneOppositeOrientation()
      Returns the opposite orientation for a JSplitPane.
      abstract int getSplitPaneOrientation()
      Returns the orientation for a JSplitPane.
      abstract double getSplitPaneResizeWeight()
      Returns the resize weight for a JSplitPane.
      abstract boolean isTopOrBottom()
      Returns whether this location is TOP or BOTTOM.
      abstract boolean isTopOrLeft()
      Returns whether this location is TOP or LEFT.
      static Location valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Location[] values()
      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 Detail

      • TOP

        public static final Location TOP
        The location on the top side.
      • BOTTOM

        public static final Location BOTTOM
        The location on the bottom side.
      • LEFT

        public static final Location LEFT
        The location on the left side.
      • RIGHT

        public static final Location RIGHT
        The location on the right side.
    • Method Detail

      • values

        public static Location[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Location c : Location.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Location valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • createButton

        @NotNull
        public abstract @NotNull javax.swing.AbstractButton createButton​(@NotNull
                                                                         @NotNull java.lang.String title)
        Creates an AbstractButton for this location.
        Parameters:
        title - the button's title
        Returns:
        the button
      • getBorderLocation

        @NotNull
        public abstract @NotNull java.lang.String getBorderLocation()
        Returns the BorderLayout constraint of this location.
        Returns:
        the constraint
      • getBorderLocationStandardLocation

        @NotNull
        public abstract @NotNull java.lang.String getBorderLocationStandardLocation()
        Returns the BorderLayout constraint of this location for buttons in the standard location.
        Returns:
        the constraint
      • getBorderLocationAlternativeLocation

        @NotNull
        public abstract @NotNull java.lang.String getBorderLocationAlternativeLocation()
        Returns the BorderLayout constraint of this location for buttons in the alternative location.
        Returns:
        the constraint
      • getAxis

        public abstract int getAxis()
        Returns the BoxLayout axis of this location.
        Returns:
        the axis
      • getSplitPaneOrientation

        public abstract int getSplitPaneOrientation()
        Returns the orientation for a JSplitPane.
        Returns:
        the orientation
      • getSplitPaneOppositeOrientation

        public abstract int getSplitPaneOppositeOrientation()
        Returns the opposite orientation for a JSplitPane.
        Returns:
        the opposite orientation
      • getSplitPaneResizeWeight

        public abstract double getSplitPaneResizeWeight()
        Returns the resize weight for a JSplitPane.
        Returns:
        the resize weight
      • isTopOrLeft

        public abstract boolean isTopOrLeft()
        Returns whether this location is TOP or LEFT.
        Returns:
        whether this location is top or left
      • isTopOrBottom

        public abstract boolean isTopOrBottom()
        Returns whether this location is TOP or BOTTOM.
        Returns:
        whether this location is top or bottom
      • getName

        @NotNull
        public abstract @NotNull java.lang.String getName()
        Returns a name for building resource keys.
        Returns:
        the name