1 // WARNING: This file was automatically generated. Do not edit it directly,
2 // or you will lose your changes.
3
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 */
22 package org.apache.myfaces.trinidad.component.html;
23
24 import org.apache.myfaces.trinidad.bean.FacesBean;
25 import org.apache.myfaces.trinidad.bean.PropertyKey;
26 import org.apache.myfaces.trinidad.component.UIXComponentBase;
27 import org.apache.myfaces.trinidad.util.ComponentUtils;
28
29 /**
30 *
31 * The frame is used to specify attributes needed by an
32 * HTML frame. It does not render any child nodes, and should only be used as
33 * a facet on a frameBorderLayout component. The contents of a frame is selected
34 * by using the source attribute.
35 * <html:p>
36 * On mobile devices a list links to each frame is rendered
37 * for a frameBorderLayout, and each frame is brought up
38 * as a separate page.
39 * </html:p>
40 *
41 * <h4>Events:</h4>
42 * <table border="1" width="100%" cellpadding="3" summary="">
43 * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
44 * <th align="left">Type</th>
45 * <th align="left">Phases</th>
46 * <th align="left">Description</th>
47 * </tr>
48 * <tr class="TableRowColor">
49 * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
50 * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
51 * <td valign="top">Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.</td>
52 * </tr>
53 * </table>
54 */
55 public class HtmlFrame extends UIXComponentBase
56 {
57 static public final FacesBean.Type TYPE = new FacesBean.Type(
58 UIXComponentBase.TYPE);
59 static public final PropertyKey SOURCE_KEY =
60 TYPE.registerKey("source", String.class);
61 static public final PropertyKey LONG_DESC_URL_KEY =
62 TYPE.registerKey("longDescURL", String.class);
63 static public final PropertyKey NAME_KEY =
64 TYPE.registerKey("name", String.class);
65 static public final PropertyKey WIDTH_KEY =
66 TYPE.registerKey("width", String.class);
67 static public final PropertyKey HEIGHT_KEY =
68 TYPE.registerKey("height", String.class);
69 static public final PropertyKey MARGIN_WIDTH_KEY =
70 TYPE.registerKey("marginWidth", Integer.class);
71 static public final PropertyKey MARGIN_HEIGHT_KEY =
72 TYPE.registerKey("marginHeight", Integer.class);
73 static public final PropertyKey SCROLLING_KEY =
74 TYPE.registerKey("scrolling", String.class, "auto");
75 static public final PropertyKey SHORT_DESC_KEY =
76 TYPE.registerKey("shortDesc", String.class);
77 static public final PropertyKey PARTIAL_TRIGGERS_KEY =
78 TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
79 static public final PropertyKey STYLE_CLASS_KEY =
80 TYPE.registerKey("styleClass", String.class);
81 static public final PropertyKey INLINE_STYLE_KEY =
82 TYPE.registerKey("inlineStyle", String.class);
83
84 static public final String COMPONENT_FAMILY =
85 "org.apache.myfaces.trinidad.Frame";
86 static public final String COMPONENT_TYPE =
87 "org.apache.myfaces.trinidad.HtmlFrame";
88
89 /**
90 * Construct an instance of the HtmlFrame.
91 */
92 public HtmlFrame()
93 {
94 super("org.apache.myfaces.trinidad.Frame");
95 }
96
97 /**
98 * Gets the URI for the source of this frame
99 * <p>
100 * This is a required property on the component.
101 * </p>
102 *
103 * @return the new source value
104 */
105 final public String getSource()
106 {
107 return ComponentUtils.resolveString(getProperty(SOURCE_KEY));
108 }
109
110 /**
111 * Sets the URI for the source of this frame
112 * <p>
113 * This is a required property on the component.
114 *
115 * @param source the new source value
116 */
117 final public void setSource(String source)
118 {
119 setProperty(SOURCE_KEY, (source));
120 }
121
122 /**
123 * Gets <html> This attribute specifies a link to a long description of the
124 * frame. This description should supplement the short description
125 * provided using the <code>shortDesc</code> attribute, and
126 * may be particularly useful for non-visual user agents.</html>
127 *
128 * @return the new longDescURL value
129 */
130 final public String getLongDescURL()
131 {
132 return ComponentUtils.resolveString(getProperty(LONG_DESC_URL_KEY));
133 }
134
135 /**
136 * Sets <html> This attribute specifies a link to a long description of the
137 * frame. This description should supplement the short description
138 * provided using the <code>shortDesc</code> attribute, and
139 * may be particularly useful for non-visual user agents.</html>
140 *
141 * @param longDescURL the new longDescURL value
142 */
143 final public void setLongDescURL(String longDescURL)
144 {
145 setProperty(LONG_DESC_URL_KEY, (longDescURL));
146 }
147
148 /**
149 * Gets the name used to identify this frame
150 *
151 * @return the new name value
152 */
153 final public String getName()
154 {
155 return ComponentUtils.resolveString(getProperty(NAME_KEY));
156 }
157
158 /**
159 * Sets the name used to identify this frame
160 *
161 * @param name the new name value
162 */
163 final public void setName(String name)
164 {
165 setProperty(NAME_KEY, (name));
166 }
167
168 /**
169 * Gets the proposed width of this frame
170 * This can be in pixels or percentage. This attribute is used only if this
171 * frame is a left/right facet of a frameBorderLayout component.
172 *
173 * @return the new width value
174 */
175 final public String getWidth()
176 {
177 return ComponentUtils.resolveString(getProperty(WIDTH_KEY));
178 }
179
180 /**
181 * Sets the proposed width of this frame
182 * This can be in pixels or percentage. This attribute is used only if this
183 * frame is a left/right facet of a frameBorderLayout component.
184 *
185 * @param width the new width value
186 */
187 final public void setWidth(String width)
188 {
189 setProperty(WIDTH_KEY, (width));
190 }
191
192 /**
193 * Gets the proposed height of this frame.
194 * This can be in pixels or percentage. This attribute is used only if this
195 * frame is a top/bottom facet of a frameBorderLayout component.
196 *
197 * @return the new height value
198 */
199 final public String getHeight()
200 {
201 return ComponentUtils.resolveString(getProperty(HEIGHT_KEY));
202 }
203
204 /**
205 * Sets the proposed height of this frame.
206 * This can be in pixels or percentage. This attribute is used only if this
207 * frame is a top/bottom facet of a frameBorderLayout component.
208 *
209 * @param height the new height value
210 */
211 final public void setHeight(String height)
212 {
213 setProperty(HEIGHT_KEY, (height));
214 }
215
216 /**
217 * Gets the width of the frame margin. The value must be greater than zero (pixels).
218 *
219 * @return the new marginWidth value
220 */
221 final public int getMarginWidth()
222 {
223 return ComponentUtils.resolveInteger(getProperty(MARGIN_WIDTH_KEY));
224 }
225
226 /**
227 * Sets the width of the frame margin. The value must be greater than zero (pixels).
228 *
229 * @param marginWidth the new marginWidth value
230 */
231 final public void setMarginWidth(int marginWidth)
232 {
233 setProperty(MARGIN_WIDTH_KEY, Integer.valueOf(marginWidth));
234 }
235
236 /**
237 * Gets the width of the frame margin. The value must be greater than zero (pixels).
238 *
239 * @return the new marginHeight value
240 */
241 final public int getMarginHeight()
242 {
243 return ComponentUtils.resolveInteger(getProperty(MARGIN_HEIGHT_KEY));
244 }
245
246 /**
247 * Sets the width of the frame margin. The value must be greater than zero (pixels).
248 *
249 * @param marginHeight the new marginHeight value
250 */
251 final public void setMarginHeight(int marginHeight)
252 {
253 setProperty(MARGIN_HEIGHT_KEY, Integer.valueOf(marginHeight));
254 }
255
256 /**
257 * Gets <html> whether or not scrollbars are available on this
258 * frame. Valid values for this attribute are the following
259 * constants:<br/>
260 *
261 *
262 * "yes" specifies that scrollbars are always available. <br/>
263 * "no" specifies that scrollbars are never available. <br/>
264 * "auto" specifies that the browser determines whether to display scroll
265 * bars based on the size of the frame and its content. If
266 * you do not specify a value for scrolling, the default
267 * value is "auto"</html>
268 *
269 * @return the new scrolling value
270 */
271 final public String getScrolling()
272 {
273 return ComponentUtils.resolveString(getProperty(SCROLLING_KEY), "auto");
274 }
275
276 /**
277 * Sets <html> whether or not scrollbars are available on this
278 * frame. Valid values for this attribute are the following
279 * constants:<br/>
280 *
281 *
282 * "yes" specifies that scrollbars are always available. <br/>
283 * "no" specifies that scrollbars are never available. <br/>
284 * "auto" specifies that the browser determines whether to display scroll
285 * bars based on the size of the frame and its content. If
286 * you do not specify a value for scrolling, the default
287 * value is "auto"</html>
288 *
289 * @param scrolling the new scrolling value
290 */
291 final public void setScrolling(String scrolling)
292 {
293 setProperty(SCROLLING_KEY, (scrolling));
294 }
295
296 /**
297 * Gets the short description of the bean. This text
298 * is commonly used by user agents to display tooltip help text.
299 *
300 * @return the new shortDesc value
301 */
302 final public String getShortDesc()
303 {
304 return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
305 }
306
307 /**
308 * Sets the short description of the bean. This text
309 * is commonly used by user agents to display tooltip help text.
310 *
311 * @param shortDesc the new shortDesc value
312 */
313 final public void setShortDesc(String shortDesc)
314 {
315 setProperty(SHORT_DESC_KEY, (shortDesc));
316 }
317
318 /**
319 * Gets the IDs of the components that should trigger a partial update.
320 * This component will listen on the trigger components. If one of the
321 * trigger components receives an event that will cause it to update
322 * in some way, this component will request to be updated too.
323 *
324 * @return the new partialTriggers value
325 */
326 final public String[] getPartialTriggers()
327 {
328 return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
329 }
330
331 /**
332 * Sets the IDs of the components that should trigger a partial update.
333 * This component will listen on the trigger components. If one of the
334 * trigger components receives an event that will cause it to update
335 * in some way, this component will request to be updated too.
336 *
337 * @param partialTriggers the new partialTriggers value
338 */
339 final public void setPartialTriggers(String[] partialTriggers)
340 {
341 setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
342 }
343
344 /**
345 * Gets the CSS style class of the bean.
346 *
347 * @return the new styleClass value
348 */
349 final public String getStyleClass()
350 {
351 return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
352 }
353
354 /**
355 * Sets the CSS style class of the bean.
356 *
357 * @param styleClass the new styleClass value
358 */
359 final public void setStyleClass(String styleClass)
360 {
361 setProperty(STYLE_CLASS_KEY, (styleClass));
362 }
363
364 /**
365 * Gets the inline CSS style for this element
366 *
367 * @return the new inlineStyle value
368 */
369 final public String getInlineStyle()
370 {
371 return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
372 }
373
374 /**
375 * Sets the inline CSS style for this element
376 *
377 * @param inlineStyle the new inlineStyle value
378 */
379 final public void setInlineStyle(String inlineStyle)
380 {
381 setProperty(INLINE_STYLE_KEY, (inlineStyle));
382 }
383
384 @Override
385 public String getFamily()
386 {
387 return COMPONENT_FAMILY;
388 }
389
390 @Override
391 protected FacesBean.Type getBeanType()
392 {
393 return TYPE;
394 }
395
396 /**
397 * Construct an instance of the HtmlFrame.
398 */
399 protected HtmlFrame(
400 String rendererType
401 )
402 {
403 super(rendererType);
404 }
405
406 static
407 {
408 TYPE.lockAndRegister("org.apache.myfaces.trinidad.Frame","org.apache.myfaces.trinidad.Frame");
409 }
410 }