KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > wap > def > GraphicImage


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.wap.def;
17
18 /**
19  * Renders an WML "img" element. Render the value of the component as the value of the "src" attribute,
20  * after passing it to the getResourceURL() method of the ViewHandler for this application, and passing the result
21  * through the encodeResourceURL() method of theExternalContext.
22  * Render the value of the alt attribute as the value of the "alt" attribute.
23  * If the "styleClass" attribute is specified, render its value as the value of the "class" attribute.
24  *
25  * @wapfaces.tag
26  * componentFamily="UIGraphic"
27  * rendererType="ImageRenderer"
28  * tagName="graphicImage"
29  * tagBaseClass="org.apache.myfaces.wap.base.ComponentTagBase"
30  * bodyContent="empty"
31  *
32  * @author <a HREF="mailto:Jiri.Zaloudek@ivancice.cz">Jiri Zaloudek</a> (latest modification by $Author: matzew $)
33  * @version $Revision: 1.1 $ $Date: 2004/12/30 09:37:25 $
34  * $Log: GraphicImage.java,v $
35  * Revision 1.1 2004/12/30 09:37:25 matzew
36  * added a new RenderKit for WML. Thanks to Jirí Žaloudek
37  *
38  */

39
40
41 public class GraphicImage extends javax.faces.component.UIGraphic {
42     
43     /**
44      * This attribute specifies an alternative textual representation for the image. This representation is used when the image can not be displayed using any other method (i.e., the user agent does not support images, or the image contents can not be found).
45      *
46      *@wapfaces.attribute
47      * valueBinding="true"
48      * required="true"
49      */

50     java.lang.String JavaDoc alt;
51
52     /**
53      * This attribute specifies the URI for the image. If the browser supports images, it downloads the image from the specified URI and renders it when the text is being displayed.
54      *
55      *@wapfaces.attribute
56      * valueBinding="true"
57      * required="true"
58      */

59     java.lang.String JavaDoc url;
60     
61     /**
62      * This attribute specifies an alternative internal representation for the image. This representation is used if it exists; otherwise the image is downloaded from the URI specified in the src attribute, i.e., any localsrc parameter specified takes precedence over the image specified in the src parameter.
63      *
64      *@wapfaces.attribute
65      * valueBinding="true"
66      */

67     java.lang.String JavaDoc localsrc;
68
69     /**
70      * This attribute specify the amount of white space to be inserted to the above and below the image. The default value for this attribute is zero indicating that no white space should be inserted. If length is specified as a percentage value, the space inserted is based on the available horizontal or vertical space. This attribute is hints to the user agent and may be ignored.
71      *
72      * @wapfaces.attribute
73      * valueBinding="true"
74      */

75     java.lang.String JavaDoc vspace;
76
77     /**
78      * This attribute specify the amount of white space to be inserted to the left and right the image. The default value for this attribute is zero indicating that no white space should be inserted. If length is specified as a percentage value, the space inserted is based on the available horizontal or vertical space. This attribute is hints to the user agent and may be ignored.
79      *
80      * @wapfaces.attribute
81      * valueBinding="true"
82      */

83     java.lang.String JavaDoc hspace;
84
85     /**
86      * This attribute specifies image alignment within the text flow and with respect to the current insertion point. Align has three possible values: (top|middle|bottom)
87      *
88      * @wapfaces.attribute
89      * valueBinding="true"
90      */

91     java.lang.String JavaDoc align;
92
93     /**
94      * This attribute give user agents an idea of the size of an image or object so that they may reserve space for it and continue rendering the card while waiting for the image data. User agents may scale objects and images to match these values if appropriate. If length is specified as a percentage value, the resulting size is based on the available vertical space, not on the natural size of the image. This attribute is a hint to the user agent and may be ignored.
95      *
96      * @wapfaces.attribute
97      * valueBinding="true"
98      */

99     java.lang.String JavaDoc height;
100
101     /**
102      * This attribute give user agents an idea of the size of an image or object so that they may reserve space for it and continue rendering the card while waiting for the image data. User agents may scale objects and images to match these values if appropriate. If length is specified as a percentage value, the resulting size is based on the available horizontal space, not on the natural size of the image. This attribute is a hint to the user agent and may be ignored.
103      *
104      * @wapfaces.attribute
105      * valueBinding="true"
106      */

107     java.lang.String JavaDoc width;
108     
109     /**
110      * The attribute styleClass affiliates an element with one or more classes. Multiple elements can be given the same styleClass name.
111      *
112      * @wapfaces.attribute
113      * valueBinding="true"
114      */

115     java.lang.String JavaDoc styleClass;
116
117     /**
118      * The xml:lang attribute specifies the natural or formal language of an element or its attributes.
119      *
120      * @wapfaces.attribute
121      * valueBinding="true"
122      */

123     java.lang.String JavaDoc xmllang;
124     
125     /**
126      * The current value of this component.
127      *
128      * @wapfaces.attribute
129      * valueBinding="true"
130      * inherit="true"
131      */

132     java.lang.String JavaDoc value;
133
134     // ============= ABSTARACT ATTRIBUTES ======================================
135
/**
136      * The component identifier for the associated component.
137      *
138      * @wapfaces.attribute
139      * abstract="true"
140      * inherit="true"
141      */

142     java.lang.String JavaDoc id;
143     
144     /**
145      * Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit.
146      *
147      * @wapfaces.attribute
148      * abstract="true"
149      * inherit="true"
150      */

151     boolean rendered;
152         
153     /**
154      * The value binding expression linking this component to a property in a backing bean.
155      *
156      * @wapfaces.attribute
157      * abstract="true"
158      * inherit="true"
159      */

160     java.lang.String JavaDoc binding;
161 }
162
Popular Tags