View Javadoc
1   package org.kuali.student.common.uif.element;
2   
3   import org.kuali.rice.krad.uif.element.Action;
4   
5   /**
6    * Created with IntelliJ IDEA.
7    * User: aliabad4
8    * Date: 7/10/13
9    * Time: 2:02 PM
10   * To change this template use File | Settings | File Templates.
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  }