Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.cdlflex.ui.markup.html.link;
 
A JsLink that provides accessors to Bootstrap's Buttons API and contains a ButtonBehavior.
 
 public abstract class JsButton extends JsLink {
 
     private static final long serialVersionUID = 1L;
 
     private static final Size DEFAULT_SIZE = .;
     private static final Type DEFAULT_TYPE = .;
 
     private IModel<Sizesize;
     private IModel<Typetype;
 
     public JsButton(String id) {
         this(id);
     }
 
     public JsButton(String idIModel<?> model) {
         this(idmodel);
     }
 
     public JsButton(String idType type) {
         this(idtypenull);
     }
 
     public JsButton(String idSize size) {
         this(idsizenull);
     }
 
     public JsButton(String idType typeSize size) {
         this(idtypesizenull);
     }
 
     public JsButton(String idType typeSize sizeIModel<?> model) {
         this(id, Model.of(type), Model.of(size), model);
     }
 
     public JsButton(String idIModel<TypetypeIModel<SizesizeIModel<?> model) {
         super(idmodel);
         this. = type;
         this. = size;
 
         add(new ButtonBehavior(typesize));
     }
 
     @Override
     public JsButton setBody(IModel<?> bodyModel) {
         return (JsButtonsuper.setBody(bodyModel);
     }

    
Sets the size of this button.

Parameters:
option the button size
Returns:
this for chaining
 
     public JsButton size(Size option) {
         getSize().setObject(option);
         return this;
     }

    
Sets the type of this button.

Parameters:
option the button type
Returns:
this for chaining
 
     public JsButton type(Type option) {
         getType().setObject(option);
         return this;
     }
 
     public IModel<SizegetSize() {
         return ;
     }
 
     public void setSize(IModel<Sizesize) {
        this. = size;
    }
    public IModel<TypegetType() {
        return ;
    }
    public void setType(IModel<Typetype) {
        this. = type;
    }
New to GrepCode? Check out our FAQ X