Package org.xulfaces.component.toolbar

Source Code of org.xulfaces.component.toolbar.ToolbarComponent

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

import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;

import org.xulfaces.annotation.faces.ATTRIBUTE;
import org.xulfaces.annotation.faces.COMPONENT;
import org.xulfaces.component.XULComponentBase;

/**
*
* @author kito31
* @version $Id$
*/
@COMPONENT(type="xul.component.Toolbar")
public class ToolbarComponent extends XULComponentBase {

  @ATTRIBUTE(description = "The current set of displayed items on the toolbar. This should be set to a comma-separated list of item IDs from the toolbarpalette.")
  protected String currentset;
 
  @ATTRIBUTE(description = "This value is the index of the toolbar in the list of the custom toolbars. The value is updated automatically by the toolbar customization dialog.")
  protected Integer customindex;
 
  @ATTRIBUTE(description = "Set this attribute to true on toolbars that can be customized. This causes the set of buttons to be persisted across sessions.")
  protected Boolean customizable;
 
  @ATTRIBUTE(description = "The number of custom toolbars currently within the toolbox. (Firefox only)")
  protected String defaultset;
 
  @ATTRIBUTE(description = "When set to true, the grippy will be hidden. When set to false, the default, the grippy will be shown. (Not in Firefox)"
  protected Boolean grippyhidden;
 
  @ATTRIBUTE(description = "The text to appear on the tooltip for the toolbar's grippy when the toolbar is collapsed. This would be used to label the grippy so that the user knows which toolbar it represents. (Not in Firefox)"
  protected String grippytooltiptext;

  @ATTRIBUTE(description = "The toolbarset within the toolbox.")
  protected String toolbarset;

  @ATTRIBUTE(description = "The name of the toolbar, which is listed on the Show/Hide toolbars menu. (Firefox only)")
  protected String toolbarname;
 
 
 
  // @StartGeneration
   
  public java.lang.String getCurrentset(){
    java.lang.String value = null;
    ValueBinding vb = getValueBinding("currentset");
        if (vb != null) {
      return (java.lang.String)(vb.getValue(getFacesContext()));
        }
    else {
      value = this.currentset;
    }
    return value;
  }

  public void setCurrentset(java.lang.String value){
    this.currentset = value;
  }
 
   
  public java.lang.Integer getCustomindex(){
    java.lang.Integer value = null;
    ValueBinding vb = getValueBinding("customindex");
        if (vb != null) {
      return (java.lang.Integer)(vb.getValue(getFacesContext()));
        }
    else {
      value = this.customindex;
    }
    return value;
  }

  public void setCustomindex(java.lang.Integer value){
    this.customindex = value;
  }
 
   
  public java.lang.Boolean getCustomizable(){
    java.lang.Boolean value = null;
    ValueBinding vb = getValueBinding("customizable");
        if (vb != null) {
      return (java.lang.Boolean)(vb.getValue(getFacesContext()));
        }
    else {
      value = this.customizable;
    }
    return value;
  }

  public void setCustomizable(java.lang.Boolean value){
    this.customizable = value;
  }
 
   
  public java.lang.String getDefaultset(){
    java.lang.String value = null;
    ValueBinding vb = getValueBinding("defaultset");
        if (vb != null) {
      return (java.lang.String)(vb.getValue(getFacesContext()));
        }
    else {
      value = this.defaultset;
    }
    return value;
  }

  public void setDefaultset(java.lang.String value){
    this.defaultset = value;
  }
 
   
  public java.lang.Boolean getGrippyhidden(){
    java.lang.Boolean value = null;
    ValueBinding vb = getValueBinding("grippyhidden");
        if (vb != null) {
      return (java.lang.Boolean)(vb.getValue(getFacesContext()));
        }
    else {
      value = this.grippyhidden;
    }
    return value;
  }

  public void setGrippyhidden(java.lang.Boolean value){
    this.grippyhidden = value;
  }
 
   
  public java.lang.String getGrippytooltiptext(){
    java.lang.String value = null;
    ValueBinding vb = getValueBinding("grippytooltiptext");
        if (vb != null) {
      return (java.lang.String)(vb.getValue(getFacesContext()));
        }
    else {
      value = this.grippytooltiptext;
    }
    return value;
  }

  public void setGrippytooltiptext(java.lang.String value){
    this.grippytooltiptext = value;
  }
 
   
  public java.lang.String getToolbarset(){
    java.lang.String value = null;
    ValueBinding vb = getValueBinding("toolbarset");
        if (vb != null) {
      return (java.lang.String)(vb.getValue(getFacesContext()));
        }
    else {
      value = this.toolbarset;
    }
    return value;
  }

  public void setToolbarset(java.lang.String value){
    this.toolbarset = value;
  }
 
   
  public java.lang.String getToolbarname(){
    java.lang.String value = null;
    ValueBinding vb = getValueBinding("toolbarname");
        if (vb != null) {
      return (java.lang.String)(vb.getValue(getFacesContext()));
        }
    else {
      value = this.toolbarname;
    }
    return value;
  }

  public void setToolbarname(java.lang.String value){
    this.toolbarname = value;
  }
 

  public Object saveState(FacesContext context) {
    Object values[] = new Object[9];
    values[0] = super.saveState(context);
    values[1] = this.currentset; 
        values[2] = this.customindex; 
        values[3] = this.customizable; 
        values[4] = this.defaultset; 
        values[5] = this.grippyhidden; 
        values[6] = this.grippytooltiptext; 
        values[7] = this.toolbarset; 
        values[8] = this.toolbarname; 
        return ((Object) (values));
  }

  public void restoreState(FacesContext context, Object state) {
    Object values[] = (Object[]) state;
    super.restoreState(context, values[0]);
    this.currentset = (java.lang.String) values[1];
        this.customindex = (java.lang.Integer) values[2];
        this.customizable = (java.lang.Boolean) values[3];
        this.defaultset = (java.lang.String) values[4];
        this.grippyhidden = (java.lang.Boolean) values[5];
        this.grippytooltiptext = (java.lang.String) values[6];
        this.toolbarset = (java.lang.String) values[7];
        this.toolbarname = (java.lang.String) values[8];
      }
 

  // @EndGeneration
 
 
}
TOP

Related Classes of org.xulfaces.component.toolbar.ToolbarComponent

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.