Package org.xulfaces.tag.output

Source Code of org.xulfaces.tag.output.CaptionTag

/*
*   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.output;

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.XULComponentTag;

/**
*
* @author kito31
* @version $Id$
*/
@TAG(name = "caption",description="Defines a caption (see XUL caption element).")
public class CaptionTag extends XULComponentTag {

  @ATTRIBUTE(description = "This should be set to a letter that is used as a shortcut key.")
  private String accesskey;
   
  @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(description = "The URL of the image to appear on the button. If this is attribute is left out, no image appears. The position of the image is determined by the dir and orient attributes.")
  private String image;
 
  @ATTRIBUTE(description = "The text to be used for the label.")
  private String value;
 
  @ATTRIBUTE(mappedType="java.lang.Integer",description = "The tab order of the element.")
  private String tabindex;

  public String getComponentType() {
    return "xul.component.Label";
  }

  public String getRendererType() {
    return "xul.renderer.Caption";
  }
 
  public String getAccesskey() {
    return accesskey;
  }

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

  public String getCrop() {
    return crop;
  }

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

  public String getImage() {
    return image;
  }

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

 
  public String getValue() {
    return value;
  }

  public void setValue(String value) {
    this.value = value;
  }

  public String getTabindex() {
    return tabindex;
  }

  public void setTabindex(String tabindex) {
    this.tabindex = tabindex;
  }
 
  //  @StartGeneration

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

    setStringAttribute(facesContext,component,"accesskey",accesskey);
    setStringAttribute(facesContext,component,"crop",crop);
    setStringAttribute(facesContext,component,"image",image);
    setStringAttribute(facesContext,component,"value",value);
    setIntegerAttribute(facesContext,component,"tabindex",tabindex);

  }
 
                      // @EndGeneration

}
TOP

Related Classes of org.xulfaces.tag.output.CaptionTag

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.