01: package org.ztemplates.yui.tooltip;
02:
03: import org.ztemplates.render.ZCss;
04: import org.ztemplates.render.ZExpose;
05: import org.ztemplates.render.ZJavaScript;
06: import org.ztemplates.render.ZRenderer;
07: import org.ztemplates.render.ZScript;
08: import org.ztemplates.render.velocity.ZVelocityRenderer;
09: import org.ztemplates.web.ZTemplates;
10: import org.ztemplates.yui.YWidget;
11:
12: @ZRenderer(ZVelocityRenderer.class)
13: @ZScript(javaScript={@ZJavaScript("/yuiloader/yahoo-dom-event/yahoo-dom-event.js"),@ZJavaScript("/yuiloader/container/container.js")},css={@ZCss("/yuiloader/fonts/fonts-min.css"),@ZCss("/yuiloader/container/assets/skins/sam/container.css")})
14: public class YTooltip extends YWidget {
15: private final String id;
16:
17: private final String contextId;
18:
19: private final String text;
20:
21: public YTooltip(String contextId, String text) {
22: this (ZTemplates.getRenderService().createJavaScriptId(),
23: contextId, text);
24: }
25:
26: public YTooltip(String id, String contextId, String text) {
27: super ();
28: this .id = id;
29: this .contextId = contextId;
30: this .text = text;
31: setProperty("context", contextId);
32: setProperty("text", text);
33: }
34:
35: @ZExpose
36: public String getId() {
37: return id;
38: }
39:
40: @ZExpose
41: public String getContextId() {
42: return contextId;
43: }
44:
45: @ZExpose
46: public String getText() {
47: return text;
48: }
49: }
|