Package org.xhtmlrenderer.simple.extend
Class XhtmlNamespaceHandler
java.lang.Object
org.xhtmlrenderer.simple.NoNamespaceHandler
org.xhtmlrenderer.simple.extend.XhtmlCssOnlyNamespaceHandler
org.xhtmlrenderer.simple.extend.XhtmlNamespaceHandler
- All Implemented Interfaces:
NamespaceHandler
Handles xhtml documents, including presentational html attributes (see css 2.1 spec, 6.4.4).
In this class ONLY handling (css equivalents) of presentational properties
(according to css 2.1 spec, section 6.4.4) should be specified.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
private void
applyFloatingAlign
(Element e, StringBuilder style) private String
private String
private void
applyTableContentAlign
(Element e, StringBuilder style) private String
private String
private void
applyTextAlign
(Element e, StringBuilder style) private @Nullable Element
@Nullable String
For an element where isImageElement returns true, retrieves the URI associated with that Image, as reported by the element; makes no guarantee that the URI is correct, complete or points to anything in particular.boolean
Determines whether the specified Element represents a <form>.boolean
private boolean
Methods inherited from class org.xhtmlrenderer.simple.extend.XhtmlCssOnlyNamespaceHandler
convertToLength, getAnchorName, getAttribute, getClass, getDefaultStylesheet, getDocumentTitle, getElementStyling, getID, getLang, getLinkUri, getNamespace, getStylesheets, isInteger, readLinkElement, readStyleElement
Methods inherited from class org.xhtmlrenderer.simple.NoNamespaceHandler
getAttributeValue, getAttributeValue
-
Constructor Details
-
XhtmlNamespaceHandler
public XhtmlNamespaceHandler()
-
-
Method Details
-
isImageElement
- Specified by:
isImageElement
in interfaceNamespaceHandler
- Overrides:
isImageElement
in classNoNamespaceHandler
- Returns:
- Returns true if the Element represents an image.
-
isFormElement
Description copied from interface:NamespaceHandler
Determines whether the specified Element represents a <form>.- Specified by:
isFormElement
in interfaceNamespaceHandler
- Overrides:
isFormElement
in classNoNamespaceHandler
- Parameters:
e
- The Element to evaluate.- Returns:
- true if the Element is a <form> element, false otherwise.
-
getImageSourceURI
Description copied from interface:NamespaceHandler
For an element where isImageElement returns true, retrieves the URI associated with that Image, as reported by the element; makes no guarantee that the URI is correct, complete or points to anything in particular. For elements whereNamespaceHandler.isImageElement(Element)
returns false, this method may return false, and may also return false if the Element is not correctly formed and contains no URI; check the return value carefully.- Specified by:
getImageSourceURI
in interfaceNamespaceHandler
- Overrides:
getImageSourceURI
in classNoNamespaceHandler
- Parameters:
e
- The element to extract image info from.- Returns:
- String containing the URI for the image.
-
getNonCssStyling
- Specified by:
getNonCssStyling
in interfaceNamespaceHandler
- Overrides:
getNonCssStyling
in classNoNamespaceHandler
- Returns:
- The corresponding css properties for styling that is obtained in other ways.
-
applyBlockAlign
-
applyImgStyles
-
applyTableCellStyles
-
applyTableStyles
-
applyTableRowStyles
-
applyFloatingAlign
-
applyTextAlign
-
applyTableContentAlign
-
looksLikeAMangledColor
-
findTable
-