Package org.xulfaces.tag.popup

Source Code of org.xulfaces.tag.popup.PopupTag

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

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;


/**
* <p>Defines a popup tag.</p>
* <p>See <a href="http://xulplanet.com/references/elemref/ref_popup.html">XUL popup</a></p>
* @author kito31
* @version $Id: PopupTag.java,v 1.2 2007/05/08 14:19:16 kito31 Exp $
*/
@TAG(name="popup",description="Defines a popup (see XUL popup element).")
public class PopupTag extends XULComponentTag {

  @ATTRIBUTE(mappedType="java.lang.Boolean",description = "If true, keyboard navigation between menu items in the popup is disabled.")
  private String ignorekeys;
 
  @ATTRIBUTE(mappedType="java.lang.Integer",description = "Overrides the horizontal position of the popup specified by the showPopup function.")
  private String left;
 
  @ATTRIBUTE(supportsMethodBinding=true,description = "This event is sent to a popup after it has been hidden.")
  private String onpopuphidden;
 
  @ATTRIBUTE(supportsMethodBinding=true,description = "This event is sent to a popup when it is about to be hidden.")
  private String onpopuphiding;
 
  @ATTRIBUTE(supportsMethodBinding=true,description = "This event is sent to a popup just before it is popped open.")
  private String onpopupshowing;
 
  @ATTRIBUTE(supportsMethodBinding=true,description = "This is event is sent to a popup after it has been opened, much like the onload event is sent to a window when it is opened.")
  private String onpopupshown;
 
  @ATTRIBUTE(description = "The position attribute determines where the popup appears relative to the element the user clicked to invoke the popup.")
  private String position;
 
  @ATTRIBUTE(mappedType="java.lang.Integer",description = "Overrides the vertical position of the popup specified by the showPopup function.")
  private String top;
 
  public String getRendererType() {
    return "xul.renderer.Popup";
  }
 
  public String getComponentType() {
    return "xul.component.Popup";
  }

 
  public String getIgnorekeys() {
    return ignorekeys;
  }

  public void setIgnorekeys(String ignorekeys) {
    this.ignorekeys = ignorekeys;
  }

  public String getLeft() {
    return left;
  }

  public void setLeft(String left) {
    this.left = left;
  }

  public String getOnpopuphidden() {
    return onpopuphidden;
  }

  public void setOnpopuphidden(String onpopuphidden) {
    this.onpopuphidden = onpopuphidden;
  }

  public String getOnpopuphiding() {
    return onpopuphiding;
  }

  public void setOnpopuphiding(String onpopuphiding) {
    this.onpopuphiding = onpopuphiding;
  }

  public String getOnpopupshowing() {
    return onpopupshowing;
  }

  public void setOnpopupshowing(String onpopupshowing) {
    this.onpopupshowing = onpopupshowing;
  }

  public String getOnpopupshown() {
    return onpopupshown;
  }

  public void setOnpopupshown(String onpopupshown) {
    this.onpopupshown = onpopupshown;
  }

  public String getPosition() {
    return position;
  }

  public void setPosition(String position) {
    this.position = position;
  }

  public String getTop() {
    return top;
  }

  public void setTop(String top) {
    this.top = top;
  }
 
 
 
  // @StartGeneration

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

    setBooleanAttribute(facesContext,component,"ignorekeys",ignorekeys);
    setIntegerAttribute(facesContext,component,"left",left);
    setMethodBinding(facesContext,component,"onpopuphidden",onpopuphidden);
    setMethodBinding(facesContext,component,"onpopuphiding",onpopuphiding);
    setMethodBinding(facesContext,component,"onpopupshowing",onpopupshowing);
    setMethodBinding(facesContext,component,"onpopupshown",onpopupshown);
    setStringAttribute(facesContext,component,"position",position);
    setIntegerAttribute(facesContext,component,"top",top);

  }
 
                  // @EndGeneration
 
 
}
TOP

Related Classes of org.xulfaces.tag.popup.PopupTag

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.