Class AbstractUIElement

java.lang.Object
io.john.amiscaray.stir.domain.elements.CacheableElement
io.john.amiscaray.stir.domain.elements.AbstractUIElement
Direct Known Subclasses:
AbstractContentFrame, AbstractElementContainer, AbstractFormField, AbstractListElement, AbstractTextElement, Anchor, Form, LinkedStyle, ListItem, Meta, Nav, NavLink, NavLinkList, Option, Script, Style, Table

public abstract class AbstractUIElement
extends CacheableElement
The base class for all classes that represent HTML elements
  • Field Details

    • id

      protected String id
      The ID of the element
    • cssClasses

      protected List<String> cssClasses
      A list of CSS classes for the element
    • style

      protected String style
      The style attribute of the element
    • hidden

      protected boolean hidden
      Whether the element should be hidden. Setting this to true adds the following style to it: display: none.
    • customAttributes

      protected Map<String,​String> customAttributes
  • Constructor Details

    • AbstractUIElement

      public AbstractUIElement​(String id, List<String> cssClasses, String style, boolean hidden, Map<String,​String> customAttributes)
    • AbstractUIElement

      public AbstractUIElement()
  • Method Details

    • getStyle

      public String getStyle()
    • setStyle

      public void setStyle​(String style)
    • getId

      public String getId()
    • getCssClasses

      public List<String> getCssClasses()
    • setId

      public void setId​(String id)
    • setCssClasses

      public void setCssClasses​(List<String> cssClasses)
    • setHidden

      public void setHidden​(boolean hidden)
    • addClass

      public void addClass​(String clazz)
      Adds a CSS class to the element
      Parameters:
      clazz - The CSS class to add to the element
    • isHidden

      public boolean isHidden()
    • getCustomAttributes

      public Map<String,​String> getCustomAttributes()
    • setCustomAttributes

      public void setCustomAttributes​(Map<String,​String> customAttributes)