Class Attributes.Dimension

java.lang.Object
com.aoapps.html.any.Attributes.Dimension
Enclosing class:
Attributes

public static final class Attributes.Dimension extends Object
See 2.4.4.4 Percentages and lengths.

Supports Integer length or percentage of parent (HTML 4-only).

See Also:
  • Method Details

    • attribute

      public static <E extends Element<?, ?, E>, Ex extends Throwable> E attribute(E element, String name, int pixels, FunctionE<? super Integer,ValidationResult,Ex> validator) throws IOException, Ex
      Type Parameters:
      E - This element type
      Parameters:
      validator - Optional validator, which gets the attribute value only when attribute will be actually written. Will not be called when the attribute will be skipped.
      Throws:
      IOException
      Ex
    • attribute

      public static <E extends Element<?, ?, E>> E attribute(E element, String name, int pixels) throws IOException
      Type Parameters:
      E - This element type
      Throws:
      IOException
    • attribute

      public static <E extends Element<?, ?, E>, Ex extends Throwable> E attribute(E element, String name, Integer pixels, FunctionE<? super Integer,ValidationResult,Ex> validator) throws IOException, Ex
      Type Parameters:
      E - This element type
      Parameters:
      validator - Optional validator, which gets the attribute value only when attribute will be actually written. Will not be called when the attribute will be skipped.
      Throws:
      IOException
      Ex
    • attribute

      public static <E extends Element<?, ?, E>> E attribute(E element, String name, Integer pixels) throws IOException
      Type Parameters:
      E - This element type
      Throws:
      IOException
    • attribute

      @Deprecated public static <E extends Element<?, ?, E>, Ex1 extends Throwable, Ex2 extends Throwable> E attribute(E element, String name, String pixelsOrPercent, FunctionE<? super String,? extends String,Ex1> normalizer, FunctionE<? super String,ValidationResult,Ex2> validator) throws IOException, Ex1, Ex2
      Deprecated.
      In HTML 4.01, the value could be defined in pixels or in % of the containing element. In HTML5, the value must be in pixels.
      Type Parameters:
      E - This element type
      Parameters:
      validator - Optional validator, which gets the attribute value only when attribute will be actually written. Will not be called when the attribute will be skipped.
      Throws:
      IOException
      Ex1
      Ex2
    • attribute

      @Deprecated public static <E extends Element<?, ?, E>, Ex extends Throwable> E attribute(E element, String name, String pixelsOrPercent, FunctionE<? super String,? extends String,Ex> normalizer) throws IOException, Ex
      Deprecated.
      In HTML 4.01, the value could be defined in pixels or in % of the containing element. In HTML5, the value must be in pixels.
      Type Parameters:
      E - This element type
      Throws:
      IOException
      Ex