Enum Class WIconPair.IconType

java.lang.Object
java.lang.Enum<WIconPair.IconType>
eu.webtoolkit.jwt.WIconPair.IconType
All Implemented Interfaces:
Serializable, Comparable<WIconPair.IconType>, Constable
Enclosing class:
WIconPair

public static enum WIconPair.IconType extends Enum<WIconPair.IconType>
An enumeration describing a type of icon.

Each icon type describe how the string representing the icon should be interpreted. Depending on the interpretation the icon is looked for in different places, or within different resources.

Under URI, a static image is expected. This can be linked in many ways, using absolute paths, relative paths, or even external resources. The images can thus be served by JWt itself (in its docroot), or be retrieved from another server.

With IconName, a simple string is expected, matching the format of the Font Awesome version you are using. In this case it is required to include the stylesheet (WApplication#useStyleSheet()) in your application before this can be used.

  • Enum Constant Details

    • URI

      public static final WIconPair.IconType URI
      The URI of an image, linking to a static resource.
    • IconName

      public static final WIconPair.IconType IconName
      The name of a Font Awesome icon, using an external bundle.
  • Method Details

    • values

      public static WIconPair.IconType[] 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 WIconPair.IconType 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
    • getValue

      public int getValue()
      Returns the numerical representation of this enum.