View Javadoc

1   package org.apache.myfaces.tobago.taglib.decl;
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  import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
21  import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
22  
23  // XXX optimize: smarter code generator
24  
25  /**
26   * This interface is useful for migration. The width and height attributes can be set
27   * in Tobago 1.0. With this interface it can be set for compatibility.
28   *
29   * @see IsGridLayoutComponent
30   */
31  @Deprecated
32  public interface IsGridLayoutComponentWithDeprecatedDimension {
33  
34    /**
35     *  @param columnSpan The number of horizontal cells this component should use.
36     */
37    @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "1")
38    void setColumnSpan(String columnSpan);
39  
40    /**
41     *  @param rowSpan The number of vertical cells this component should use.
42     */
43    @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "1")
44    void setRowSpan(String rowSpan);
45  
46    /**
47     * This value will usually be set by the layout manager.
48     *
49     * @param width The width for this component.
50     */
51    @TagAttribute
52    @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
53        defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
54            + "      getRenderer(getFacesContext())).getWidth(getFacesContext(), this)")
55    void setWidth(String width);
56  
57    /**
58     * This value will usually be set by the layout manager.
59     *
60     * @param height The height for this component.
61     */
62    @TagAttribute
63    @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
64        defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
65            + "      getRenderer(getFacesContext())).getHeight(getFacesContext(), this)")
66    void setHeight(String height);
67  
68    /**
69     * @param minimumWidth The minimum width for this component.
70     */
71    @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
72        defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
73            + "      getRenderer(getFacesContext())).getMinimumWidth(getFacesContext(), this)")
74    void setMinimumWidth(String minimumWidth);
75  
76    /**
77     * @param minimumHeight The minimum height for this component.
78     */
79    @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
80        defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
81            + "getRenderer(getFacesContext())).getMinimumHeight(getFacesContext(), this)")
82    void setMinimumHeight(String minimumHeight);
83  
84    /**
85     * @param preferredWidth The preferred width for this component.
86     */
87    @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
88        defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
89            + "getRenderer(getFacesContext())).getPreferredWidth(getFacesContext(), this)")
90    void setPreferredWidth(String preferredWidth);
91  
92    /**
93     * @param preferredHeight The preferred height for this component.
94     */
95    @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
96        defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
97            + "getRenderer(getFacesContext())).getPreferredHeight(getFacesContext(), this)")
98    void setPreferredHeight(String preferredHeight);
99  
100   /**
101    * @param maximumWidth The maximum width for this component.
102    */
103   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
104       defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
105           + "getRenderer(getFacesContext())).getMaximumWidth(getFacesContext(), this)")
106   void setMaximumWidth(String maximumWidth);
107 
108   /**
109    * @param maximumHeight The maximum height for this component.
110    */
111   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
112       defaultCode = "((org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer)\n"
113           + "getRenderer(getFacesContext())).getMaximumHeight(getFacesContext(), this)")
114   void setMaximumHeight(String maximumHeight);
115 
116   /**
117    * This value will usually be set by the layout manager.
118    *
119    * @param left The left position value for this component.
120    */
121   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
122   void setLeft(String left);
123 
124   /**
125    * This value will usually be set by the layout manager.
126    *
127    * @param top The top position value for this component.
128    */
129   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
130   void setTop(String top);
131 
132   /**
133    * This attribute is for internal use only.
134    *
135    * @param horizontalIndex The index of the component inside its container grid in horizontal direction.
136    */
137   @UIComponentTagAttribute(type = "java.lang.Integer")
138   void setHorizontalIndex(String horizontalIndex);
139 
140   /**
141    * This attribute is for internal use only.
142    *
143    * @param verticalIndex The index of the component inside its container grid in vertical direction.
144    */
145   @UIComponentTagAttribute(type = "java.lang.Integer")
146   void setVerticalIndex(String verticalIndex);
147 
148   /**
149    * This attribute is for internal use only.
150    *
151    * @param display Indicates the renderer to render the element as block or inline.
152    */
153   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Display")
154   void setDisplay(String display);
155 
156   /**
157    * This attribute is for internal use only.
158    * TODO: this attribute es for containers only
159    *
160    * @param leftOffset The left offset which is needed by some containers (e. g. a box).
161    */
162   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
163         defaultCode = "org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
164           + "getFacesContext(), this, \"leftOffset\")")
165   void setLeftOffset(String leftOffset);
166 
167   /**
168    * This attribute is for internal use only.
169    * TODO: this attribute es for containers only
170    *
171    * @param rightOffset The right offset which is needed by some containers (e. g. a box).
172    */
173   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
174         defaultCode = "org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
175           + "getFacesContext(), this, \"rightOffset\")")
176   void setRightOffset(String rightOffset);
177 
178   /**
179    * This attribute is for internal use only.
180    * TODO: this attribute es for containers only
181    *
182    * @param topOffset The top offset which is needed by some containers (e. g. a box).
183    */
184   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
185         defaultCode = "org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
186           + "getFacesContext(), this, \"topOffset\")")
187   void setTopOffset(String topOffset);
188 
189   /**
190    * This attribute is for internal use only.
191    * TODO: this attribute es for containers only
192    *
193    * @param bottomOffset The bottom offset which is needed by some containers (e. g. a box).
194    */
195   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure",
196         defaultCode = "org.apache.myfaces.tobago.config.ThemeConfig.getMeasure("
197           + "getFacesContext(), this, \"bottomOffset\")")
198   void setBottomOffset(String bottomOffset);
199 
200 }