Package io.guise.framework.platform
Interface XHTMLDepictContext
-
- All Superinterfaces:
DepictContext
,com.globalmentor.beans.PropertyBindable
,TextDepictContext
,XMLDepictContext
- All Known Subinterfaces:
WebDepictContext
- All Known Implementing Classes:
AbstractWebDepictContext
,AbstractXHTMLDepictContext
,HTTPServletWebDepictContext
public interface XHTMLDepictContext extends XMLDepictContext
Encapsulation ofapplication/xhtml+xml
information related to the current depiction.- Author:
- Garret Wilson
- See Also:
- HTML 5 Data Attributes
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.guise.framework.platform.XMLDepictContext
XMLDepictContext.ElementState
-
-
Field Summary
Fields Modifier and Type Field Description static com.globalmentor.text.StringTemplate
CSS_PROPERTY_BORDER_X_COLOR_TEMPLATE
The template for "border-?-color".static com.globalmentor.text.StringTemplate
CSS_PROPERTY_BORDER_X_STYLE_TEMPLATE
The template for "border-?-style".static com.globalmentor.text.StringTemplate
CSS_PROPERTY_BORDER_X_WIDTH_TEMPLATE
The template for "border-?-width".static com.globalmentor.text.StringTemplate
CSS_PROPERTY_BORDER_X_Y_RADIUS_TEMPLATE
The template for "border-?-?-radius".static com.globalmentor.text.StringTemplate
CSS_PROPERTY_MARGIN_X_TEMPLATE
The template for "margin-?".static com.globalmentor.text.StringTemplate
CSS_PROPERTY_PADDING_X_TEMPLATE
The template for "padding-?".static java.util.Set<Side>
CSS_SIDES
The sides supported by CSS.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isAllDataAttributes()
Returns whether all non-default-namespace attributes are encoded at HTML5 data attributes.boolean
isDataAttributeNamespaceURI(java.net.URI namespaceURI)
Determines whether the given namespace URI should be represented as an HTML5 data attribute.void
registerDataAttributeNamespaceURI(java.net.URI namespaceURI)
Registers a namespace URI to be represented as an HTML5 data attribute.void
setAllDataAttributes(boolean dataAttributesEnabled)
Sets whether all non-default-namespace attributes are encoded at HTML5 data attributes.XMLDepictContext.ElementState
writeJavaScriptElement(java.net.URI javascriptURI)
Generates a JavaScript element that references the given URI.XMLDepictContext.ElementState
writeMetaElement(java.lang.String property, java.lang.String content)
Generates a meta element suitable for the head of an XHTML document.XMLDepictContext.ElementState
writeMetaElement(java.net.URI propertyNamespaceURI, java.lang.String propertyLocalName, java.lang.String content)
Generates a meta element suitable for the head of an XHTML document, creating a qualified name or the meta property based upon the given namespace URI and local name.-
Methods inherited from interface io.guise.framework.platform.DepictContext
getDepictionURI, getDepictionURI, getDepictionURI, getDestination, getPlatform, getSession, getStyles
-
Methods inherited from interface com.globalmentor.beans.PropertyBindable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from interface io.guise.framework.platform.TextDepictContext
clearDepictText, getDepictStringBuilder, getDepictText, getIndentLevel, getOutputCharset, getOutputContentType, indent, indent, isFormatted, setIndentLevel, setOutputContentType, unindent, write, write, writeIndent, writeLiteral
-
Methods inherited from interface io.guise.framework.platform.XMLDepictContext
getQualifiedName, writeAttribute, writeComment, writeCommentClose, writeCommentOpen, writeDocType, writeDocType, writeDocType, writeDocType, writeElementBegin, writeElementBegin, writeElementEnd
-
-
-
-
Field Detail
-
CSS_PROPERTY_BORDER_X_COLOR_TEMPLATE
static final com.globalmentor.text.StringTemplate CSS_PROPERTY_BORDER_X_COLOR_TEMPLATE
The template for "border-?-color".
-
CSS_PROPERTY_BORDER_X_Y_RADIUS_TEMPLATE
static final com.globalmentor.text.StringTemplate CSS_PROPERTY_BORDER_X_Y_RADIUS_TEMPLATE
The template for "border-?-?-radius".
-
CSS_PROPERTY_BORDER_X_STYLE_TEMPLATE
static final com.globalmentor.text.StringTemplate CSS_PROPERTY_BORDER_X_STYLE_TEMPLATE
The template for "border-?-style".
-
CSS_PROPERTY_BORDER_X_WIDTH_TEMPLATE
static final com.globalmentor.text.StringTemplate CSS_PROPERTY_BORDER_X_WIDTH_TEMPLATE
The template for "border-?-width".
-
CSS_PROPERTY_MARGIN_X_TEMPLATE
static final com.globalmentor.text.StringTemplate CSS_PROPERTY_MARGIN_X_TEMPLATE
The template for "margin-?".
-
CSS_PROPERTY_PADDING_X_TEMPLATE
static final com.globalmentor.text.StringTemplate CSS_PROPERTY_PADDING_X_TEMPLATE
The template for "padding-?".
-
CSS_SIDES
static final java.util.Set<Side> CSS_SIDES
The sides supported by CSS.
-
-
Method Detail
-
registerDataAttributeNamespaceURI
void registerDataAttributeNamespaceURI(java.net.URI namespaceURI)
Registers a namespace URI to be represented as an HTML5 data attribute. Any attribute in this namespace will be converted to lowercase and presented as an HTML5 attribute. For example, an attribute in the formexample:fooBar
will be depicted asdata-example-foobar
.- Parameters:
namespaceURI
- The namespace URI to register.- Throws:
java.lang.NullPointerException
- if the given namespace URI isnull
.
-
isDataAttributeNamespaceURI
boolean isDataAttributeNamespaceURI(java.net.URI namespaceURI)
Determines whether the given namespace URI should be represented as an HTML5 data attribute.- Parameters:
namespaceURI
- The namespace URI to check.- Returns:
true
if the given namespace URI should be represented as an HTML5 data attribute.
-
isAllDataAttributes
boolean isAllDataAttributes()
Returns whether all non-default-namespace attributes are encoded at HTML5 data attributes. This setting overridesisDataAttributeNamespaceURI(URI)
.- Returns:
- Whether all non-default-namespace attributes are encoded at HTML5 data attributes.
-
setAllDataAttributes
void setAllDataAttributes(boolean dataAttributesEnabled)
Sets whether all non-default-namespace attributes are encoded at HTML5 data attributes. If this setting is enabled, any non-default-namespace attribute will be converted to lowercase and presented as an HTML5 attribute. For example, an attribute in the formexample:fooBar
will be depicted asdata-example-foobar
.If set to
true
, the setting ofisDataAttributeNamespaceURI(URI)
is ignored.- Parameters:
dataAttributesEnabled
- Whether non-XHTML-namespace attributes are encoded at HTML5 data attributes.
-
writeJavaScriptElement
XMLDepictContext.ElementState writeJavaScriptElement(java.net.URI javascriptURI) throws java.io.IOException
Generates a JavaScript element that references the given URI. The given URI is resolved to the application path.- Parameters:
javascriptURI
- The application-relative IRO to the JavaScript file.- Returns:
- The state of the element written.
- Throws:
java.io.IOException
- if there is an error writing the information.
-
writeMetaElement
XMLDepictContext.ElementState writeMetaElement(java.lang.String property, java.lang.String content) throws java.io.IOException
Generates a meta element suitable for the head of an XHTML document.- Parameters:
property
- The meta property name.content
- The meta property content.- Returns:
- The state of the element written.
- Throws:
java.io.IOException
- if there is an error writing the information.
-
writeMetaElement
XMLDepictContext.ElementState writeMetaElement(java.net.URI propertyNamespaceURI, java.lang.String propertyLocalName, java.lang.String content) throws java.io.IOException
Generates a meta element suitable for the head of an XHTML document, creating a qualified name or the meta property based upon the given namespace URI and local name.- Parameters:
propertyNamespaceURI
- The URI of the XML namespace of the meta property name, ornull
if there is no namespace.propertyLocalName
- The local name of the meta property name with no prefix.content
- The meta property content.- Returns:
- The state of the element being written.
- Throws:
java.io.IOException
- if there is an error writing the information.
-
-