diff options
| author | Benjamin Culkin <scorpress@gmail.com> | 2024-05-20 17:58:16 -0400 |
|---|---|---|
| committer | Benjamin Culkin <scorpress@gmail.com> | 2024-05-20 17:58:16 -0400 |
| commit | 40a9d99496e098562f090fb7ffce9e749011b131 (patch) | |
| tree | 437df24d65470582e943e494a52db8ed65a881ae /projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOBody.java | |
| parent | ff072dfe782f6f22123cd4ba050828d35c0d0fbd (diff) | |
Formatting pass
Diffstat (limited to 'projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOBody.java')
| -rw-r--r-- | projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOBody.java | 150 |
1 files changed, 71 insertions, 79 deletions
diff --git a/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOBody.java b/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOBody.java index 9f0707d..131d223 100644 --- a/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOBody.java +++ b/projects/net.wotonomy.web/src/main/java/net/wotonomy/web/WOBody.java @@ -23,99 +23,91 @@ import net.wotonomy.foundation.NSData; import net.wotonomy.foundation.NSDictionary; /** -* WOBody represents a page's "body" tag and is used to dynamically -* set the background image for a page, and therefore works much like WOImage. -* -* Bindings are: -* <UL> -* <li>src: A static URL for the image source.</li> -* <li>data: A NSData object with the image content. Must be used with mimeType.</li> -* <li>mimeType: The MIME type for the image data. Can be used with filename or data bindings.</li> -* <li>filename: The path to a file containing an image.</li> -* <li>framework: The optional framework from whence the image should be retrieved (used in conjunction with filename).</li> -* <li>key: A key under which this resource will be cached for repeated access.</li> -* -* @author michael@mpowers.net -* @author $Author: cgruber $ -* @version $Revision: 905 $ -*/ + * WOBody represents a page's "body" tag and is used to dynamically set the + * background image for a page, and therefore works much like WOImage. + * + * Bindings are: + * <UL> + * <li>src: A static URL for the image source.</li> + * <li>data: A NSData object with the image content. Must be used with + * mimeType.</li> + * <li>mimeType: The MIME type for the image data. Can be used with filename or + * data bindings.</li> + * <li>filename: The path to a file containing an image.</li> + * <li>framework: The optional framework from whence the image should be + * retrieved (used in conjunction with filename).</li> + * <li>key: A key under which this resource will be cached for repeated + * access.</li> + * + * @author michael@mpowers.net + * @author $Author: cgruber $ + * @version $Revision: 905 $ + */ public class WOBody extends WOImage { - protected String src; - protected String filename; - protected String framework; - protected NSData data; - protected String mimeType; + protected String src; + protected String filename; + protected String framework; + protected NSData data; + protected String mimeType; - protected WOBody() { - super(); - } + protected WOBody() { + super(); + } - public WOBody(String aName, NSDictionary aMap, WOElement template) { - super(aName, aMap, template); - } + public WOBody(String aName, NSDictionary aMap, WOElement template) { + super(aName, aMap, template); + } - void ensureAwakeInContext (WOContext aContext) - { - if ( rootElement != null ) - { - rootElement.ensureAwakeInContext( aContext ); - } - } + void ensureAwakeInContext(WOContext aContext) { + if (rootElement != null) { + rootElement.ensureAwakeInContext(aContext); + } + } - public void takeValuesFromRequest (WORequest aRequest, WOContext aContext) - { - if ( rootElement != null ) - { - rootElement.takeValuesFromRequest( aRequest, aContext ); - } - } - - public WOActionResults invokeAction (WORequest aRequest, WOContext aContext) - { - if ( rootElement != null ) - { - return rootElement.invokeAction( aRequest, aContext ); - } - return null; - } - - public void appendToResponse(WOResponse r, WOContext c) - { - r.appendContentString("<body background=\""); - r.appendContentString(sourceURL(c)); - r.appendContentString("\""); - r.appendContentString(additionalHTMLProperties(c.component(), new NSArray(new Object[]{ - "src", "filename", "framework", "data", "mimeType" }))); - r.appendContentString(">"); - if ( rootElement != null ) - { - rootElement.appendToResponse( r, c ); - } - r.appendContentString("</body>"); - } + public void takeValuesFromRequest(WORequest aRequest, WOContext aContext) { + if (rootElement != null) { + rootElement.takeValuesFromRequest(aRequest, aContext); + } + } + + public WOActionResults invokeAction(WORequest aRequest, WOContext aContext) { + if (rootElement != null) { + return rootElement.invokeAction(aRequest, aContext); + } + return null; + } + + public void appendToResponse(WOResponse r, WOContext c) { + r.appendContentString("<body background=\""); + r.appendContentString(sourceURL(c)); + r.appendContentString("\""); + r.appendContentString(additionalHTMLProperties(c.component(), + new NSArray(new Object[] { "src", "filename", "framework", "data", "mimeType" }))); + r.appendContentString(">"); + if (rootElement != null) { + rootElement.appendToResponse(r, c); + } + r.appendContentString("</body>"); + } } /* - * $Log$ - * Revision 1.2 2006/02/19 01:44:02 cgruber - * Add xmlrpc files - * Remove jclark and replace with dom4j and javax.xml.sax stuff - * Re-work dependencies and imports so it all compiles. + * $Log$ Revision 1.2 2006/02/19 01:44:02 cgruber Add xmlrpc files Remove jclark + * and replace with dom4j and javax.xml.sax stuff Re-work dependencies and + * imports so it all compiles. * - * Revision 1.1 2006/02/16 13:22:22 cgruber - * Check in all sources in eclipse-friendly maven-enabled packages. + * Revision 1.1 2006/02/16 13:22:22 cgruber Check in all sources in + * eclipse-friendly maven-enabled packages. * - * Revision 1.4 2003/08/07 00:15:14 chochos - * general cleanup (mostly removing unused imports) + * Revision 1.4 2003/08/07 00:15:14 chochos general cleanup (mostly removing + * unused imports) * - * Revision 1.3 2003/01/27 15:57:28 mpowers - * Now participates in all parts of request/response cycle. + * Revision 1.3 2003/01/27 15:57:28 mpowers Now participates in all parts of + * request/response cycle. * - * Revision 1.2 2003/01/27 15:08:23 mpowers - * Now appending to response. + * Revision 1.2 2003/01/27 15:08:23 mpowers Now appending to response. * * */ - |
