Class Icon

All Implemented Interfaces:
Serializable, Cloneable, org.apache.ecs.Element, org.apache.ecs.ElementRegistry
Direct Known Subclasses:
IconHD

public class Icon extends ComposedElement implements Cloneable, Serializable
This class manages the Icon and all it's properties.
See Also:
  • Field Details

  • Constructor Details

    • Icon

      protected Icon()
    • Icon

      public Icon(String icon)
    • Icon

      public Icon(String icon, short type)
  • Method Details

    • infer

      protected final void infer(String icon, short type)
    • setOnClick

      public Icon setOnClick(String onclick)
      Sets the name of the event that is called on click
      Parameters:
      onclick - String containing the name of the event
      Returns:
      The Icon
    • setID

      public void setID(String id)
      Sets the id
      Parameters:
      id - The id to set
    • setTitle

      public void setTitle(String title)
      Sets the title
      Parameters:
      title - The title to set
    • setAlt

      public void setAlt(String alt)
      Sets the alt attribute for the icon
      Parameters:
      alt - The alt attribute for the icon
    • setStyle

      public void setStyle(String s)
      Sets the style attribute for the icon
      Parameters:
      s - The style attribute for the icon
    • setName

      public void setName(String name)
      Sets the name
      Parameters:
      name - The name to set
    • setAlign

      public void setAlign(String align)
      Sets the align
      Parameters:
      align - The align to set
    • setState

      public void setState(int state)
      Sets the state
      Parameters:
      state - The state to set
    • setNonStandardAttributes

      public void setNonStandardAttributes(String attributes)
      Sets not standard attributes
      Parameters:
      attributes - String containing not standard attributes
    • getNonStandardAttributes

      public String getNonStandardAttributes()
      Gets not standard attributes
      Returns:
      String containing not standard attributes
    • getState

      public int getState()
      Returns the state
      Returns:
      The state
    • isEnabled

      public boolean isEnabled()
      Returns if is enabled
      Returns:
      A boolean indicating if is enabled
    • compose

      public void compose()
      Specified by:
      compose in class ComposedElement
    • composeImage

      protected void composeImage()
    • composeCss

      protected void composeCss()
    • getBasename

      public String getBasename()
      Returns the base name
      Returns:
      The base name
    • getPath

      public String getPath()
      Returns the path
      Returns:
      The path
    • getExtension

      public String getExtension()
      Returns the extension
      Returns:
      The extension
    • getWidth

      public int getWidth()
      Returns the width
      Returns:
      The width
    • getHeight

      public int getHeight()
      Returns the height
      Returns:
      The height
    • setWidth

      public void setWidth(int width)
      Sets the width
      Parameters:
      width - The width to set
    • setHeight

      public void setHeight(int height)
      Sets the height
      Parameters:
      height - The height to set
    • getCopy

      public Icon getCopy()
      Returns a copy of the Icon
      Returns:
      A copy of the Icon
    • getSrc

      public String getSrc()
      Returns the src
      Returns:
      The src
    • getEnabledSrc

      public String getEnabledSrc()
      Returns the enabled src
      Returns:
      The enabled src
    • getDisabledSrc

      public String getDisabledSrc()
      Returns the disabled src
      Returns:
      The disabled src