1 package org.kuali.student.common.ui.client.demo;
2
3 import org.kuali.student.common.ui.client.widgets.KSButton;
4 import org.kuali.student.common.ui.client.widgets.KSButtonAbstract.ButtonStyle;
5 import org.kuali.student.common.ui.client.widgets.progress.BlockingTask;
6 import org.kuali.student.common.ui.client.widgets.progress.KSBlockingProgressIndicator;
7
8 import com.google.gwt.event.dom.client.ClickEvent;
9 import com.google.gwt.event.dom.client.ClickHandler;
10 import com.google.gwt.user.client.ui.Composite;
11 import com.google.gwt.user.client.ui.VerticalPanel;
12 import com.google.gwt.user.client.ui.Widget;
13
14
15 public class KSLightBoxDemo extends Composite{
16 public KSLightBoxDemo(){
17 super.initWidget(createDemoPage());
18 }
19 private Widget createDemoPage(){
20 VerticalPanel p = new VerticalPanel();
21
22
23 KSButton button = new KSButton("Lightbox", new ClickHandler() {
24 @Override
25 public void onClick(ClickEvent event) {
26
27
28
29
30
31
32 }
33 });
34 p.add(button);
35
36 button = new KSButton("KSBlockingProgressIndicator", new ClickHandler() {
37 @Override
38 public void onClick(ClickEvent event) {
39 KSBlockingProgressIndicator.addTask(new BlockingTask("this is a test."));
40 }
41 });
42 p.add(button);
43
44 p.add(new KSButton("Lightbox", ButtonStyle.SECONDARY));
45
46 return p;
47 }
48 }