All Implemented Interfaces:
TagBase, AAttributable, Serializable, Cloneable

public class Media extends AbstractAttribute implements AAttributable
This attribute specifies the media which the linked resource applies to. Its value must be a media query. This attribute is mainly useful when linking to external stylesheets by allowing the user agent to pick the best adapted one for the device it runs on.
Since:
1.0.0
See Also:
  • Constructor Details

    • Media

      public Media(String value)
      This attribute specifies the media which the linked resource applies to. Its value must be a media query. This attribute is mainly useful when linking to external stylesheets by allowing the user agent to pick the best adapted one for the device it runs on.
      Parameters:
      value - the value for the attribute
      Since:
      1.0.0
  • Method Details

    • setValue

      public void setValue(String value)
      sets the value for this attribute
      Parameters:
      value - the value for the attribute.
      Since:
      1.0.0
    • setValue

      public void setValue(boolean updateClient, String value)
      sets the value for this attribute
      Parameters:
      updateClient - true to update client browser page if it is available. The default value is true but it will be ignored if there is no client browser page.
      value - the value for the attribute.
      Since:
      2.1.15
    • getValue

      public String getValue()
      gets the value of this attribute
      Returns:
      the value of the attribute
      Since:
      1.0.0
    • init

      protected void init()
      invokes only once per object
      Since:
      1.0.0