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.layout;
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.behavior.ClientBehavior;
30 import javax.faces.component.behavior.ClientBehaviorHolder;
31 import org.apache.myfaces.trinidad.bean.FacesBean;
32 import org.apache.myfaces.trinidad.bean.PropertyKey;
33 import org.apache.myfaces.trinidad.component.UIXPanel;
34 import org.apache.myfaces.trinidad.util.ComponentUtils;
35
36 /**
37 *
38 * <html:p>
39 * The panelTip Component provides a container for page or
40 * section level hints to the user.
41 * </html:p>
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 CorePanelTip extends UIXPanel
58 implements ClientBehaviorHolder
59 {
60 static public final FacesBean.Type TYPE = new FacesBean.Type(
61 UIXPanel.TYPE);
62 static public final PropertyKey INLINE_STYLE_KEY =
63 TYPE.registerKey("inlineStyle", String.class);
64 static public final PropertyKey STYLE_CLASS_KEY =
65 TYPE.registerKey("styleClass", String.class);
66 static public final PropertyKey SHORT_DESC_KEY =
67 TYPE.registerKey("shortDesc", String.class);
68 static public final PropertyKey PARTIAL_TRIGGERS_KEY =
69 TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
70 static public final PropertyKey ONCLICK_KEY =
71 TYPE.registerKey("onclick", String.class);
72 static public final PropertyKey ONDBLCLICK_KEY =
73 TYPE.registerKey("ondblclick", String.class);
74 static public final PropertyKey ONMOUSEDOWN_KEY =
75 TYPE.registerKey("onmousedown", String.class);
76 static public final PropertyKey ONMOUSEUP_KEY =
77 TYPE.registerKey("onmouseup", String.class);
78 static public final PropertyKey ONMOUSEOVER_KEY =
79 TYPE.registerKey("onmouseover", String.class);
80 static public final PropertyKey ONMOUSEMOVE_KEY =
81 TYPE.registerKey("onmousemove", String.class);
82 static public final PropertyKey ONMOUSEOUT_KEY =
83 TYPE.registerKey("onmouseout", String.class);
84 static public final PropertyKey ONKEYPRESS_KEY =
85 TYPE.registerKey("onkeypress", String.class);
86 static public final PropertyKey ONKEYDOWN_KEY =
87 TYPE.registerKey("onkeydown", String.class);
88 static public final PropertyKey ONKEYUP_KEY =
89 TYPE.registerKey("onkeyup", String.class);
90
91 static public final String COMPONENT_FAMILY =
92 "org.apache.myfaces.trinidad.Panel";
93 static public final String COMPONENT_TYPE =
94 "org.apache.myfaces.trinidad.CorePanelTip";
95 // Supported client events for client behaviors:
96 private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(
97 Arrays.asList(
98 "click", "dblclick", "mousedown", "mouseup", "mouseover", "mousemove",
99 "mouseout", "keypress", "keydown", "keyup"
100 ));
101
102 /**
103 * Construct an instance of the CorePanelTip.
104 */
105 public CorePanelTip()
106 {
107 super("org.apache.myfaces.trinidad.Tip");
108 }
109
110 /**
111 * Gets the CSS styles to use for this component.
112 *
113 * @return the new inlineStyle value
114 */
115 final public String getInlineStyle()
116 {
117 return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));
118 }
119
120 /**
121 * Sets the CSS styles to use for this component.
122 *
123 * @param inlineStyle the new inlineStyle value
124 */
125 final public void setInlineStyle(String inlineStyle)
126 {
127 setProperty(INLINE_STYLE_KEY, (inlineStyle));
128 }
129
130 /**
131 * Gets a CSS style class to use for this component.
132 *
133 * @return the new styleClass value
134 */
135 final public String getStyleClass()
136 {
137 return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));
138 }
139
140 /**
141 * Sets a CSS style class to use for this component.
142 *
143 * @param styleClass the new styleClass value
144 */
145 final public void setStyleClass(String styleClass)
146 {
147 setProperty(STYLE_CLASS_KEY, (styleClass));
148 }
149
150 /**
151 * Gets The short description of the component. This text is commonly used by user agents to display tooltip help text.
152 *
153 * @return the new shortDesc value
154 */
155 final public String getShortDesc()
156 {
157 return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
158 }
159
160 /**
161 * Sets The short description of the component. This text is commonly used by user agents to display tooltip help text.
162 *
163 * @param shortDesc the new shortDesc value
164 */
165 final public void setShortDesc(String shortDesc)
166 {
167 setProperty(SHORT_DESC_KEY, (shortDesc));
168 }
169
170 /**
171 * Gets the IDs of the components that should trigger a partial update.
172 * <p>
173 * This component will listen on the trigger components. If one of the
174 * trigger components receives an event that will cause it to update
175 * in some way, this component will request to be updated too.</p>
176 * <p>
177 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
178 * </p>
179 * <p>
180 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
181 * or use multiple colons to move up through the NamingContainer. For example,
182 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
183 * ":::" will pop out of two naming containers, etc. The search for
184 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
185 * component with id = commandButton1 after popping out of two naming containers relative to this component.
186 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
187 *
188 * @return the new partialTriggers value
189 */
190 final public String[] getPartialTriggers()
191 {
192 return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
193 }
194
195 /**
196 * Sets the IDs of the components that should trigger a partial update.
197 * <p>
198 * This component will listen on the trigger components. If one of the
199 * trigger components receives an event that will cause it to update
200 * in some way, this component will request to be updated too.</p>
201 * <p>
202 * Separate multiple triggers with a space. e.g., partialTriggers="cmp1 cmp2"
203 * </p>
204 * <p>
205 * Identifiers must account for NamingContainers. You can use a single colon to start the search from the root,
206 * or use multiple colons to move up through the NamingContainer. For example,
207 * "::" will pop out of this component's naming container (it pops out of itself if it is a naming container),
208 * ":::" will pop out of two naming containers, etc. The search for
209 * the partialTrigger begins from there. e.g., partialTriggers=":::commandButton1" the search begins for the
210 * component with id = commandButton1 after popping out of two naming containers relative to this component.
211 * To go into naming containers, you separate the naming containers with ':', e.g.,partialTriggers= "nc1:nc2:nc3:componentId".</p>
212 *
213 * @param partialTriggers the new partialTriggers value
214 */
215 final public void setPartialTriggers(String[] partialTriggers)
216 {
217 setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
218 }
219
220 /**
221 * Gets an onclick Javascript handler.
222 *
223 * @return the new onclick value
224 */
225 final public String getOnclick()
226 {
227 return ComponentUtils.resolveString(getProperty(ONCLICK_KEY));
228 }
229
230 /**
231 * Sets an onclick Javascript handler.
232 *
233 * @param onclick the new onclick value
234 */
235 final public void setOnclick(String onclick)
236 {
237 setProperty(ONCLICK_KEY, (onclick));
238 }
239
240 /**
241 * Gets an ondblclick Javascript handler.
242 *
243 * @return the new ondblclick value
244 */
245 final public String getOndblclick()
246 {
247 return ComponentUtils.resolveString(getProperty(ONDBLCLICK_KEY));
248 }
249
250 /**
251 * Sets an ondblclick Javascript handler.
252 *
253 * @param ondblclick the new ondblclick value
254 */
255 final public void setOndblclick(String ondblclick)
256 {
257 setProperty(ONDBLCLICK_KEY, (ondblclick));
258 }
259
260 /**
261 * Gets an onmousedown Javascript handler.
262 *
263 * @return the new onmousedown value
264 */
265 final public String getOnmousedown()
266 {
267 return ComponentUtils.resolveString(getProperty(ONMOUSEDOWN_KEY));
268 }
269
270 /**
271 * Sets an onmousedown Javascript handler.
272 *
273 * @param onmousedown the new onmousedown value
274 */
275 final public void setOnmousedown(String onmousedown)
276 {
277 setProperty(ONMOUSEDOWN_KEY, (onmousedown));
278 }
279
280 /**
281 * Gets an onmouseup Javascript handler.
282 *
283 * @return the new onmouseup value
284 */
285 final public String getOnmouseup()
286 {
287 return ComponentUtils.resolveString(getProperty(ONMOUSEUP_KEY));
288 }
289
290 /**
291 * Sets an onmouseup Javascript handler.
292 *
293 * @param onmouseup the new onmouseup value
294 */
295 final public void setOnmouseup(String onmouseup)
296 {
297 setProperty(ONMOUSEUP_KEY, (onmouseup));
298 }
299
300 /**
301 * Gets an onmouseover Javascript handler.
302 *
303 * @return the new onmouseover value
304 */
305 final public String getOnmouseover()
306 {
307 return ComponentUtils.resolveString(getProperty(ONMOUSEOVER_KEY));
308 }
309
310 /**
311 * Sets an onmouseover Javascript handler.
312 *
313 * @param onmouseover the new onmouseover value
314 */
315 final public void setOnmouseover(String onmouseover)
316 {
317 setProperty(ONMOUSEOVER_KEY, (onmouseover));
318 }
319
320 /**
321 * Gets an onmousemove Javascript handler.
322 *
323 * @return the new onmousemove value
324 */
325 final public String getOnmousemove()
326 {
327 return ComponentUtils.resolveString(getProperty(ONMOUSEMOVE_KEY));
328 }
329
330 /**
331 * Sets an onmousemove Javascript handler.
332 *
333 * @param onmousemove the new onmousemove value
334 */
335 final public void setOnmousemove(String onmousemove)
336 {
337 setProperty(ONMOUSEMOVE_KEY, (onmousemove));
338 }
339
340 /**
341 * Gets an onmouseout Javascript handler.
342 *
343 * @return the new onmouseout value
344 */
345 final public String getOnmouseout()
346 {
347 return ComponentUtils.resolveString(getProperty(ONMOUSEOUT_KEY));
348 }
349
350 /**
351 * Sets an onmouseout Javascript handler.
352 *
353 * @param onmouseout the new onmouseout value
354 */
355 final public void setOnmouseout(String onmouseout)
356 {
357 setProperty(ONMOUSEOUT_KEY, (onmouseout));
358 }
359
360 /**
361 * Gets an onkeypress Javascript handler.
362 *
363 * @return the new onkeypress value
364 */
365 final public String getOnkeypress()
366 {
367 return ComponentUtils.resolveString(getProperty(ONKEYPRESS_KEY));
368 }
369
370 /**
371 * Sets an onkeypress Javascript handler.
372 *
373 * @param onkeypress the new onkeypress value
374 */
375 final public void setOnkeypress(String onkeypress)
376 {
377 setProperty(ONKEYPRESS_KEY, (onkeypress));
378 }
379
380 /**
381 * Gets an onkeydown Javascript handler.
382 *
383 * @return the new onkeydown value
384 */
385 final public String getOnkeydown()
386 {
387 return ComponentUtils.resolveString(getProperty(ONKEYDOWN_KEY));
388 }
389
390 /**
391 * Sets an onkeydown Javascript handler.
392 *
393 * @param onkeydown the new onkeydown value
394 */
395 final public void setOnkeydown(String onkeydown)
396 {
397 setProperty(ONKEYDOWN_KEY, (onkeydown));
398 }
399
400 /**
401 * Gets an onkeyup Javascript handler.
402 *
403 * @return the new onkeyup value
404 */
405 final public String getOnkeyup()
406 {
407 return ComponentUtils.resolveString(getProperty(ONKEYUP_KEY));
408 }
409
410 /**
411 * Sets an onkeyup Javascript handler.
412 *
413 * @param onkeyup the new onkeyup value
414 */
415 final public void setOnkeyup(String onkeyup)
416 {
417 setProperty(ONKEYUP_KEY, (onkeyup));
418 }
419
420 @Override
421 public String getDefaultEventName()
422 {
423 return "click";
424 }
425
426 @Override
427 public Collection<String> getEventNames()
428 {
429 return _EVENT_NAMES;
430 }
431
432 @Override
433 public Map<String, List<ClientBehavior>> getClientBehaviors()
434 {
435 return super.getClientBehaviors();
436 }
437
438 @Override
439 public void addClientBehavior(
440 String eventName,
441 ClientBehavior behavior)
442 {
443 super.addClientBehavior(eventName, behavior);
444 }
445
446 @Override
447 public String getFamily()
448 {
449 return COMPONENT_FAMILY;
450 }
451
452 @Override
453 protected FacesBean.Type getBeanType()
454 {
455 return TYPE;
456 }
457
458 /**
459 * Construct an instance of the CorePanelTip.
460 */
461 protected CorePanelTip(
462 String rendererType
463 )
464 {
465 super(rendererType);
466 }
467
468 static
469 {
470 TYPE.lockAndRegister("org.apache.myfaces.trinidad.Panel","org.apache.myfaces.trinidad.Tip");
471 }
472 }