Author: [EMAIL PROTECTED]
Date: Thu Nov 20 14:04:16 2008
New Revision: 4140

Modified:
     
branches/1_6_datepicker/user/src/com/google/gwt/user/datepicker/client/DatePicker.java

Log:
Constantly use getView and getMonthSelector rather then the private fields.

Modified:  
branches/1_6_datepicker/user/src/com/google/gwt/user/datepicker/client/DatePicker.java
==============================================================================
---  
branches/1_6_datepicker/user/src/com/google/gwt/user/datepicker/client/DatePicker.java
   
(original)
+++  
branches/1_6_datepicker/user/src/com/google/gwt/user/datepicker/client/DatePicker.java
   
Thu Nov 20 14:04:16 2008
@@ -28,7 +28,6 @@
  import com.google.gwt.user.client.ui.Composite;
  import com.google.gwt.user.client.ui.FlowPanel;
  import com.google.gwt.user.client.ui.HasValue;
-import com.google.gwt.user.client.ui.Widget;

  import java.util.Date;
  import java.util.HashMap;
@@ -236,7 +235,7 @@
    public void addGlobalStyleToDate(Date date, String styleName) {
      styler.setStyleName(date, styleName, true);
      if (isDateVisible(date)) {
-      view.addStyleToDate(date, styleName);
+      getView().addStyleToDate(date, styleName);
      }
    }

@@ -257,8 +256,8 @@
     */
    public HandlerRegistration addShowRangeHandlerAndFire(
        ShowRangeHandler<Date> handler) {
-    ShowRangeEvent event = new ShowRangeEvent(view.getFirstDate(),
-        view.getLastDate()) {
+    ShowRangeEvent event = new ShowRangeEvent(getView().getFirstDate(),
+        getView().getLastDate()) {
      };
      handler.onShowRange(event);
      return addShowRangeHandler(handler);
@@ -272,7 +271,7 @@
     * @param styleName style name
     */
    public final void addStyleToVisibleDate(Date visibleDate, String  
styleName) {
-    view.addStyleToDate(visibleDate, styleName);
+    getView().addStyleToDate(visibleDate, styleName);
    }

    /**
@@ -336,7 +335,7 @@
     * @return is the date currently shown
     */
    public boolean isDateVisible(Date date) {
-    return view.isDateVisible(date);
+    return getView().isDateVisible(date);
    }

    /**
@@ -347,7 +346,7 @@
     */
    public boolean isVisibleDateEnabled(Date date) {
      assert isDateVisible(date) : date + " is not visible";
-    return view.isDateEnabled(date);
+    return getView().isDateEnabled(date);
    }

    /**
@@ -359,7 +358,7 @@
    public void removeGlobalStyleFromDate(Date date, String styleName) {
      styler.setStyleName(date, styleName, false);
      if (isDateVisible(date)) {
-      view.removeStyleFromDate(date, styleName);
+      getView().removeStyleFromDate(date, styleName);
      }
    }

@@ -374,7 +373,7 @@
      while (dates.hasNext()) {
        Date date = dates.next();
        assert (isDateVisible(date)) : date + " should be visible";
-      view.removeStyleFromDate(date, styleName);
+      getView().removeStyleFromDate(date, styleName);
      }
    }

@@ -465,7 +464,7 @@
     *
     * @return the month selector
     */
-  protected final Widget getMonthSelector() {
+  protected final MonthSelector getMonthSelector() {
      return monthSelector;
    }

@@ -505,8 +504,8 @@
     */
    final void refreshAll() {
      highlighted = null;
-    view.refresh();
-    monthSelector.refresh();
+    getView().refresh();
+    getMonthSelector().refresh();
      ShowRangeEvent.fire(this, getView().getFirstDate(),
          getView().getLastDate());
    }

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to