Enum Class IconPlacement

java.lang.Object
java.lang.Enum<IconPlacement>
org.inspirenxe.strata.api.control.button.IconPlacement
All Implemented Interfaces:
Serializable, Comparable<IconPlacement>, Constable

public enum IconPlacement extends Enum<IconPlacement>
Where a button's icon sits beside its caption: before it, after it, above it or below it. The icon and the caption are 4 units apart and centered together in the button less its padding. A button with an icon and no caption, or a caption and no icon, looks the same whatever the placement.
  • Enum Constant Details

    • START

      public static final IconPlacement START
      The icon comes before the caption, at its left. A new button's placement.
    • END

      public static final IconPlacement END
      The icon comes after the caption, at its right. A caption too wide for the button is cut before the icon, so the icon stays in view.
    • TOP

      public static final IconPlacement TOP
      The icon sits above the caption, each centered across the button, as on a ribbon or a toolbar.
    • BOTTOM

      public static final IconPlacement BOTTOM
      The icon sits below the caption, each centered across the button.
  • Method Details

    • values

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

      public static IconPlacement valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isVertical

      public boolean isVertical()
      Returns whether the icon and the caption are stacked, one above the other.
      Returns:
      true for TOP and BOTTOM