/*
* 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.tab;
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="tab",description="Defines a tab (see XUL tab element).")
public class TabTag extends XULComponentTag {
@ATTRIBUTE(description = "This should be set to a letter that is used as a shortcut key.")
private String accesskey;
@ATTRIBUTE(mappedType="java.lang.Boolean",description = "This is set to true if the tab is immediately after the currently selected tab.")
private String afterselected;
@ATTRIBUTE(mappedType="java.lang.Boolean",description = "This is set to true if the tab is immediately before the currently selected tab.")
private String beforeselected;
@ATTRIBUTE(description = "If the label of the tab 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 tab is disabled or not. If this attribute is set to true, the tab is disabled.")
private String disabled;
@ATTRIBUTE(description = "The URL of the image to appear on the tab.")
private String image;
@ATTRIBUTE(description = "The label that will appear on the tab.")
private String label;
@ATTRIBUTE(description = "The id of the linked tabpanel element that will be displayed when the tab is selected.")
private String linkedpanel;
@ATTRIBUTE(mappedType="java.lang.Boolean",description = "This attribute is set to true if the tab is selected by default.")
private String selected;
@ATTRIBUTE(description = "This attribute indicates whether to load the image from the cache or not.")
private String validate;
public String getComponentType() {
return "xul.component.Tab";
}
public String getRendererType() {
return "xul.renderer.Tab";
}
public String getAccesskey() {
return accesskey;
}
public void setAccesskey(String accesskey) {
this.accesskey = accesskey;
}
public String getAfterselected() {
return afterselected;
}
public void setAfterselected(String afterselected) {
this.afterselected = afterselected;
}
public String getBeforeselected() {
return beforeselected;
}
public void setBeforeselected(String beforeselected) {
this.beforeselected = beforeselected;
}
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 getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getLinkedpanel() {
return linkedpanel;
}
public void setLinkedpanel(String linkedpanel) {
this.linkedpanel = linkedpanel;
}
public String getSelected() {
return selected;
}
public void setSelected(String selected) {
this.selected = selected;
}
public String getValidate() {
return validate;
}
public void setValidate(String validate) {
this.validate = validate;
}
// @StartGeneration
protected void setProperties(UIComponent component) {
super.setProperties(component);
FacesContext facesContext = getFacesContext();
setStringAttribute(facesContext,component,"accesskey",accesskey);
setBooleanAttribute(facesContext,component,"afterselected",afterselected);
setBooleanAttribute(facesContext,component,"beforeselected",beforeselected);
setStringAttribute(facesContext,component,"crop",crop);
setBooleanAttribute(facesContext,component,"disabled",disabled);
setStringAttribute(facesContext,component,"image",image);
setStringAttribute(facesContext,component,"label",label);
setStringAttribute(facesContext,component,"linkedpanel",linkedpanel);
setBooleanAttribute(facesContext,component,"selected",selected);
setStringAttribute(facesContext,component,"validate",validate);
}
// @EndGeneration
}