Package org.sgx.yuigwt.yuitest1.gallery.test

Source Code of org.sgx.yuigwt.yuitest1.gallery.test.CalendarTest1

package org.sgx.yuigwt.yuitest1.gallery.test;

import static org.sgx.yuigwt.yuitest1.gallery.GalleryConstants.*;

import org.sgx.yuigwt.yui.YUI;
import org.sgx.yuigwt.yui.YUICallback;
import org.sgx.yuigwt.yui.YuiContext;
import org.sgx.yuigwt.yui.node.Node;
import org.sgx.yuigwt.yui.widget.Widget;
import org.sgx.yuigwt.yui.widget.calendar.CalendarConfig;

import com.google.gwt.core.client.JsDate;
/**
* show a small example of calendar usage's
* @author sg
*
*/
public class CalendarTest1 extends AbstractTest {

public CalendarTest1() {
  super("calendar1", "show a small example of calendar usage's",
    new String[]{TAG_CALENDAR, TAG_WIDGET},
    TestResources.instance.CalendarTest1());
}

@Override
public void test(final Node parent) {
YUI.Use(new String[]{"calendar"}, new YUICallback() { 
   
  @Override
  public void ready(final YuiContext Y) {
    Widget calendar = Y.newCalendar(CalendarConfig.create().
      showNextMonth(true).
      showPrevMonth(true).
      date(JsDate.create()).
      width("500px").
      height("300px")).render(parent);
  }
});
}

}
TOP

Related Classes of org.sgx.yuigwt.yuitest1.gallery.test.CalendarTest1

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.