Package org.xulfaces.tag.tree

Source Code of org.xulfaces.tag.tree.TreeColumnTag

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

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: TreeColumnTag.java,v 1.11 2007/05/08 14:21:31 kito31 Exp $
*/
@TAG(name="treecol",description="Defines a tree column (see XUL treecol element).")
public class TreeColumnTag extends XULComponentTag {
 
  @ATTRIBUTE(description = "If the label of the treecol 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 = "If true, then the column is a cycler column. In the case, clicking on a cell in the column will alternate its state between on and off.")
  private String cycler;
 
  @ATTRIBUTE(mappedType="java.lang.Boolean",description = "This attribute will be set to true if the column is being dragged.")
  private String dragging;
 
  @ATTRIBUTE(mappedType="java.lang.Boolean",description="Indicates whether the tree is editable or not. (Firefox 1.5)")
  private String editable;  
 
  @ATTRIBUTE(mappedType="java.lang.Boolean",description = "If true, the size of the column in the tree cannot be adjusted by the user.")
  private String fixed;
 
  @ATTRIBUTE(mappedType="java.lang.Boolean",description = "This attribute, when set to true, hides the column.")
  private String hidden;
 
  @ATTRIBUTE(mappedType="java.lang.Boolean",description = "Set this to true to indicate that the tree column header should be displayed without any column header styling.")
  private String hideheader;
 
  @ATTRIBUTE(mappedType="java.lang.Boolean",description = "If true, the column does not appear in the column picker.")
  private String ignoreincolumnpicker;

  @ATTRIBUTE(description = "The label that will appear on the treecol. If this is left out, no text appears.")
  private String label;
 
  @ATTRIBUTE(mappedType="java.lang.Boolean",description = "If set to true, the column will have indentation and twisties drawn to the left of it to indicate the hierarchy level of the rows.")
  private String primary;
   
  @ATTRIBUTE(description = "Apply style")
  private String properties;
 
  @ATTRIBUTE(description = "Set this to a RDF property to have the data in the column sorted based on that property. ")
  private String sort;
 
  @ATTRIBUTE(mappedType="java.lang.Boolean",description = "This should be set to true for the column which should be sorted by default.")
  private String sortActive;
 
  @ATTRIBUTE(description = "Set this attribute to have the tree column use an image for the header instead of a label. ")
  private String src;
 
  @ATTRIBUTE(description = "The type of tree column. The default is a text column that displays the content as text.")
  private String type;
 
     
    public String getComponentType() {
        return "xul.component.TreeColumn";
    }

    public String getRendererType() {
        return "xul.renderer.TreeColumn";
    }
   
   
  public String getLabel() {
    return label;
  }

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

  public String getPrimary() {
    return primary;
  }

  public void setPrimary(String primary) {
    this.primary = primary;
  }

  public String getCrop() {
    return crop;
  }

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

  public String getCycler() {
    return cycler;
  }

  public void setCycler(String cycler) {
    this.cycler = cycler;
  }

  public String getDragging() {
    return dragging;
  }

  public void setDragging(String dragging) {
    this.dragging = dragging;
  }

  public String getFixed() {
    return fixed;
  }

  public void setFixed(String fixed) {
    this.fixed = fixed;
  }

  public String getHidden() {
    return hidden;
  }

  public String getEditable() {
    return editable;
  }

  public void setEditable(String editable) {
    this.editable = editable;
  }

  public void setHidden(String hidden) {
    this.hidden = hidden;
  }

  public String getHideheader() {
    return hideheader;
  }

  public String getProperties() {
    return properties;
  }

  public void setProperties(String properties) {
    this.properties = properties;
  }

  public void setHideheader(String hideheader) {
    this.hideheader = hideheader;
  }

  public String getIgnoreincolumnpicker() {
    return ignoreincolumnpicker;
  }

  public void setIgnoreincolumnpicker(String ignoreincolumnpicker) {
    this.ignoreincolumnpicker = ignoreincolumnpicker;
  }

  public String getSort() {
    return sort;
  }

  public void setSort(String sort) {
    this.sort = sort;
  }
 
  public String getSortActive() {
    return sortActive;
  }

  public void setSortActive(String sortActive) {
    this.sortActive = sortActive;
  }

  public String getSrc() {
    return src;
  }

  public void setSrc(String src) {
    this.src = src;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

 
  // @StartGeneration

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

    setStringAttribute(facesContext,component,"crop",crop);
    setBooleanAttribute(facesContext,component,"cycler",cycler);
    setBooleanAttribute(facesContext,component,"dragging",dragging);
    setBooleanAttribute(facesContext,component,"editable",editable);
    setBooleanAttribute(facesContext,component,"fixed",fixed);
    setBooleanAttribute(facesContext,component,"hidden",hidden);
    setBooleanAttribute(facesContext,component,"hideheader",hideheader);
    setBooleanAttribute(facesContext,component,"ignoreincolumnpicker",ignoreincolumnpicker);
    setStringAttribute(facesContext,component,"label",label);
    setBooleanAttribute(facesContext,component,"primary",primary);
    setStringAttribute(facesContext,component,"properties",properties);
    setStringAttribute(facesContext,component,"sort",sort);
    setBooleanAttribute(facesContext,component,"sortActive",sortActive);
    setStringAttribute(facesContext,component,"src",src);
    setStringAttribute(facesContext,component,"type",type);

  }
 
                                          // @EndGeneration
 
}
TOP

Related Classes of org.xulfaces.tag.tree.TreeColumnTag

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.