/** * Copyright 2014-2017 Riccardo Massera (TheCoder4.Eu), Dario D'Urzo and Stephan Rauh (http://www.beyondjava.net). * * This file is part of BootsFaces. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.bootsfaces.component.tree; import javax.faces.component.UIComponentBase; import net.bootsfaces.component.tree.event.TreeNodeEventListener; import net.bootsfaces.component.tree.model.Node; /** * This class holds the attributes of <b:tree />. */ public abstract class TreeCore extends UIComponentBase { protected enum PropertyKeys { borderColor, colLg, colMd, colSm, colXs, collapseIcon, color, display, enableLinks, expandIcon, hidden, hoverColor, largeScreen, mediumScreen, nodeSelectionListener, offset, offsetLg, offsetMd, offsetSm, offsetXs, renderRoot, selectedColor, showBorder, showCheckbox, showIcon, showTags, smallScreen, span, style, styleClass, tabindex, tinyScreen, update, value, visible; String toString; PropertyKeys(String toString) { this.toString = toString; } PropertyKeys() { } public String toString() { return ((this.toString != null) ? this.toString : super.toString()); } } /** * Hex value of border color (default #DDDDDD) <P> * @return Returns the value of the attribute, or "#DDDDDD", if it hasn't been set by the JSF file. */ public String getBorderColor() { return (String) getStateHelper().eval(PropertyKeys.borderColor, "#DDDDDD"); } /** * Hex value of border color (default #DDDDDD) <P> * Usually this method is called internally by the JSF engine. */ public void setBorderColor(String _borderColor) { getStateHelper().put(PropertyKeys.borderColor, _borderColor); } /** * Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getColLg() { return (String) getStateHelper().eval(PropertyKeys.colLg, "-1"); } /** * Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setColLg(String _colLg) { getStateHelper().put(PropertyKeys.colLg, _colLg); } /** * Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getColMd() { return (String) getStateHelper().eval(PropertyKeys.colMd, "-1"); } /** * Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setColMd(String _colMd) { getStateHelper().put(PropertyKeys.colMd, _colMd); } /** * Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getColSm() { return (String) getStateHelper().eval(PropertyKeys.colSm, "-1"); } /** * Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setColSm(String _colSm) { getStateHelper().put(PropertyKeys.colSm, _colSm); } /** * Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getColXs() { return (String) getStateHelper().eval(PropertyKeys.colXs, "-1"); } /** * Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setColXs(String _colXs) { getStateHelper().put(PropertyKeys.colXs, _colXs); } /** * Glyphicons of collapse. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getCollapseIcon() { return (String) getStateHelper().eval(PropertyKeys.collapseIcon); } /** * Glyphicons of collapse. <P> * Usually this method is called internally by the JSF engine. */ public void setCollapseIcon(String _collapseIcon) { getStateHelper().put(PropertyKeys.collapseIcon, _collapseIcon); } /** * Hex value of text color. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getColor() { return (String) getStateHelper().eval(PropertyKeys.color); } /** * Hex value of text color. <P> * Usually this method is called internally by the JSF engine. */ public void setColor(String _color) { getStateHelper().put(PropertyKeys.color, _color); } /** * If you use the "visible" attribute, the value of this attribute is added. Legal values: block, inline, inline-block. Default: block. <P> * @return Returns the value of the attribute, or "block", if it hasn't been set by the JSF file. */ public String getDisplay() { return (String) getStateHelper().eval(PropertyKeys.display, "block"); } /** * If you use the "visible" attribute, the value of this attribute is added. Legal values: block, inline, inline-block. Default: block. <P> * Usually this method is called internally by the JSF engine. */ public void setDisplay(String _display) { getStateHelper().put(PropertyKeys.display, _display); } /** * Boolean value to specify if enable href link. Only useful if you set the href attribute in every node of the tree model. <P> * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file. */ public boolean isEnableLinks() { return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.enableLinks, false); } /** * Boolean value to specify if enable href link. Only useful if you set the href attribute in every node of the tree model. <P> * Usually this method is called internally by the JSF engine. */ public void setEnableLinks(boolean _enableLinks) { getStateHelper().put(PropertyKeys.enableLinks, _enableLinks); } /** * Glyphicons of expand. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getExpandIcon() { return (String) getStateHelper().eval(PropertyKeys.expandIcon); } /** * Glyphicons of expand. <P> * Usually this method is called internally by the JSF engine. */ public void setExpandIcon(String _expandIcon) { getStateHelper().put(PropertyKeys.expandIcon, _expandIcon); } /** * This column is hidden on a certain screen size and below. Legal values: lg, md, sm, xs. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getHidden() { return (String) getStateHelper().eval(PropertyKeys.hidden); } /** * This column is hidden on a certain screen size and below. Legal values: lg, md, sm, xs. <P> * Usually this method is called internally by the JSF engine. */ public void setHidden(String _hidden) { getStateHelper().put(PropertyKeys.hidden, _hidden); } /** * Hex value of hover color. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getHoverColor() { return (String) getStateHelper().eval(PropertyKeys.hoverColor); } /** * Hex value of hover color. <P> * Usually this method is called internally by the JSF engine. */ public void setHoverColor(String _hoverColor) { getStateHelper().put(PropertyKeys.hoverColor, _hoverColor); } /** * Alternative spelling to col-lg. Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getLargeScreen() { return (String) getStateHelper().eval(PropertyKeys.largeScreen, "-1"); } /** * Alternative spelling to col-lg. Integer value to specify how many columns to span on large screens (≥1200 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setLargeScreen(String _largeScreen) { getStateHelper().put(PropertyKeys.largeScreen, _largeScreen); } /** * Alternative spelling to col-md. Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getMediumScreen() { return (String) getStateHelper().eval(PropertyKeys.mediumScreen, "-1"); } /** * Alternative spelling to col-md. Integer value to specify how many columns to span on medium screens (≥992 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setMediumScreen(String _mediumScreen) { getStateHelper().put(PropertyKeys.mediumScreen, _mediumScreen); } /** * Selection listener called on selection changed. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public TreeNodeEventListener getNodeSelectionListener() { return (TreeNodeEventListener) getStateHelper().eval(PropertyKeys.nodeSelectionListener); } /** * Selection listener called on selection changed. <P> * Usually this method is called internally by the JSF engine. */ public void setNodeSelectionListener(TreeNodeEventListener _nodeSelectionListener) { getStateHelper().put(PropertyKeys.nodeSelectionListener, _nodeSelectionListener); } /** * Integer value to specify how many columns to offset. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOffset() { return (String) getStateHelper().eval(PropertyKeys.offset); } /** * Integer value to specify how many columns to offset. <P> * Usually this method is called internally by the JSF engine. */ public void setOffset(String _offset) { getStateHelper().put(PropertyKeys.offset, _offset); } /** * Integer value to specify how many columns to offset. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOffsetLg() { return (String) getStateHelper().eval(PropertyKeys.offsetLg); } /** * Integer value to specify how many columns to offset. <P> * Usually this method is called internally by the JSF engine. */ public void setOffsetLg(String _offsetLg) { getStateHelper().put(PropertyKeys.offsetLg, _offsetLg); } /** * Integer value to specify how many columns to offset. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOffsetMd() { return (String) getStateHelper().eval(PropertyKeys.offsetMd); } /** * Integer value to specify how many columns to offset. <P> * Usually this method is called internally by the JSF engine. */ public void setOffsetMd(String _offsetMd) { getStateHelper().put(PropertyKeys.offsetMd, _offsetMd); } /** * Integer value to specify how many columns to offset. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOffsetSm() { return (String) getStateHelper().eval(PropertyKeys.offsetSm); } /** * Integer value to specify how many columns to offset. <P> * Usually this method is called internally by the JSF engine. */ public void setOffsetSm(String _offsetSm) { getStateHelper().put(PropertyKeys.offsetSm, _offsetSm); } /** * Integer value to specify how many columns to offset. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getOffsetXs() { return (String) getStateHelper().eval(PropertyKeys.offsetXs); } /** * Integer value to specify how many columns to offset. <P> * Usually this method is called internally by the JSF engine. */ public void setOffsetXs(String _offsetXs) { getStateHelper().put(PropertyKeys.offsetXs, _offsetXs); } /** * Boolean value to specify if the root node must be rendered. <P> * @return Returns the value of the attribute, or true, if it hasn't been set by the JSF file. */ public boolean isRenderRoot() { return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.renderRoot, true); } /** * Boolean value to specify if the root node must be rendered. <P> * Usually this method is called internally by the JSF engine. */ public void setRenderRoot(boolean _renderRoot) { getStateHelper().put(PropertyKeys.renderRoot, _renderRoot); } /** * Hex value of selected color. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getSelectedColor() { return (String) getStateHelper().eval(PropertyKeys.selectedColor); } /** * Hex value of selected color. <P> * Usually this method is called internally by the JSF engine. */ public void setSelectedColor(String _selectedColor) { getStateHelper().put(PropertyKeys.selectedColor, _selectedColor); } /** * Boolean value to specify if tree items has to display the border. <P> * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file. */ public boolean isShowBorder() { return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.showBorder, false); } /** * Boolean value to specify if tree items has to display the border. <P> * Usually this method is called internally by the JSF engine. */ public void setShowBorder(boolean _showBorder) { getStateHelper().put(PropertyKeys.showBorder, _showBorder); } /** * Boolean value to specify if checkbox is rendered or not. <P> * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file. */ public boolean isShowCheckbox() { return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.showCheckbox, false); } /** * Boolean value to specify if checkbox is rendered or not. <P> * Usually this method is called internally by the JSF engine. */ public void setShowCheckbox(boolean _showCheckbox) { getStateHelper().put(PropertyKeys.showCheckbox, _showCheckbox); } /** * Boolean value to specify if icons are rendered or not. <P> * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file. */ public boolean isShowIcon() { return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.showIcon, false); } /** * Boolean value to specify if icons are rendered or not. <P> * Usually this method is called internally by the JSF engine. */ public void setShowIcon(boolean _showIcon) { getStateHelper().put(PropertyKeys.showIcon, _showIcon); } /** * Boolean value to specify if tags was show or not. <P> * @return Returns the value of the attribute, or , false, if it hasn't been set by the JSF file. */ public boolean isShowTags() { return (boolean) (Boolean) getStateHelper().eval(PropertyKeys.showTags, false); } /** * Boolean value to specify if tags was show or not. <P> * Usually this method is called internally by the JSF engine. */ public void setShowTags(boolean _showTags) { getStateHelper().put(PropertyKeys.showTags, _showTags); } /** * Alternative spelling to col-sm. Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getSmallScreen() { return (String) getStateHelper().eval(PropertyKeys.smallScreen, "-1"); } /** * Alternative spelling to col-sm. Integer value to specify how many columns to span on small screens (≥768p pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setSmallScreen(String _smallScreen) { getStateHelper().put(PropertyKeys.smallScreen, _smallScreen); } /** * Integer value to specify how many columns to span on medium screens (≥992 pixels). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getSpan() { return (String) getStateHelper().eval(PropertyKeys.span); } /** * Integer value to specify how many columns to span on medium screens (≥992 pixels). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setSpan(String _span) { getStateHelper().put(PropertyKeys.span, _span); } /** * Inline style of the input element. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getStyle() { return (String) getStateHelper().eval(PropertyKeys.style); } /** * Inline style of the input element. <P> * Usually this method is called internally by the JSF engine. */ public void setStyle(String _style) { getStateHelper().put(PropertyKeys.style, _style); } /** * Style class of this element. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getStyleClass() { return (String) getStateHelper().eval(PropertyKeys.styleClass); } /** * Style class of this element. <P> * Usually this method is called internally by the JSF engine. */ public void setStyleClass(String _styleClass) { getStateHelper().put(PropertyKeys.styleClass, _styleClass); } /** * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getTabindex() { return (String) getStateHelper().eval(PropertyKeys.tabindex); } /** * Position of this element in the tabbing order for the current document. This value must be an integer between 0 and 32767. <P> * Usually this method is called internally by the JSF engine. */ public void setTabindex(String _tabindex) { getStateHelper().put(PropertyKeys.tabindex, _tabindex); } /** * Alternative spelling to col-xs. Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * @return Returns the value of the attribute, or "-1", if it hasn't been set by the JSF file. */ public String getTinyScreen() { return (String) getStateHelper().eval(PropertyKeys.tinyScreen, "-1"); } /** * Alternative spelling to col-xs. Integer value to specify how many columns to span on tiny screens (≤ 767 pixels wide). The number may optionally be followed by "column" or "columns". Alternative legal values: half, one-third, two-thirds, one-fourth, three-fourths. <P> * Usually this method is called internally by the JSF engine. */ public void setTinyScreen(String _tinyScreen) { getStateHelper().put(PropertyKeys.tinyScreen, _tinyScreen); } /** * Component(s) to be updated with ajax. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getUpdate() { return (String) getStateHelper().eval(PropertyKeys.update); } /** * Component(s) to be updated with ajax. <P> * Usually this method is called internally by the JSF engine. */ public void setUpdate(String _update) { getStateHelper().put(PropertyKeys.update, _update); } /** * Tree model value. Requires a java.util.List<net.bootsfaces.component.tree.model.Node> to work. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public Node getValue() { return (Node) getStateHelper().eval(PropertyKeys.value); } /** * Tree model value. Requires a java.util.List<net.bootsfaces.component.tree.model.Node> to work. <P> * Usually this method is called internally by the JSF engine. */ public void setValue(Node _value) { getStateHelper().put(PropertyKeys.value, _value); } /** * This column is shown on a certain screen size and above. Legal values: lg, md, sm, xs. <P> * @return Returns the value of the attribute, or null, if it hasn't been set by the JSF file. */ public String getVisible() { return (String) getStateHelper().eval(PropertyKeys.visible); } /** * This column is shown on a certain screen size and above. Legal values: lg, md, sm, xs. <P> * Usually this method is called internally by the JSF engine. */ public void setVisible(String _visible) { getStateHelper().put(PropertyKeys.visible, _visible); } }