4343@ JsModule ("@xpertsea/paper-slider/l2t-paper-slider.js" )
4444public class Carousel extends Component implements HasSize {
4545
46- private static final String HIDE_NAV = "hide-nav " ;
47- private static final String DISABLE_SWIPE = "disable-swipe " ;
46+ private static final String HIDE_NAV = "hideNav " ;
47+ private static final String DISABLE_SWIPE = "disableSwipe " ;
4848 private static final String POSITION = "position" ;
49- private static final String SLIDE_DURATION = "slide-duration " ;
50- private static final String AUTO_PROGRESS = "auto-progress " ;
49+ private static final String SLIDE_DURATION = "slideDuration " ;
50+ private static final String AUTO_PROGRESS = "autoProgress " ;
5151 private static final int DEFAULT_SLIDE_DURATION = 2 ;
5252
5353 private Slide [] slides ;
@@ -87,7 +87,7 @@ public boolean isAutoProgress() {
8787 }
8888
8989 public void setAutoProgress (boolean autoProgress ) {
90- getElement ().setAttribute (AUTO_PROGRESS , autoProgress );
90+ getElement ().setProperty (AUTO_PROGRESS , autoProgress );
9191 }
9292
9393 public int getSlideDuration () {
@@ -103,23 +103,23 @@ public int getStartPosition() {
103103 }
104104
105105 public void setStartPosition (int startPosition ) {
106- getElement ().setAttribute (POSITION , "" + startPosition );
106+ getElement ().setProperty (POSITION , startPosition );
107107 }
108108
109109 public boolean isDisableSwipe () {
110110 return getElement ().getProperty (DISABLE_SWIPE , false );
111111 }
112112
113113 public void setDisableSwipe (boolean disableSwipe ) {
114- getElement ().setAttribute (DISABLE_SWIPE , disableSwipe );
114+ getElement ().setProperty (DISABLE_SWIPE , disableSwipe );
115115 }
116116
117117 public boolean isHideNavigation () {
118118 return getElement ().getProperty (HIDE_NAV , false );
119119 }
120120
121121 public void setHideNavigation (boolean hideNavigation ) {
122- getElement ().setAttribute (HIDE_NAV , hideNavigation );
122+ getElement ().setProperty (HIDE_NAV , hideNavigation );
123123 }
124124
125125 // FLUENT API
0 commit comments