View Javadoc
1   // ---------- Attention: Generated code, please do not modify! -----------  
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one or more
5    * contributor license agreements.  See the NOTICE file distributed with
6    * this work for additional information regarding copyright ownership.
7    * The ASF licenses this file to You under the Apache License, Version 2.0
8    * (the "License"); you may not use this file except in compliance with
9    * the License.  You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   */
19  
20  package org.apache.myfaces.tobago.component;
21  
22  import javax.faces.context.FacesContext;
23  import org.apache.myfaces.tobago.context.Markup;
24  import org.apache.myfaces.tobago.internal.component.AbstractUISplitLayout;
25  import org.apache.myfaces.tobago.layout.Measure;
26  import org.apache.myfaces.tobago.layout.MeasureList;
27  import org.apache.myfaces.tobago.renderkit.css.CustomClass;
28  import org.apache.myfaces.tobago.internal.util.ArrayUtils;
29  import org.apache.myfaces.tobago.internal.util.StringUtils;
30  import org.apache.myfaces.tobago.internal.util.Deprecation;
31  import javax.el.ELException;
32  import javax.faces.FacesException;
33  import java.util.Arrays;
34  import java.util.ArrayList;
35  import java.util.Collection;
36  import java.util.List;
37  import javax.el.MethodExpression;
38  import javax.el.ValueExpression;
39  
40  /** 
41   <p>
42    WARNING: This component is preliminary and may be changed without a major release.
43    </p>
44  
45    Renders a SplitLayout.
46    A area with two child components rendered horizontally or vertically and allows to change the
47    layout relation of this two components on the client.
48    * UIComponent class, generated from template {@code component.stg} with class
49    * {@link org.apache.myfaces.tobago.internal.taglib.component.SplitLayoutTagDeclaration}.
50   */
51  public class UISplitLayout
52      extends AbstractUISplitLayout implements Visual {
53  
54    public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.SplitLayout";
55  
56    public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.GridLayout";
57  
58  
59    enum PropertyKeys {
60      columnSpacing,
61      markup,
62      columns,
63      customClass,
64      rowSpacing,
65      rows,
66    }
67  
68    public String getFamily() {
69      return COMPONENT_FAMILY;
70    }
71  
72  
73    /**
74    Spacing between the columns in the actual layout.
75  
76    */
77    public org.apache.myfaces.tobago.layout.Measure getColumnSpacing() {
78      Object object = getStateHelper().eval(PropertyKeys.columnSpacing);
79      if (object != null) {
80         return Measure.valueOf(object);
81      }
82      return Measure.ZERO;
83    }
84  
85    public void setColumnSpacing(org.apache.myfaces.tobago.layout.Measure columnSpacing) {
86      getStateHelper().put(PropertyKeys.columnSpacing, columnSpacing);
87    }
88  
89    public org.apache.myfaces.tobago.context.Markup getMarkup() {
90      Object object = getStateHelper().eval(PropertyKeys.markup);
91      if (object != null) {
92        return Markup.valueOf(object);
93      }
94      return null;
95    }
96  
97    public void setMarkup(org.apache.myfaces.tobago.context.Markup markup) {
98      getStateHelper().put(PropertyKeys.markup, markup);
99    }
100 
101   /**
102   This value defines the layout constraints for column layout.
103    It is a semicolon separated list of layout tokens '&lt;n&gt;*', '&lt;measure&gt;' or the keyword 'auto'.
104    Where &lt;n&gt; is a positive integer or empty and &lt;measure&gt; is a valid CSS length.
105    Example: '2*;*;100px;3rem;auto'.
106 
107   */
108   public org.apache.myfaces.tobago.layout.MeasureList getColumns() {
109     return (org.apache.myfaces.tobago.layout.MeasureList) getStateHelper().eval(PropertyKeys.columns);
110   }
111 
112   public void setColumns(org.apache.myfaces.tobago.layout.MeasureList columns) {
113     getStateHelper().put(PropertyKeys.columns, columns);
114   }
115 
116   /**
117   Sets a CSS class in its parent, if the parent supports it.
118 
119    Which this feature it is possible to put a CSS class name into a component with the &lt;tc:style&gt; tag. Example:
120 
121    <pre>
122    &lt;tc:in&gt;
123      &lt;tc:style customClass="my-emphasized"/&gt;
124    &lt;/tc:in&gt;
125    </pre>
126 
127    One capability is, to used external CSS libs.
128    <br>
129    This feature should not be used imprudent.
130    Because it might be unstable against changes in the renderered HTML code.
131 
132   */
133   public org.apache.myfaces.tobago.renderkit.css.CustomClass getCustomClass() {
134     return (org.apache.myfaces.tobago.renderkit.css.CustomClass) getStateHelper().eval(PropertyKeys.customClass);
135   }
136 
137   public void setCustomClass(org.apache.myfaces.tobago.renderkit.css.CustomClass customClass) {
138     getStateHelper().put(PropertyKeys.customClass, customClass);
139   }
140 
141   /**
142   Spacing between the rows in the actual layout.
143 
144   */
145   public org.apache.myfaces.tobago.layout.Measure getRowSpacing() {
146     Object object = getStateHelper().eval(PropertyKeys.rowSpacing);
147     if (object != null) {
148        return Measure.valueOf(object);
149     }
150     return Measure.ZERO;
151   }
152 
153   public void setRowSpacing(org.apache.myfaces.tobago.layout.Measure rowSpacing) {
154     getStateHelper().put(PropertyKeys.rowSpacing, rowSpacing);
155   }
156 
157   /**
158   This value defines the layout constraints for row layout.
159    It is a semicolon separated list of layout tokens '&lt;n&gt;*', '&lt;measure&gt;' or the keyword 'auto'.
160    Where &lt;n&gt; is a positive integer or empty and &lt;measure&gt; is a valid CSS length.
161    Example: '2*;*;100px;3rem;auto'.
162 
163   */
164   public org.apache.myfaces.tobago.layout.MeasureList getRows() {
165     return (org.apache.myfaces.tobago.layout.MeasureList) getStateHelper().eval(PropertyKeys.rows);
166   }
167 
168   public void setRows(org.apache.myfaces.tobago.layout.MeasureList rows) {
169     getStateHelper().put(PropertyKeys.rows, rows);
170   }
171 
172 
173 }