/*
* 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;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import org.xulfaces.annotation.taglib.ATTRIBUTE;
import org.xulfaces.annotation.taglib.TAG;
/**
* <p>Defines a splitter tag.</p>
* <p>See <a href="http://xulplanet.com/references/elemref/ref_splitter.html">XUL splitter</a></p>
* @author kito31
* @version $Id: SplitterTag.java,v 1.3 2007/05/08 14:14:55 kito31 Exp $
*/
@TAG(name="splitter",description="Defines a splitter (see XUL splitter element).")
public class SplitterTag extends XULComponentTag {
@ATTRIBUTE(description = "Determines which side of the splitter is collapsed when its grippy is clicked.")
private String collapse;
@ATTRIBUTE(description = "This attribute indicates which element to the right or below the splitter should be resized when the splitter is repositioned.")
private String resizeafter;
@ATTRIBUTE(description = "This attribute indicates which element to the left or above the splitter should be resized when the splitter is repositioned.")
private String resizebefore;
@ATTRIBUTE(description = "Indicates whether the splitter has collapsed content or not.")
private String state;
public String getRendererType() {
return "xul.renderer.Splitter";
}
public String getComponentType() {
return "xul.component.Splitter";
}
public String getCollapse() {
return collapse;
}
public void setCollapse(String collapse) {
this.collapse = collapse;
}
public String getResizeafter() {
return resizeafter;
}
public void setResizeafter(String resizeafter) {
this.resizeafter = resizeafter;
}
public String getResizebefore() {
return resizebefore;
}
public void setResizebefore(String resizebefore) {
this.resizebefore = resizebefore;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
// @StartGeneration
protected void setProperties(UIComponent component) {
super.setProperties(component);
FacesContext facesContext = getFacesContext();
setStringAttribute(facesContext,component,"collapse",collapse);
setStringAttribute(facesContext,component,"resizeafter",resizeafter);
setStringAttribute(facesContext,component,"resizebefore",resizebefore);
setStringAttribute(facesContext,component,"state",state);
}
// @EndGeneration
}