Coverage Report - org.kuali.student.common.ui.client.widgets.KSButtonAbstract
 
Classes in this File Line Coverage Branch Coverage Complexity
KSButtonAbstract
0%
0/1
N/A
1
KSButtonAbstract$ButtonStyle
0%
0/17
N/A
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.common.ui.client.widgets;
 17  
 
 18  
 import com.google.gwt.event.dom.client.ClickHandler;
 19  
 import com.google.gwt.event.dom.client.HasClickHandlers;
 20  
 import com.google.gwt.event.dom.client.HasMouseOutHandlers;
 21  
 import com.google.gwt.event.dom.client.HasMouseOverHandlers;
 22  
 import com.google.gwt.user.client.ui.Composite;
 23  
 
 24  0
 public abstract class KSButtonAbstract extends Composite implements HasClickHandlers, HasMouseOverHandlers, HasMouseOutHandlers{
 25  
 
 26  0
         public static enum ButtonStyle{
 27  0
                 PRIMARY("ks-button-primary", "ks-button-primary-disabled"),
 28  0
                 SECONDARY("ks-button-secondary", "ks-button-secondary-disabled"),
 29  0
                 PRIMARY_SMALL("ks-button-primary-small", "ks-button-primary-small-disabled"),
 30  0
                 SECONDARY_SMALL("ks-button-secondary-small", "ks-button-secondary-small-disabled"),
 31  0
                 FORM_SMALL("ks-form-button-small", null),
 32  0
                 FORM_LARGE("ks-form-button-large", null),
 33  0
                 HELP("ks-form-module-elements-help", null),
 34  0
                 DELETE("ks-form-module-elements-delete", null),
 35  0
                 ANCHOR_LARGE_CENTERED("ks-link-large", "ks-link-large-disabled"),
 36  0
                 DEFAULT_ANCHOR("ks-link", "ks-link-disabled");
 37  
                 
 38  
                 private String style;
 39  
                 private String disabledStyle;
 40  
 
 41  0
                 private ButtonStyle(String style, String disabledStyle){
 42  0
                         this.style = style;
 43  0
                         this.disabledStyle = disabledStyle;
 44  0
                 }
 45  
                 
 46  
                 public String getStyle(){
 47  0
                         return style;
 48  
                 }
 49  
                 
 50  
                 public String getDisabledStyle() {
 51  0
                         return disabledStyle;
 52  
                 }
 53  
         };
 54  
         
 55  
         public abstract boolean isEnabled();
 56  
 
 57  
         public abstract void setEnabled(boolean enabled);
 58  
         
 59  
         public abstract void setText(String text);
 60  
         
 61  
     public abstract void init();
 62  
     
 63  
         public abstract void init(String text);
 64  
         
 65  
         public abstract void init(String text, ButtonStyle style);                
 66  
 
 67  
         public abstract void init(String text, ClickHandler handler);
 68  
 
 69  
     public abstract void init(String text, ButtonStyle style, ClickHandler handler);
 70  
 }