001    package org.apache.myfaces.tobago.taglib.component;
002    
003    /*
004     * Licensed to the Apache Software Foundation (ASF) under one or more
005     * contributor license agreements.  See the NOTICE file distributed with
006     * this work for additional information regarding copyright ownership.
007     * The ASF licenses this file to You under the Apache License, Version 2.0
008     * (the "License"); you may not use this file except in compliance with
009     * the License.  You may obtain a copy of the License at
010     *
011     *      http://www.apache.org/licenses/LICENSE-2.0
012     *
013     * Unless required by applicable law or agreed to in writing, software
014     * distributed under the License is distributed on an "AS IS" BASIS,
015     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016     * See the License for the specific language governing permissions and
017     * limitations under the License.
018     */
019    
020    import org.apache.myfaces.tobago.apt.annotation.BodyContent;
021    import org.apache.myfaces.tobago.apt.annotation.Tag;
022    import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
023    import org.apache.myfaces.tobago.taglib.decl.HasBinding;
024    import org.apache.myfaces.tobago.taglib.decl.HasBorder;
025    import org.apache.myfaces.tobago.taglib.decl.HasCellspacing;
026    import org.apache.myfaces.tobago.taglib.decl.HasColumnLayout;
027    import org.apache.myfaces.tobago.taglib.decl.HasId;
028    import org.apache.myfaces.tobago.taglib.decl.HasMargin;
029    import org.apache.myfaces.tobago.taglib.decl.HasMargins;
030    import org.apache.myfaces.tobago.taglib.decl.HasRowLayout;
031    
032    /*
033     * Date: 14.03.2006
034     * Time: 16:58:13
035     */
036    
037    /**
038     * Renders a GridLayout.
039     * <pre>
040     * columns/rows ::= LAYOUT
041     * LAYOUT       ::= TOKEN [";" TOKEN]+
042     * TOKEN        ::= FIXED | PIXEL | PROPORTIONAL
043     * FIXED        ::= "fixed"
044     * PIXEL        ::= NUMBER "px"
045     * PROPORTIONAL ::= [NUMBER] "*"
046     * </pre>
047     * <p/>
048     * <table border="1">
049     * <tr>
050     * <th>Parent</th>
051     * <th>Child</th>
052     * <th>Okay?</th>
053     * <th>Remarks</th>
054     * </tr>
055     * <tr>
056     * <td>FIXED</td>
057     * <td>any combination of FIXED or PIXEL but no PROPORTIONAL</td>
058     * <td>okay</td>
059     * <td>-</td>
060     * </tr>
061     * <tr>
062     * <td>FIXED</td>
063     * <td>any combination with at least one PROPORTIONAL</td>
064     * <td>wrong</td>
065     * <td>LayoutManager cannot compute the fixed value.</td>
066     * </tr>
067     * <tr>
068     * <td>PIXEL</td>
069     * <td>any combination of FIXED or PIXEL but no PROPORTIONAL</td>
070     * <td>potentially wrong</td>
071     * <td>The values depend on each other, the programmer has to keep consistency manually.</td>
072     * </tr>
073     * <tr>
074     * <td>PIXEL</td>
075     * <td>any combination with at least one PROPORTIONAL</td>
076     * <td>okay</td>
077     * <td>-</td>
078     * </tr>
079     * <tr>
080     * <td>PROPORTIONAL</td>
081     * <td>any combination of FIXED or PIXEL but no PROPORTIONAL</td>
082     * <td>potentially wrong</td>
083     * <td>No automatical matching:<ul><li>too little space: scrollbar</li>
084     * <li>too much space: elements will be spreaded.</li></ul></td>
085     * </tr>
086     * <tr>
087     * <td>PROPORTIONAL</td>
088     * <td>any combination with at least one PROPORTIONAL</td>
089     * <td>okay</td>
090     * <td>-</td>
091     * </tr>
092     * </table>
093     */
094    @Tag(name = "gridLayout", bodyContent = BodyContent.EMPTY)
095    @UIComponentTag(
096        uiComponent = "org.apache.myfaces.tobago.component.UIGridLayout",
097        rendererType = "GridLayout")
098    public interface GridLayoutTagDeclaration extends TobagoTagDeclaration, HasId, HasBorder, HasCellspacing, HasMargin,
099        HasMargins, HasColumnLayout, HasRowLayout, HasBinding {
100    }