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     * Created by IntelliJ IDEA.
034     * User: bommel
035     * Date: 14.03.2006
036     * Time: 16:58:13
037     */
038    
039    /**
040     * Renders a GridLayout.
041     * <pre>
042     * columns/rows ::= LAYOUT
043     * LAYOUT       ::= TOKEN [";" TOKEN]+
044     * TOKEN        ::= FIXED | PIXEL | PROPORTIONAL
045     * FIXED        ::= "fixed"
046     * PIXEL        ::= NUMBER "px"
047     * PROPORTIONAL ::= [NUMBER] "*"
048     * </pre>
049    
050     <table border="1">
051       <tr>
052         <th>Parent</th>
053         <th>Child</th>
054         <th>Okay?</th>
055         <th>Remarks</th>
056       </tr>
057       <tr>
058         <td>FIXED</td>
059         <td>any combination of FIXED or PIXEL but no PROPORTIONAL</td>
060         <td>okay</td>
061         <td>-</td>
062       </tr>
063       <tr>
064         <td>FIXED</td>
065         <td>any combination with at least one PROPORTIONAL</td>
066         <td>wrong</td>
067         <td>LayoutManager cannot compute the fixed value.</td>
068       </tr>
069       <tr>
070         <td>PIXEL</td>
071         <td>any combination of FIXED or PIXEL but no PROPORTIONAL</td>
072         <td>potentially wrong</td>
073         <td>The values depend on each other, the programmer has to keep consistency manually.</td>
074       </tr>
075       <tr>
076         <td>PIXEL</td>
077         <td>any combination with at least one PROPORTIONAL</td>
078         <td>okay</td>
079         <td>-</td>
080       </tr>
081       <tr>
082         <td>PROPORTIONAL</td>
083         <td>any combination of FIXED or PIXEL but no PROPORTIONAL</td>
084         <td>potentially wrong</td>
085         <td>No automatical matching:<ul><li>too little space: scrollbar</li>
086           <li>too much space: elements will be spreaded.</li></ul></td>
087       </tr>
088       <tr>
089         <td>PROPORTIONAL</td>
090         <td>any combination with at least one PROPORTIONAL</td>
091         <td>okay</td>
092         <td>-</td>
093       </tr>
094     </table>
095    
096     
097     */
098    @Tag(name = "gridLayout", bodyContent = BodyContent.EMPTY)
099    @UIComponentTag(
100        uiComponent = "org.apache.myfaces.tobago.component.UIGridLayout",
101        rendererType = "GridLayout")
102    public interface GridLayoutTagDeclaration extends TobagoTagDeclaration, HasId, HasBorder, HasCellspacing, HasMargin,
103        HasMargins, HasColumnLayout, HasRowLayout, HasBinding {
104    }