01: package org.ztemplates.yui.slider;
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: import org.ztemplates.yui.impl.ZYUIAssetsAction;
12:
13: @ZRenderer(ZVelocityRenderer.class)
14: @ZScript(css={@ZCss("/yuiloader/fonts/fonts-min.css")},javaScript={@ZJavaScript("/yuiloader/yahoo-dom-event/yahoo-dom-event.js"),@ZJavaScript("/yuiloader/dragdrop/dragdrop.js"),@ZJavaScript("/yuiloader/slider/slider.js")})
15: public class YSlider extends YWidget {
16: private final String id;
17:
18: private String namespace = "org.ztemplates.yui.slider";
19:
20: public YSlider() {
21: this (ZTemplates.getRenderService().createJavaScriptId());
22: }
23:
24: public YSlider(String id) {
25: super ();
26: this .id = id;
27: }
28:
29: @ZExpose
30: public String getId() {
31: return id;
32: }
33:
34: @ZExpose
35: public String getNamespace() {
36: return namespace;
37: }
38:
39: public void setNamespace(String namespace) {
40: this .namespace = namespace;
41: }
42:
43: @ZExpose
44: public String getMinThumbUrl() throws Exception {
45: ZYUIAssetsAction assetsAction = new ZYUIAssetsAction();
46: assetsAction
47: .setResourcePath("/slider/assets/l-thumb-round.gif");
48: return ZTemplates.getServletService().createUrl(assetsAction);
49: }
50:
51: @ZExpose
52: public String getMaxThumbUrl() throws Exception {
53: ZYUIAssetsAction assetsAction = new ZYUIAssetsAction();
54: assetsAction
55: .setResourcePath("/slider/assets/r-thumb-round.gif");
56: return ZTemplates.getServletService().createUrl(assetsAction);
57: }
58: }
|