com.guiseframework.platform.web
Class AbstractWebDepictContext
java.lang.Object
com.globalmentor.beans.BoundPropertyObject
com.guiseframework.platform.AbstractDepictContext
com.guiseframework.platform.AbstractTextDepictContext
com.guiseframework.platform.AbstractXMLDepictContext
com.guiseframework.platform.AbstractXHTMLDepictContext
com.guiseframework.platform.web.AbstractWebDepictContext
- All Implemented Interfaces:
- com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, DepictContext, TextDepictContext, WebDepictContext, XHTMLDepictContext, XMLDepictContext
- Direct Known Subclasses:
- HTTPServletWebDepictContext
public abstract class AbstractWebDepictContext
- extends AbstractXHTMLDepictContext
- implements WebDepictContext
Abstract implementation of information related to the current depiction on the web platform.
This implementation maps the XHTML namespace to the prefix .
- Author:
- Garret Wilson
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
|
Method Summary |
protected java.lang.StringBuilder |
appendCSSOpacityProperty(java.lang.StringBuilder stringBuilder,
double opacity)
Appends a CSS property designation. |
protected static java.lang.StringBuilder |
appendCSSValue(java.lang.StringBuilder stringBuilder,
Color color)
Appends a CSS string representation of the given color. |
protected static java.lang.StringBuilder |
appendCSSValue(java.lang.StringBuilder stringBuilder,
Cursor cursor,
Orientation orientation)
Appends a CSS string representation of the given cursor. |
protected static java.lang.StringBuilder |
appendCSSValue(java.lang.StringBuilder stringBuilder,
Extent extent)
Appends a CSS string representation of the given extent. |
protected static java.lang.StringBuilder |
appendCSSValue(java.lang.StringBuilder stringBuilder,
FontStyle fontStyle)
Appends a CSS string representation of the given font style. |
protected static java.lang.StringBuilder |
appendCSSValue(java.lang.StringBuilder stringBuilder,
LineStyle lineStyle)
Appends a CSS string representation of the given line style, such as used for a border style. |
protected static java.lang.StringBuilder |
appendCSSValue(java.lang.StringBuilder stringBuilder,
java.util.List<?> items)
Appends a CSS string containing the given list of items. |
protected java.lang.StringBuilder |
appendCSSValue(java.lang.StringBuilder stringBuilder,
java.net.URI uri)
Appends a CSS string representation of the given URI. |
java.lang.String |
getCSSStyleString(java.util.Map<java.lang.String,java.lang.Object> styles,
Orientation orientation)
Returns a string representation of the provided style declarations. |
WebPlatform |
getPlatform()
|
| Methods inherited from class com.guiseframework.platform.AbstractXMLDepictContext |
clearDepictText, encode, getAttributeHashAttributeQualifiedName, getAttributeValue, getContentHashAttributeQualifiedName, getDepictStringBuilder, getMessageDigest, getQualifiedName, getXMLNamespacePrefixManager, isHashAttributesGenerated, setHashAttributesGenerated, writeAttribute, writeComment, writeCommentClose, writeCommentOpen, writeDocType, writeDocType, writeElementBegin, writeElementBegin, writeElementEnd |
| Methods inherited from class com.guiseframework.platform.AbstractTextDepictContext |
getDepictText, getIndentLevel, indent, indent, isFormatted, setIndentLevel, unindent, write, write, writeIndent, writeLiteral |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.guiseframework.platform.TextDepictContext |
clearDepictText, getDepictStringBuilder, getDepictText, getIndentLevel, getOutputCharacterEncoding, getOutputContentType, indent, indent, isFormatted, setIndentLevel, setOutputContentType, unindent, write, write, writeIndent, writeLiteral |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
AbstractWebDepictContext
public AbstractWebDepictContext(GuiseSession session,
Destination destination)
throws java.io.IOException
- Guise session constructor.
- Parameters:
session - The Guise user session of which this context is a part.destination - The destination with which this context is associated.
- Throws:
java.lang.NullPointerException - if the given session and/or destination is null.
java.io.IOException - If there was an I/O error loading a needed resource.
getPlatform
public WebPlatform getPlatform()
- Specified by:
getPlatform in interface DepictContext- Specified by:
getPlatform in interface WebDepictContext- Overrides:
getPlatform in class AbstractDepictContext
- Returns:
- The web platform on which Guise objects are depicted.
getCSSStyleString
public java.lang.String getCSSStyleString(java.util.Map<java.lang.String,java.lang.Object> styles,
Orientation orientation)
- 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:
These styles include the CSS property with a value of .
This implementation supports values of the following types:
All other values will be added using
Object.toString().
- Specified by:
getCSSStyleString in interface WebDepictContext
- 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.
appendCSSOpacityProperty
protected java.lang.StringBuilder appendCSSOpacityProperty(java.lang.StringBuilder stringBuilder,
double opacity)
- Appends a CSS property designation.
If the user agent is IE 6, the appropriate property will also be added.
- Parameters:
stringBuilder - The string builder to which the style will be addedopacity - The opacity value to add.
- Returns:
- The provided string builder.
appendCSSValue
protected static java.lang.StringBuilder appendCSSValue(java.lang.StringBuilder stringBuilder,
Color color)
- Appends a CSS string representation of the given color.
This method correctly handles transparent colors with the special CSS keyword .
- Parameters:
stringBuilder - The string builder to which the style will be addedcolor - The color to represent in CSS.
- Returns:
- The provided string builder.
appendCSSValue
protected static java.lang.StringBuilder appendCSSValue(java.lang.StringBuilder stringBuilder,
Cursor cursor,
Orientation orientation)
- Appends a CSS string representation of the given cursor.
- Parameters:
stringBuilder - The string builder to which the style will be addedcursor - The cursor to represent in CSS.orientation - The orientation of the component for which the cursor is being set.
- Returns:
- The provided string builder.
- Throws:
java.lang.NullPointerException - if the given cursor is null.
appendCSSValue
protected static java.lang.StringBuilder appendCSSValue(java.lang.StringBuilder stringBuilder,
Extent extent)
- Appends a CSS string representation of the given extent.
- Parameters:
stringBuilder - The string builder to which the style will be addedextent - The extent to be represented by a CSS length string.
- Returns:
- The provided string builder.
appendCSSValue
protected static java.lang.StringBuilder appendCSSValue(java.lang.StringBuilder stringBuilder,
FontStyle fontStyle)
- Appends a CSS string representation of the given font style.
- Parameters:
stringBuilder - The string builder to which the style will be addedfontStyle - The font style to represent in CSS.
- Returns:
- The provided string builder.
- Throws:
java.lang.NullPointerException - if the given font style is null.
appendCSSValue
protected static java.lang.StringBuilder appendCSSValue(java.lang.StringBuilder stringBuilder,
LineStyle lineStyle)
- Appends a CSS string representation of the given line style, such as used for a border style.
- Parameters:
stringBuilder - The string builder to which the style will be addedlineStyle - The line style to be represented in CSS.
- Returns:
- The provided string builder.
- Throws:
java.lang.NullPointerException - if the given line style is null.
appendCSSValue
protected static java.lang.StringBuilder appendCSSValue(java.lang.StringBuilder stringBuilder,
java.util.List<?> items)
- Appends a CSS string containing the given list of items.
Strings containing spaces will be quoted.
Items that are
null will be represented by a missing item in the list.
- Parameters:
stringBuilder - The string builder to which the style will be addedlist - The list of items to be converted to a string.
- Returns:
- The provided string builder.
appendCSSValue
protected java.lang.StringBuilder appendCSSValue(java.lang.StringBuilder stringBuilder,
java.net.URI uri)
- Appends a CSS string representation of the given URI.
The URI will be dereferenced and resolved to the application as well as converted to a depict URI.
- Parameters:
stringBuilder - The string builder to which the style will be addeduri - The URI to be represented in CSS.
- Returns:
- The provided string builder.
- See Also:
AbstractDepictContext.getDepictionURI(URI, String...)
Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.