Package org.htmlunit.platform
Class Platform
- java.lang.Object
-
- org.htmlunit.platform.Platform
-
public final class Platform extends java.lang.ObjectSingleton to handle JDK specific stuff. This is required to support at least the differences with android.
-
-
Field Summary
Fields Modifier and Type Field Description private static FontUtilFontUtil_private static XmlUtilsHelperAPIHelperSunXerces_private static XmlUtilsHelperAPIHelperXerces_
-
Constructor Summary
Constructors Modifier Constructor Description privatePlatform()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImageDatabuildImageData(java.io.InputStream inputStream)static java.util.Map<java.lang.Integer,java.util.List<java.lang.String>>getAttributesOrderMap(org.w3c.dom.Document document)Returns internal Xerces details about all elements in the specified document.static FontUtilgetFontUtil()static intgetIndex(org.w3c.dom.NamedNodeMap namedNodeMap, java.util.Map<java.lang.Integer,java.util.List<java.lang.String>> attributesOrderMap, org.w3c.dom.Node element, int requiredIndex)Forward the call to the correct helper.static RenderingBackendgetRenderingBackend(int imageWidth, int imageHeight)
-
-
-
Field Detail
-
FontUtil_
private static FontUtil FontUtil_
-
HelperXerces_
private static XmlUtilsHelperAPI HelperXerces_
-
HelperSunXerces_
private static XmlUtilsHelperAPI HelperSunXerces_
-
-
Method Detail
-
getIndex
public static int getIndex(org.w3c.dom.NamedNodeMap namedNodeMap, java.util.Map<java.lang.Integer,java.util.List<java.lang.String>> attributesOrderMap, org.w3c.dom.Node element, int requiredIndex)Forward the call to the correct helper.- Parameters:
namedNodeMap- the node mapattributesOrderMap- the order mapelement- the noderequiredIndex- the required index- Returns:
- the index or requiredIndex
-
getAttributesOrderMap
public static java.util.Map<java.lang.Integer,java.util.List<java.lang.String>> getAttributesOrderMap(org.w3c.dom.Document document)
Returns internal Xerces details about all elements in the specified document. The id of the returnedMapis thenodeIndexof an element, and the list is the array of ordered attributes names.- Parameters:
document- the document- Returns:
- the map of an element index with its ordered attribute names
-
getRenderingBackend
public static RenderingBackend getRenderingBackend(int imageWidth, int imageHeight)
- Parameters:
imageWidth- the width of the image this backend is forimageHeight- the height of the image this backend is for- Returns:
- a new
RenderingBackend. If theAwtRenderingBackendcan't be used aNoOpRenderingBackendis used instead.
-
getFontUtil
public static FontUtil getFontUtil()
- Returns:
- a new
FontUtil. If theAwtFontUtilcan't be used aNoOpFontUtilis used instead.
-
buildImageData
public static ImageData buildImageData(java.io.InputStream inputStream) throws java.io.IOException
- Throws:
java.io.IOException
-
-