1 package org.kuali.student.common.uif.element;
2
3 import org.kuali.rice.krad.uif.element.Action;
4
5
6
7
8
9
10
11
12 public class KSUifActionButton extends Action {
13
14 public static final String BUTTON_SIZE_DEFAULT = "default";
15 public static final String BUTTON_SIZE_MINI = "mini";
16 public static final String BUTTON_SIZE_SMALL = "small";
17 public static final String BUTTON_SIZE_LARGE = "large";
18
19 public static final String BUTTON_SIZE_MINI_CSS_CLASS = "btn-mini";
20 public static final String BUTTON_SIZE_SMALL_CSS_CLASS = "btn-small";
21 public static final String BUTTON_SIZE_LARGE_CSS_CLASS = "btn-large";
22
23 protected String buttonSize = BUTTON_SIZE_DEFAULT;
24
25 public String getButtonSize() {
26 return buttonSize;
27 }
28
29 public void setButtonSize(String buttonSize) {
30 this.buttonSize = buttonSize;
31 if (BUTTON_SIZE_MINI.equals(buttonSize)) {
32 super.addStyleClass(BUTTON_SIZE_MINI_CSS_CLASS);
33 } else if (BUTTON_SIZE_SMALL.equals(buttonSize)) {
34 super.addStyleClass(BUTTON_SIZE_SMALL_CSS_CLASS);
35 } else if (BUTTON_SIZE_LARGE.equals(buttonSize)) {
36 super.addStyleClass(BUTTON_SIZE_LARGE_CSS_CLASS);
37 }
38 }
39
40
41 }