001    package org.apache.myfaces.tobago.renderkit;
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    
021    import javax.faces.component.UIComponent;
022    import javax.faces.context.FacesContext;
023    import java.awt.Dimension;
024    import java.io.IOException;
025    
026    public abstract class AbstractLayoutableRendererBaseWrapper extends AbstractRendererBaseWrapper
027        implements LayoutableRenderer {
028    
029      public final int getHeaderHeight(FacesContext facesContext, UIComponent component) {
030        return getLayoutableRenderer(facesContext).getHeaderHeight(facesContext, component);
031      }
032    
033      public final int getPaddingWidth(FacesContext facesContext, UIComponent component) {
034        return getLayoutableRenderer(facesContext).getPaddingWidth(facesContext, component);
035      }
036    
037      public final int getPaddingHeight(FacesContext facesContext, UIComponent component) {
038         return getLayoutableRenderer(facesContext).getPaddingHeight(facesContext, component);
039      }
040    
041      public final int getComponentExtraWidth(FacesContext facesContext, UIComponent component) {
042         return getLayoutableRenderer(facesContext).getComponentExtraWidth(facesContext, component);
043      }
044    
045      public final int getComponentExtraHeight(FacesContext facesContext, UIComponent component) {
046         return getLayoutableRenderer(facesContext).getComponentExtraHeight(facesContext, component);
047      }
048    
049      public final int getMinimumWidth(FacesContext facesContext, UIComponent component) {
050         return getLayoutableRenderer(facesContext).getMinimumWidth(facesContext, component);
051      }
052    
053      public final int getMinimumHeight(FacesContext facesContext, UIComponent component) {
054         return getLayoutableRenderer(facesContext).getMinimumHeight(facesContext, component);
055      }
056    
057      public final Dimension getMinimumSize(FacesContext facesContext, UIComponent component) {
058         return getLayoutableRenderer(facesContext).getMinimumSize(facesContext, component);
059      }
060    
061      public final int getFixedWidth(FacesContext facesContext, UIComponent component) {
062         return getLayoutableRenderer(facesContext).getFixedWidth(facesContext, component);
063      }
064    
065      public final int getFixedHeight(FacesContext facesContext, UIComponent component) {
066         return getLayoutableRenderer(facesContext).getFixedHeight(facesContext, component);
067      }
068    
069      public final void layoutBegin(FacesContext facesContext, UIComponent component) throws IOException {
070        getLayoutableRenderer(facesContext).layoutBegin(facesContext, component);
071      }
072    
073      public final void layoutEnd(FacesContext facesContext, UIComponent component) throws IOException {
074        getLayoutableRenderer(facesContext).layoutEnd(facesContext, component);
075      }
076    
077      protected final LayoutableRenderer getLayoutableRenderer(FacesContext facesContext) {
078        return (LayoutableRenderer) getRenderer(facesContext);
079    
080      }
081    
082    }