public final class CssPixelValueConverter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CssPixelValueConverter.CssValue
Encapsulates the retrieval of a style attribute, given a DOM element from which to retrieve it.
|
Modifier and Type | Method and Description |
---|---|
static String |
pixelString(DomElement element,
CssPixelValueConverter.CssValue value)
Returns the specified length CSS attribute value value as a pixel length value.
|
static int |
pixelValue(DomElement element,
CssPixelValueConverter.CssValue value)
Converts the specified length CSS attribute value into an integer number of pixels.
|
static int |
pixelValue(String value)
Converts the specified length string value into an integer number of pixels.
|
public static int pixelValue(DomElement element, CssPixelValueConverter.CssValue value)
element
- the element for which the CSS attribute value is to be retrievedvalue
- the CSS attribute value which is to be retrievedpixelValue(String)
public static String pixelString(DomElement element, CssPixelValueConverter.CssValue value)
element
- the element for which the CSS attribute value is to be retrievedvalue
- the CSS attribute value which is to be retrievedpixelValue(DomElement, CssValue)
public static int pixelValue(String value)
pixelString(DomElement, CssValue)
if you
need percentage support).value
- the length string value to convert to an integer number of pixelspixelString(DomElement, CssValue)
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.