Package io.guise.framework.platform.web
Interface WebDepictContext
- All Superinterfaces:
DepictContext
,com.globalmentor.beans.PropertyBindable
,TextDepictContext
,XHTMLDepictContext
,XMLDepictContext
- All Known Implementing Classes:
AbstractWebDepictContext
,HTTPServletWebDepictContext
Information related to the current depiction on the web platform.
- Author:
- Garret Wilson
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.guise.framework.platform.XMLDepictContext
XMLDepictContext.ElementState
-
Field Summary
Fields inherited from interface io.guise.framework.platform.XHTMLDepictContext
CSS_PROPERTY_BORDER_X_COLOR_TEMPLATE, CSS_PROPERTY_BORDER_X_STYLE_TEMPLATE, CSS_PROPERTY_BORDER_X_WIDTH_TEMPLATE, CSS_PROPERTY_BORDER_X_Y_RADIUS_TEMPLATE, CSS_PROPERTY_MARGIN_X_TEMPLATE, CSS_PROPERTY_PADDING_X_TEMPLATE, CSS_SIDES
-
Method Summary
Modifier and TypeMethodDescriptiongetCSSStyleString
(Map<String, Object> styles, Orientation orientation) Returns a string representation of the provided style declarations.boolean
Methods inherited from interface io.guise.framework.platform.DepictContext
getDepictionURI, getDepictionURI, getDepictionURI, getDestination, 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.XHTMLDepictContext
isAllDataAttributes, isDataAttributeNamespaceURI, registerDataAttributeNamespaceURI, setAllDataAttributes, writeJavaScriptElement, writeMetaElement, writeMetaElement
Methods inherited from interface io.guise.framework.platform.XMLDepictContext
getQualifiedName, writeAttribute, writeComment, writeCommentClose, writeCommentOpen, writeDocType, writeDocType, writeDocType, writeDocType, writeElementBegin, writeElementBegin, writeElementEnd
-
Method Details
-
getPlatform
WebPlatform getPlatform()- Specified by:
getPlatform
in interfaceDepictContext
- Returns:
- The web platform on which Guise objects are depicted.
-
isQuirksMode
boolean isQuirksMode()- Returns:
- Whether quirks mode is being used.
-
getCSSStyleString
Returns a string representation of the provided style declarations. This method performs special processing on the following properties, including generating user-agent-specific styles to allow proper display on certain browsers:- "color" with a value of
Color
and an alpha less than 1.0. - "cursor" with a value of
URI
, interpreted as a predefined cursor (one ofCursor.getURI()
) or as a URI to a custom cursor; URI references are allowed in either. - "display" with a value of "inline-block".
- "font-weight" with a value of
Number
, interpreted in terms ofPresentationModel.FONT_WEIGHT_NORMAL
andPresentationModel.FONT_WEIGHT_BOLD
. - "max-width" or "max-height" with a pixel value of
Extent
. - "opacity" with a value of
Number
.
Color
Cursor
Extent
FontStyle
LineStyle
List
URI
with URI references allowed- An array of objects, each of which will be serialized and separated by spaces.
Object.toString()
.- Parameters:
styles
- The map of styles to write, each keyed to a CSS style property.orientation
- The orientation of the component for which the style is being produced.- Returns:
- A string containing the given CSS properties and styles.
- "color" with a value of
-