Package org.loboevolution.html.style
Class HtmlLength
java.lang.Object
org.loboevolution.html.style.HtmlLength
HtmlLength class.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HtmlLength[]
Constant EMPTY_ARRAYstatic final int
Constant LENGTH=2static final int
Constant MULTI_LENGTH=0static final int
Constant PIXELS=1 -
Constructor Summary
ConstructorDescriptionHtmlLength
(int pixels) Constructor for HtmlLength.HtmlLength
(String spec, HTMLDocumentImpl doc) Constructor for HtmlLength. -
Method Summary
Modifier and TypeMethodDescriptionvoid
divideBy
(int denominator) divideBy.int
getLength
(int availLength) getLength.boolean
isPreferredOver
(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
- aInteger
object.
-
HtmlLength
public HtmlLength(String spec, HTMLDocumentImpl doc) throws IndexOutOfBoundsException, NumberFormatException Constructor for HtmlLength.
- Parameters:
spec
- aString
object.- Throws:
IndexOutOfBoundsException
- if any.NumberFormatException
- if any.IndexOutOfBoundsException
- if any.NumberFormatException
- if any.
-
-
Method Details
-
divideBy
public void divideBy(int denominator) divideBy.
- Parameters:
denominator
- aInteger
object.
-
getLength
public int getLength(int availLength) getLength.
-
isPreferredOver
isPreferredOver.
- Parameters:
otherLength
- aHtmlLength
object.- Returns:
- a boolean.
-