java.lang.Object
com.aoapps.html.any.Attributes.Dimension
- Enclosing class:
Attributes
See 2.4.4.4 Percentages and lengths.
Supports Integer length or percentage of parent (HTML 4-only).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends Element<?,
?, E>>
Eattribute
(E element, String name, int pixels, FunctionE<? super Integer, ValidationResult, Ex> validator) static <E extends Element<?,
?, E>>
Eattribute
(E element, String name, Integer pixels, FunctionE<? super Integer, ValidationResult, Ex> validator) attribute
(E element, String name, String pixelsOrPercent, FunctionE<? super String, ? extends String, Ex> normalizer) Deprecated.In HTML 4.01, the value could be defined in pixels or in % of the containing element.attribute
(E element, String name, String pixelsOrPercent, FunctionE<? super String, ? extends String, Ex1> normalizer, FunctionE<? super String, ValidationResult, Ex2> validator) Deprecated.In HTML 4.01, the value could be defined in pixels or in % of the containing element.
-
Method Details
-
attribute
public static <E extends Element<?,?, E attributeE>, Ex extends Throwable> (E element, String name, int pixels, FunctionE<? super Integer, ValidationResult, throws IOException, ExEx> validator) - 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 attributeE>> (E element, String name, int pixels) throws IOException - Type Parameters:
E
- This element type- Throws:
IOException
-
attribute
public static <E extends Element<?,?, E attributeE>, Ex extends Throwable> (E element, String name, Integer pixels, FunctionE<? super Integer, ValidationResult, throws IOException, ExEx> validator) - 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 attributeE>> (E element, String name, Integer pixels) throws IOException - Type Parameters:
E
- This element type- Throws:
IOException
-
attribute
@Deprecated public static <E extends Element<?,?, E attributeE>, Ex1 extends Throwable, Ex2 extends Throwable> (E element, String name, String pixelsOrPercent, FunctionE<? super String, ? extends String, throws IOException, Ex1, Ex2Ex1> normalizer, FunctionE<? super String, ValidationResult, Ex2> validator) 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 attributeE>, Ex extends Throwable> (E element, String name, String pixelsOrPercent, FunctionE<? super String, ? extends String, throws IOException, ExEx> normalizer) 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
-