Package org.loboevolution.html.style
Class HtmlLength
java.lang.Object
org.loboevolution.html.style.HtmlLength
HtmlLength class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HtmlLength[]Constant EMPTY_ARRAYstatic final intConstant LENGTH=2static final intConstant MULTI_LENGTH=0static final intConstant PIXELS=1 -
Constructor Summary
ConstructorsConstructorDescriptionHtmlLength(int pixels) Constructor for HtmlLength.HtmlLength(String spec, HTMLDocumentImpl doc) Constructor for HtmlLength. -
Method Summary
Modifier and TypeMethodDescriptionvoiddivideBy(int denominator) divideBy.intgetLength(int availLength) getLength.booleanisPreferredOver(HtmlLength otherLength) isPreferredOver.
-
Field Details
-
EMPTY_ARRAY
Constant EMPTY_ARRAY -
LENGTH
public static final int LENGTHConstant LENGTH=2- See Also:
-
MULTI_LENGTH
public static final int MULTI_LENGTHConstant MULTI_LENGTH=0- See Also:
-
PIXELS
public static final int PIXELSConstant PIXELS=1- See Also:
-
-
Constructor Details
-
HtmlLength
public HtmlLength(int pixels) Constructor for HtmlLength.
- Parameters:
pixels- aIntegerobject.
-
HtmlLength
public HtmlLength(String spec, HTMLDocumentImpl doc) throws IndexOutOfBoundsException, NumberFormatException Constructor for HtmlLength.
- Parameters:
spec- aStringobject.- Throws:
IndexOutOfBoundsException- if any.NumberFormatException- if any.IndexOutOfBoundsException- if any.NumberFormatException- if any.
-
-
Method Details
-
divideBy
public void divideBy(int denominator) divideBy.
- Parameters:
denominator- aIntegerobject.
-
getLength
public int getLength(int availLength) getLength.
-
isPreferredOver
isPreferredOver.
- Parameters:
otherLength- aHtmlLengthobject.- Returns:
- a boolean.
-