View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package org.apache.myfaces.tobago.internal.taglib.component;
21  
22  import org.apache.myfaces.tobago.apt.annotation.Facet;
23  import org.apache.myfaces.tobago.apt.annotation.Tag;
24  import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
25  import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
26  import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
27  import org.apache.myfaces.tobago.component.Facets;
28  import org.apache.myfaces.tobago.component.RendererTypes;
29  import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
30  import org.apache.myfaces.tobago.internal.taglib.declaration.HasLabel;
31  import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
32  import org.apache.myfaces.tobago.internal.taglib.declaration.IsVisual;
33  
34  import javax.faces.component.UIColumn;
35  
36  /**
37   * Renders a UIComponent that represents a single column of data within a
38   * parent UISheet component.
39   */
40  @Tag(name = "column")
41  @UIComponentTag(
42      uiComponent = "org.apache.myfaces.tobago.component.UIColumn",
43      uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIColumn",
44      uiComponentFacesClass = "javax.faces.component.UIColumn",
45      componentFamily = UIColumn.COMPONENT_FAMILY,
46      rendererType = RendererTypes.COLUMN,
47      facets = {
48          @Facet(name = Facets.DROP_DOWN_MENU, description = "Contains a UIMenu instance to render a drop down menu.",
49              allowedChildComponenents = "org.apache.myfaces.tobago.Menu")
50      })
51  public interface ColumnTagDeclaration
52      extends HasIdBindingAndRendered, HasLabel, HasTip, IsVisual {
53    /**
54     * Alignment of this column.
55     */
56    @TagAttribute
57    @UIComponentTagAttribute()
58    void setAlign(String align);
59  
60    /**
61     * Flag indicating whether or not this column is sortable.
62     * To make a column sortable the data of the sheet must be one of
63     * <code>java.util.List</code> or <code>Object[]</code>.
64     */
65    @TagAttribute
66    @UIComponentTagAttribute(type = {"boolean"}, defaultValue = "false")
67    void setSortable(String sortable);
68  
69    /**
70     * Flag indicating whether or not the width of this column in a sheet is resizable, by the user.
71     */
72    @TagAttribute
73    @UIComponentTagAttribute(type = {"boolean"}, defaultValue = "true")
74    void setResizable(String resizable);
75  
76    /**
77     * The layout token for this column.
78     * Allowd layout tokens ('*', '&lt;x>*', '&lt;x>px' or '&lt;x>%').
79     * Where '*' is equivalent to '1*'.
80     */
81  /* TBD
82    @TagAttribute
83    @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
84    void setWidth(String width);
85  */
86  }