View Javadoc

1   // WARNING: This file was automatically generated. Do not edit it directly,
2   //          or you will lose your changes.
3   
4   /*
5    * Licensed to the Apache Software Foundation (ASF) under one
6    * or more contributor license agreements.  See the NOTICE file
7    * distributed with this work for additional information
8    * regarding copyright ownership.  The ASF licenses this file
9    * to you under the Apache License, Version 2.0 (the
10   * "License"); you may not use this file except in compliance
11   * with the License.  You may obtain a copy of the License at
12   *
13   *   http://www.apache.org/licenses/LICENSE-2.0
14   *
15   * Unless required by applicable law or agreed to in writing,
16   * software distributed under the License is distributed on an
17   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18   * KIND, either express or implied.  See the License for the
19   * specific language governing permissions and limitations
20   * under the License.
21  */
22  package org.apache.myfaces.trinidad.component.core.output;
23  
24  import org.apache.myfaces.trinidad.bean.FacesBean;
25  import org.apache.myfaces.trinidad.bean.PropertyKey;
26  import org.apache.myfaces.trinidad.component.UIXObject;
27  import org.apache.myfaces.trinidad.util.ComponentUtils;
28  
29  /**
30   *
31   * spacer occupies a fixed amount of space in a layout, specified by
32   *           its width and height attributes. If the width is not specified, but
33   *           height specified, a block level HTML element is rendered, thereby
34   *           introducing a new line effect. If width is specified, then,
35   *           irrespective of the specified value of height, it may not get shorter
36   *           than the applicable line-height, in user agents that strictly support
37   *           standards mode HTML.
38   *
39   * <h4>Events:</h4>
40   * <table border="1" width="100%" cellpadding="3" summary="">
41   * <tr bgcolor="#CCCCFF" class="TableHeadingColor">
42   * <th align="left">Type</th>
43   * <th align="left">Phases</th>
44   * <th align="left">Description</th>
45   * </tr>
46   * <tr class="TableRowColor">
47   * <td valign="top"><code>org.apache.myfaces.trinidad.event.AttributeChangeEvent</code></td>
48   * <td valign="top" nowrap>Invoke<br>Application<br>Apply<br>Request<br>Values</td>
49   * <td valign="top">Event delivered to describe an attribute change.  Attribute change events are not delivered for any programmatic change to a property.  They are only delivered when a renderer changes a property without the application's specific request.  An example of an attribute change event might include the width of a column that supported client-side resizing.</td>
50   * </tr>
51   * </table>
52   */
53  public class CoreSpacer extends UIXObject
54  {
55    static public final FacesBean.Type TYPE = new FacesBean.Type(
56      UIXObject.TYPE);
57    static public final PropertyKey WIDTH_KEY =
58      TYPE.registerKey("width", String.class);
59    static public final PropertyKey HEIGHT_KEY =
60      TYPE.registerKey("height", String.class);
61    static public final PropertyKey SHORT_DESC_KEY =
62      TYPE.registerKey("shortDesc", String.class);
63    static public final PropertyKey PARTIAL_TRIGGERS_KEY =
64      TYPE.registerKey("partialTriggers", String[].class, null, 0, PropertyKey.Mutable.RARELY);
65  
66    static public final String COMPONENT_FAMILY =
67      "org.apache.myfaces.trinidad.Object";
68    static public final String COMPONENT_TYPE =
69      "org.apache.myfaces.trinidad.CoreSpacer";
70  
71    /**
72     * Construct an instance of the CoreSpacer.
73     */
74    public CoreSpacer()
75    {
76      super("org.apache.myfaces.trinidad.Spacer");
77    }
78  
79    /**
80     * Gets the width of the spacer item.
81     *
82     * @return  the new width value
83     */
84    final public String getWidth()
85    {
86      return ComponentUtils.resolveString(getProperty(WIDTH_KEY));
87    }
88  
89    /**
90     * Sets the width of the spacer item.
91     * 
92     * @param width  the new width value
93     */
94    final public void setWidth(String width)
95    {
96      setProperty(WIDTH_KEY, (width));
97    }
98  
99    /**
100    * Sets the width of the spacer item.
101    * 
102    * @param width  the new width value
103    */
104   final public void setWidth(int width)
105   {
106     setProperty(WIDTH_KEY, Integer.valueOf(width));
107   }
108 
109   /**
110    * Gets the height of the spacer item.
111    *
112    * @return  the new height value
113    */
114   final public String getHeight()
115   {
116     return ComponentUtils.resolveString(getProperty(HEIGHT_KEY));
117   }
118 
119   /**
120    * Sets the height of the spacer item.
121    * 
122    * @param height  the new height value
123    */
124   final public void setHeight(String height)
125   {
126     setProperty(HEIGHT_KEY, (height));
127   }
128 
129   /**
130    * Sets the height of the spacer item.
131    * 
132    * @param height  the new height value
133    */
134   final public void setHeight(int height)
135   {
136     setProperty(HEIGHT_KEY, Integer.valueOf(height));
137   }
138 
139   /**
140    * Gets the short description of the bean.  This text
141    *          is commonly used by user agents to display tooltip help text.
142    *
143    * @return  the new shortDesc value
144    */
145   final public String getShortDesc()
146   {
147     return ComponentUtils.resolveString(getProperty(SHORT_DESC_KEY));
148   }
149 
150   /**
151    * Sets the short description of the bean.  This text
152    *          is commonly used by user agents to display tooltip help text.
153    * 
154    * @param shortDesc  the new shortDesc value
155    */
156   final public void setShortDesc(String shortDesc)
157   {
158     setProperty(SHORT_DESC_KEY, (shortDesc));
159   }
160 
161   /**
162    * Gets the IDs of the components that should trigger a partial update.
163    *          This component will listen on the trigger components. If one of the
164    *          trigger components receives an event that will cause it to update
165    *          in some way, this component will request to be updated too.
166    *
167    * @return  the new partialTriggers value
168    */
169   final public String[] getPartialTriggers()
170   {
171     return (String[])getProperty(PARTIAL_TRIGGERS_KEY);
172   }
173 
174   /**
175    * Sets the IDs of the components that should trigger a partial update.
176    *          This component will listen on the trigger components. If one of the
177    *          trigger components receives an event that will cause it to update
178    *          in some way, this component will request to be updated too.
179    * 
180    * @param partialTriggers  the new partialTriggers value
181    */
182   final public void setPartialTriggers(String[] partialTriggers)
183   {
184     setProperty(PARTIAL_TRIGGERS_KEY, (partialTriggers));
185   }
186 
187   @Override
188   public String getFamily()
189   {
190     return COMPONENT_FAMILY;
191   }
192 
193   @Override
194   protected FacesBean.Type getBeanType()
195   {
196     return TYPE;
197   }
198 
199   /**
200    * Construct an instance of the CoreSpacer.
201    */
202   protected CoreSpacer(
203     String rendererType
204     )
205   {
206     super(rendererType);
207   }
208 
209   static
210   {
211     TYPE.lockAndRegister("org.apache.myfaces.trinidad.Object","org.apache.myfaces.trinidad.Spacer");
212   }
213 }