From: Julien Dramaix Date: Sat, 5 Mar 2011 19:50:39 +0000 (+0000) Subject: add enable animation options X-Git-Tag: release-1.3.2~478 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e285c04550dcfd489d046298c6504233c13b3d4f;p=gwtquery.git add enable animation options --- diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/DisclosurePanelWidgetFactory.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/DisclosurePanelWidgetFactory.java index 6571bcdc..f66b6c42 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/DisclosurePanelWidgetFactory.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/DisclosurePanelWidgetFactory.java @@ -19,6 +19,7 @@ public class DisclosurePanelWidgetFactory implements private String headerSelector; private String headerTitle; + boolean enableAnimation; public DisclosurePanelOptions() { initDefault(); @@ -31,7 +32,15 @@ public class DisclosurePanelWidgetFactory implements public String getHeaderTitle() { return headerTitle; } + + public boolean isEnableAnimation() { + return enableAnimation; + } + public void setEnableAnimation(boolean enableAnimation) { + this.enableAnimation = enableAnimation; + } + public void setHeaderSelector(String headerSelector) { this.headerSelector = headerSelector; } @@ -43,6 +52,7 @@ public class DisclosurePanelWidgetFactory implements private void initDefault() { headerTitle = null; headerSelector = "h3"; + enableAnimation = true; } } @@ -63,8 +73,8 @@ public class DisclosurePanelWidgetFactory implements protected void initialize(AttachableComposite widget, Element e) { - String headerValue = ""; + String headerValue = ""; if (options.getHeaderTitle() != null){ headerValue = options.getHeaderTitle(); }else{ @@ -75,6 +85,7 @@ public class DisclosurePanelWidgetFactory implements disclosurePanel.setHeader(new Label(headerValue)); disclosurePanel.add(new HTMLPanel(e.getString())); + disclosurePanel.setAnimationEnabled(options.isEnableAnimation()); WidgetsUtils.replace(e, widget); }