Package org.xulfaces.tag.input

Source Code of org.xulfaces.tag.input.CheckboxTag

/*
*   xulfaces : bring XUL power to Java
*  
*  Copyright (C) 2005  Olivier SCHMITT
*  This library is free software; you can redistribute it and/or
*  modify it under the terms of the GNU Lesser General Public
*  License as published by the Free Software Foundation; either
*  version 2.1 of the License, or (at your option) any later version.
*
*  This library is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*  Lesser General Public License for more details.
*
*  You should have received a copy of the GNU Lesser General Public
*  License along with this library; if not, write to the Free Software
*  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/


package org.xulfaces.tag.input;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;

import org.xulfaces.annotation.taglib.ATTRIBUTE;
import org.xulfaces.annotation.taglib.TAG;
import org.xulfaces.tag.ModelTag;

/**
*
* @author kito31
* @version $Id: CheckboxTag.java,v 1.5 2007/05/08 14:17:56 kito31 Exp $
*/
@TAG(name="checkbox",description="Defines a checkbox (see XUL checkbox element).")
public class CheckboxTag extends ModelTag {

  @ATTRIBUTE(description = "This should be set to a letter that is used as a shortcut key.")
  private String accesskey;
 
  @ATTRIBUTE(description = "Gets and sets the value of the command attribute.")
  private String command;
 
  @ATTRIBUTE(description = "If the label of the description is too small to fit in its given space, the text will be cropped on the side specified by the crop attribute.")
  private String crop;
 
  @ATTRIBUTE(mappedType="java.lang.Boolean",description = "Indicates whether the description is disabled or not.")
  private String disabled; 
 
  @ATTRIBUTE(description = " The URL of the image to appear on the checkbox.")
  private String image;
 
  @ATTRIBUTE(description = "The label that will appear beside the checkbox. ")
  private String label; 
 
  @ATTRIBUTE(description = "Connects the checkbox to a corresponding preference. ")    
  private String preference;
 
  @ATTRIBUTE(mappedType="java.lang.Integer",description = "The tab order of the element. ")
  private String tabindex;
     
 
    public String getComponentType() {
        return "xul.component.Checkbox";
    }

    public String getRendererType() {
        return "xul.renderer.Checkbox";
    }

    //  @StartGeneration

  protected void setProperties(UIComponent component) {
        super.setProperties(component);
        FacesContext facesContext  = getFacesContext();

    setStringAttribute(facesContext,component,"accesskey",accesskey);
    setStringAttribute(facesContext,component,"command",command);
    setStringAttribute(facesContext,component,"crop",crop);
    setBooleanAttribute(facesContext,component,"disabled",disabled);
    setStringAttribute(facesContext,component,"image",image);
    setStringAttribute(facesContext,component,"label",label);
    setStringAttribute(facesContext,component,"preference",preference);
    setIntegerAttribute(facesContext,component,"tabindex",tabindex);

  }
 
                                              //  @EndGeneration
   
    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

  public String getAccesskey() {
    return accesskey;
  }

  public void setAccesskey(String accesskey) {
    this.accesskey = accesskey;
  }
 
  public String getCommand() {
    return command;
  }

  public void setCommand(String command) {
    this.command = command;
  }

  public String getCrop() {
    return crop;
  }

  public void setCrop(String crop) {
    this.crop = crop;
  }

  public String getDisabled() {
    return disabled;
  }

  public void setDisabled(String disabled) {
    this.disabled = disabled;
  }

  public String getImage() {
    return image;
  }

  public void setImage(String image) {
    this.image = image;
  }

  public String getPreference() {
    return preference;
  }

  public void setPreference(String preference) {
    this.preference = preference;
  }

  public String getTabindex() {
    return tabindex;
  }

  public void setTabindex(String tabindex) {
    this.tabindex = tabindex;
  }
    
 
}
TOP

Related Classes of org.xulfaces.tag.input.CheckboxTag

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.