Class IconHD

All Implemented Interfaces:
Serializable, Cloneable, org.apache.ecs.Element, org.apache.ecs.ElementRegistry

public class IconHD extends Icon
This class defines an high definition Icon A legacy icon mode can be forced via property. If legacy mode is not active, icon name is transformed (see the setupIcon() method) so that a corresponding svg icon is showed in place of the legacy icon. Appropriate css classes provide the right fill color to the svg icon, in accordance to the theme main color.
See Also:
  • Field Details

    • _baseClass

      protected String _baseClass
  • Constructor Details

    • IconHD

      public IconHD(String name)
      Creates a new instance of IconHD
      Parameters:
      name - The name of the IconHD
    • IconHD

      public IconHD(String name, String baseClass)
      Creates a new instance of IconHD
      Parameters:
      name - The name of the IconHD
      baseClass - The name of the base class
  • Method Details

    • setBaseClass

      public void setBaseClass(String baseClass)
      Sets the base class
      Parameters:
      baseClass - The base class to set
    • getBaseCssClass

      public String getBaseCssClass()
      Gets the current base css classes set for the icon
      Returns:
      the current base css classes set for the icon
    • compose

      public void compose()
      Invokes the appropriate specific methods, based on the characteristics of the image.
      Overrides:
      compose in class Icon
    • composeIcon

      protected void composeIcon()
      Creates the img tag that tracks the image defined characteristics. Used for all non-legacy mode cases.
    • composeSvgHD

      protected void composeSvgHD()