On 5/7/07, kredding.geo <[EMAIL PROTECTED]> wrote:

> I read the source code and am trying to understand it.
.
I'm sorry.

Here's how I would extend the DateChooser component to add support for
a "selectedDayStyleName" style.

 public class MyDateChooser extends DateChooser {
    override creationChildren() {
      // instantiate MyCalendarLayout

     dateGrid = new MyCalendarLayout();
     dateGrid.property1 = "foo";
     dateGrid.property2 = "bar";

     super.createChildren();
    }
 }

Now your custom DateChooser has a custom CalendarLayout called MyCalendarLayout.

  public class MyCalendarLayout extends CalendarLayout {
    override function set selectedDate(value) {
      // get column index and row index
      // getStyle("selectedDayStyleName");
      // update dayBlocksArray[columnIndex][rowIndex] with new styleName
      // etc.
    }

    // override other methods like styleChanged() etc.
  }

Hope this gives you a general idea. See how weekDayStyleName works in
CalendarLayout.as. You'd have to do something similar for
selectedDayStyleName.

Reply via email to