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.core.output;
23
24 import java.util.Arrays;
25 import java.util.Collection;
26 import java.util.Collections;
27 import java.util.List;
28 import java.util.Map;
29 import javax.faces.component.UIComponent;
30 import javax.faces.component.behavior.ClientBehavior;
31 import javax.faces.component.behavior.ClientBehaviorHolder;
32 import org.apache.myfaces.trinidad.bean.FacesBean;
33 import org.apache.myfaces.trinidad.bean.PropertyKey;
34 import org.apache.myfaces.trinidad.component.UIXOutput;
35 import org.apache.myfaces.trinidad.util.ComponentUtils;
36
37 /**
38 *
39 * The outputText component supports styled text. The text
40 * can optionally be left unescaped, and supports
41 * conversion to and from Java objects.
42 *
43 * <h4>Events:</h4>
44 * <table border="1" width="100%" cellpadding="3" summary="">
45 * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
46 * <th align="left">Type</th>
47 * <th align="left">Phases</th>
48 * <th align="left">Description</th>
49 * </tr>
50 * <tr class="TableRowColor">
51 * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
52 * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
53 * <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>
54 * </tr>
55 * </table>
56 */
57 public class CoreOutputDocument extends UIXOutput
58 implements ClientBehaviorHolder
59 {
60 static public final FacesBean.Type TYPE = new FacesBean.Type(
61 UIXOutput.TYPE);
62 static public final PropertyKey TITLE_CLASS_KEY =
63 TYPE.registerKey("titleClass", String.class);
64 static public final PropertyKey SEPARATOR_CLASS_KEY =
65 TYPE.registerKey("separatorClass", String.class);
66 static public final PropertyKey INLINE_STYLE_KEY =
67 TYPE.registerKey("inlineStyle", String.class);
68 static public final PropertyKey STYLE_CLASS_KEY =
69 TYPE.registerKey("styleClass", String.class);
70 static public final PropertyKey SHORT_DESC_KEY =
71 TYPE.registerKey("shortDesc", String.class);
72 static public final PropertyKey PARTIAL_TRIGGERS_KEY =
73 TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
74 static public final PropertyKey ONCLICK_KEY =
75 TYPE.registerKey("onclick", String.class);
76 static public final PropertyKey ONDBLCLICK_KEY =
77 TYPE.registerKey("ondblclick", String.class);
78 static public final PropertyKey ONMOUSEDOWN_KEY =
79 TYPE.registerKey("onmousedown", String.class);
80 static public final PropertyKey ONMOUSEUP_KEY =
81 TYPE.registerKey("onmouseup", String.class);
82 static public final PropertyKey ONMOUSEOVER_KEY =
83 TYPE.registerKey("onmouseover", String.class);
84 static public final PropertyKey ONMOUSEMOVE_KEY =
85 TYPE.registerKey("onmousemove", String.class);
86 static public final PropertyKey ONMOUSEOUT_KEY =
87 TYPE.registerKey("onmouseout", String.class);
88 static public final PropertyKey ONKEYPRESS_KEY =
89 TYPE.registerKey("onkeypress", String.class);
90 static public final PropertyKey ONKEYDOWN_KEY =
91 TYPE.registerKey("onkeydown", String.class);
92 static public final PropertyKey ONKEYUP_KEY =
93 TYPE.registerKey("onkeyup", String.class);
94 static public final String TITLE_FACET = "title";
95 static public final String SEPARATOR_FACET = "separator";
96
97 static public final String COMPONENT_FAMILY =
98 "org.apache.myfaces.trinidad.Output";
99 static public final String COMPONENT_TYPE =
100 "org.apache.myfaces.trinidad.CoreOutputDocument";
101 // Supported client events for client behaviors:
102 private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
103 Arrays.asList(
104 "click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove",
105 "mouseout", "keypress", "keydown", "keyup"
106 ));
107
108 /**
109 * Construct an instance of the CoreOutputDocument.
110 */
111 public CoreOutputDocument()
112 {
113 super("org.apache.myfaces.trinidad.Document");
114 }
115
116 /**
117 * The title of the document.
118 */
119 final public UIComponent getTitle()
120 {
121 return getFacet(TITLE_FACET);
122 }
123
124 /**
125 * The title of the document.
126 */
127 @SuppressWarnings("unchecked")
128 final public void setTitle(UIComponent titleFacet)
129 {
130 getFacets().put(TITLE_FACET, titleFacet);
131 }
132
133 /**
134 * The object used to separate paragraphs of the document.
135 */
136 final public UIComponent getSeparator()
137 {
138 return getFacet(SEPARATOR_FACET);
139 }
140
141 /**
142 * The object used to separate paragraphs of the document.
143 */
144 @SuppressWarnings("unchecked")
145 final public void setSeparator(UIComponent separatorFacet)
146 {
147 getFacets().put(SEPARATOR_FACET, separatorFacet);
148 }
149
150 /**
151 * Gets the style class of the title. This property will be
152 * considered only if a title facet is used.
153 *
154 * @return the new titleClass value
155 */
156 final public String getTitleClass()
157 {
158 return ComponentUtils.resolveString(getProperty(TITLE_CLASS_KEY));
159 }
160
161 /**
162 * Sets the style class of the title. This property will be
163 * considered only if a title facet is used.
164 *
165 * @param titleClass the new titleClass value
166 */
167 final public void setTitleClass(String titleClass)
168 {
169 setProperty(TITLE_CLASS_KEY, (titleClass));
170 }
171
172 /**
173 * Gets the style class of the separator. This property will be
174 * considered only if a separator facet is used.
175 *
176 * @return the new separatorClass value
177 */
178 final public String getSeparatorClass()
179 {
180 return ComponentUtils.resolveString(getProperty(SEPARATOR_CLASS_KEY));
181 }
182
183 /**
184 * Sets the style class of the separator. This property will be
185 * considered only if a separator facet is used.
186 *
187 * @param separatorClass the new separatorClass value
188 */
189 final public void setSeparatorClass(String separatorClass)
190 {
191 setProperty(SEPARATOR_CLASS_KEY, (separatorClass));
192 }
193
194 /**
195 * Gets the CSS styles to use for this component.
196 *
197 * @return the new inlineStyle value
198 */
199 final public String getInlineStyle()
200 {
201 return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
202 }
203
204 /**
205 * Sets the CSS styles to use for this component.
206 *
207 * @param inlineStyle the new inlineStyle value
208 */
209 final public void setInlineStyle(String inlineStyle)
210 {
211 setProperty(INLINE_STYLE_KEY, (inlineStyle));
212 }
213
214 /**
215 * Gets a CSS style class to use for this component.
216 *
217 * @return the new styleClass value
218 */
219 final public String getStyleClass()
220 {
221 return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
222 }
223
224 /**
225 * Sets a CSS style class to use for this component.
226 *
227 * @param styleClass the new styleClass value
228 */
229 final public void setStyleClass(String styleClass)
230 {
231 setProperty(STYLE_CLASS_KEY, (styleClass));
232 }
233
234 /**
235 * Gets The short description of the component. This text is commonly used by user agents to display tooltip help text.
236 *
237 * @return the new shortDesc value
238 */
239 final public String getShortDesc()
240 {
241 return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
242 }
243
244 /**
245 * Sets The short description of the component. This text is commonly used by user agents to display tooltip help text.
246 *
247 * @param shortDesc the new shortDesc value
248 */
249 final public void setShortDesc(String shortDesc)
250 {
251 setProperty(SHORT_DESC_KEY, (shortDesc));
252 }
253
254 /**
255 * Gets the IDs of the components that should trigger a partial update.
256 * <p>
257 * This component will listen on the trigger components. If one of the
258 * trigger components receives an event that will cause it to update
259 * in some way, this component will request to be updated too.</p>
260 * <p>
261 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
262 * </p>
263 * <p>
264 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
265 * or use multiple colons to move up through the NamingContainer. For example,
266 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
267 * ":::" will pop out of two naming containers, etc. The search for
268 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
269 * component with id = commandButton1 after popping out of two naming containers relative to this component.
270 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
271 *
272 * @return the new partialTriggers value
273 */
274 final public String[] getPartialTriggers()
275 {
276 return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
277 }
278
279 /**
280 * Sets the IDs of the components that should trigger a partial update.
281 * <p>
282 * This component will listen on the trigger components. If one of the
283 * trigger components receives an event that will cause it to update
284 * in some way, this component will request to be updated too.</p>
285 * <p>
286 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
287 * </p>
288 * <p>
289 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
290 * or use multiple colons to move up through the NamingContainer. For example,
291 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
292 * ":::" will pop out of two naming containers, etc. The search for
293 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
294 * component with id = commandButton1 after popping out of two naming containers relative to this component.
295 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
296 *
297 * @param partialTriggers the new partialTriggers value
298 */
299 final public void setPartialTriggers(String[] partialTriggers)
300 {
301 setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
302 }
303
304 /**
305 * Gets an onclick Javascript handler.
306 *
307 * @return the new onclick value
308 */
309 final public String getOnclick()
310 {
311 return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
312 }
313
314 /**
315 * Sets an onclick Javascript handler.
316 *
317 * @param onclick the new onclick value
318 */
319 final public void setOnclick(String onclick)
320 {
321 setProperty(ONCLICK_KEY, (onclick));
322 }
323
324 /**
325 * Gets an ondblclick Javascript handler.
326 *
327 * @return the new ondblclick value
328 */
329 final public String getOndblclick()
330 {
331 return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
332 }
333
334 /**
335 * Sets an ondblclick Javascript handler.
336 *
337 * @param ondblclick the new ondblclick value
338 */
339 final public void setOndblclick(String ondblclick)
340 {
341 setProperty(ONDBLCLICK_KEY, (ondblclick));
342 }
343
344 /**
345 * Gets an onmousedown Javascript handler.
346 *
347 * @return the new onmousedown value
348 */
349 final public String getOnmousedown()
350 {
351 return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
352 }
353
354 /**
355 * Sets an onmousedown Javascript handler.
356 *
357 * @param onmousedown the new onmousedown value
358 */
359 final public void setOnmousedown(String onmousedown)
360 {
361 setProperty(ONMOUSEDOWN_KEY, (onmousedown));
362 }
363
364 /**
365 * Gets an onmouseup Javascript handler.
366 *
367 * @return the new onmouseup value
368 */
369 final public String getOnmouseup()
370 {
371 return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
372 }
373
374 /**
375 * Sets an onmouseup Javascript handler.
376 *
377 * @param onmouseup the new onmouseup value
378 */
379 final public void setOnmouseup(String onmouseup)
380 {
381 setProperty(ONMOUSEUP_KEY, (onmouseup));
382 }
383
384 /**
385 * Gets an onmouseover Javascript handler.
386 *
387 * @return the new onmouseover value
388 */
389 final public String getOnmouseover()
390 {
391 return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
392 }
393
394 /**
395 * Sets an onmouseover Javascript handler.
396 *
397 * @param onmouseover the new onmouseover value
398 */
399 final public void setOnmouseover(String onmouseover)
400 {
401 setProperty(ONMOUSEOVER_KEY, (onmouseover));
402 }
403
404 /**
405 * Gets an onmousemove Javascript handler.
406 *
407 * @return the new onmousemove value
408 */
409 final public String getOnmousemove()
410 {
411 return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
412 }
413
414 /**
415 * Sets an onmousemove Javascript handler.
416 *
417 * @param onmousemove the new onmousemove value
418 */
419 final public void setOnmousemove(String onmousemove)
420 {
421 setProperty(ONMOUSEMOVE_KEY, (onmousemove));
422 }
423
424 /**
425 * Gets an onmouseout Javascript handler.
426 *
427 * @return the new onmouseout value
428 */
429 final public String getOnmouseout()
430 {
431 return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
432 }
433
434 /**
435 * Sets an onmouseout Javascript handler.
436 *
437 * @param onmouseout the new onmouseout value
438 */
439 final public void setOnmouseout(String onmouseout)
440 {
441 setProperty(ONMOUSEOUT_KEY, (onmouseout));
442 }
443
444 /**
445 * Gets an onkeypress Javascript handler.
446 *
447 * @return the new onkeypress value
448 */
449 final public String getOnkeypress()
450 {
451 return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
452 }
453
454 /**
455 * Sets an onkeypress Javascript handler.
456 *
457 * @param onkeypress the new onkeypress value
458 */
459 final public void setOnkeypress(String onkeypress)
460 {
461 setProperty(ONKEYPRESS_KEY, (onkeypress));
462 }
463
464 /**
465 * Gets an onkeydown Javascript handler.
466 *
467 * @return the new onkeydown value
468 */
469 final public String getOnkeydown()
470 {
471 return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
472 }
473
474 /**
475 * Sets an onkeydown Javascript handler.
476 *
477 * @param onkeydown the new onkeydown value
478 */
479 final public void setOnkeydown(String onkeydown)
480 {
481 setProperty(ONKEYDOWN_KEY, (onkeydown));
482 }
483
484 /**
485 * Gets an onkeyup Javascript handler.
486 *
487 * @return the new onkeyup value
488 */
489 final public String getOnkeyup()
490 {
491 return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
492 }
493
494 /**
495 * Sets an onkeyup Javascript handler.
496 *
497 * @param onkeyup the new onkeyup value
498 */
499 final public void setOnkeyup(String onkeyup)
500 {
501 setProperty(ONKEYUP_KEY, (onkeyup));
502 }
503
504 @Override
505 public String getDefaultEventName()
506 {
507 return "click";
508 }
509
510 @Override
511 public Collection<String> getEventNames()
512 {
513 return _EVENT_NAMES;
514 }
515
516 @Override
517 public Map<String, List<ClientBehavior>> getClientBehaviors()
518 {
519 return super.getClientBehaviors();
520 }
521
522 @Override
523 public void addClientBehavior(
524 String eventName,
525 ClientBehavior behavior)
526 {
527 super.addClientBehavior(eventName, behavior);
528 }
529
530 @Override
531 public String getFamily()
532 {
533 return COMPONENT_FAMILY;
534 }
535
536 @Override
537 protected FacesBean.Type getBeanType()
538 {
539 return TYPE;
540 }
541
542 /**
543 * Construct an instance of the CoreOutputDocument.
544 */
545 protected CoreOutputDocument(
546 String rendererType
547 )
548 {
549 super(rendererType);
550 }
551
552 static
553 {
554 TYPE.lockAndRegister("org.apache.myfaces.trinidad.Output","org.apache.myfaces.trinidad.Document");
555 }
556 }