1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.common.ui.client.configurable.mvc.sections;
17
18 import org.kuali.student.common.ui.client.configurable.mvc.SectionTitle;
19 import org.kuali.student.common.ui.client.widgets.KSButton;
20 import org.kuali.student.common.ui.client.widgets.KSButtonAbstract.ButtonStyle;
21
22 import com.google.gwt.event.dom.client.ClickHandler;
23 import com.google.gwt.user.client.ui.Composite;
24 import com.google.gwt.user.client.ui.FlowPanel;
25
26 @Deprecated
27 public class MultiplicityHeader extends Composite{
28
29 private FlowPanel header = new FlowPanel();
30 private FlowPanel actions = new FlowPanel();
31 private FlowPanel clearDiv = new FlowPanel();
32 private SectionTitle title;
33 private KSButton help;
34 private KSButton delete = null;
35
36 public MultiplicityHeader(SectionTitle title, boolean readOnly){
37 this.title = title;
38 header.add(title);
39
40 help = new KSButton("?", ButtonStyle.HELP);
41 actions.add(help);
42
43 if(!readOnly){
44 delete = new KSButton("X", ButtonStyle.DELETE);
45 actions.add(delete);
46 }
47
48 actions.setStyleName("ks-form-header-title-actions");
49
50 header.add(actions);
51
52 clearDiv.setStyleName("clear");
53 header.add(clearDiv);
54 this.initWidget(header);
55 }
56
57 public void addDeleteHandler(ClickHandler handler){
58 if(delete!=null){
59 delete.addClickHandler(handler);
60 }
61 }
62
63 public void addHelpHandler(ClickHandler handler){
64 help.addClickHandler(handler);
65 }
66
67 }