Class LengthAttributeParser
java.lang.Object
com.google.gwt.uibinder.attributeparsers.LengthAttributeParser
- All Implemented Interfaces:
AttributeParser
Parses a CSS length value (e.g., "2em", "50%"), returning a comma-separated
(double, Unit) pair.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLengthAttributeParser
(DoubleAttributeParser doubleParser, EnumAttributeParser enumParser, com.google.gwt.uibinder.rebind.MortalLogger logger) -
Method Summary
-
Field Details
-
UNIT
-
-
Constructor Details
-
LengthAttributeParser
LengthAttributeParser(DoubleAttributeParser doubleParser, EnumAttributeParser enumParser, com.google.gwt.uibinder.rebind.MortalLogger logger)
-
-
Method Details
-
parse
public String parse(com.google.gwt.uibinder.rebind.XMLElement source, String lengthStr) throws UnableToCompleteException Description copied from interface:AttributeParser
Parse the given attribute value.- Specified by:
parse
in interfaceAttributeParser
- Parameters:
source
- the source code the value came from, for error reporting purposeslengthStr
- the attribute value to be parsed- Returns:
- a valid Java expression
- Throws:
UnableToCompleteException
- on parse error
-