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 package org.apache.myfaces.custom.layout; 20 21 import javax.faces.component.UIComponent; 22 import javax.faces.component.html.HtmlPanelGroup; 23 24 import org.apache.myfaces.component.AlignProperty; 25 import org.apache.myfaces.component.DataProperties; 26 import org.apache.myfaces.component.EventAware; 27 import org.apache.myfaces.component.PanelProperties; 28 import org.apache.myfaces.component.UniversalProperties; 29 30 /** 31 * Determines where its children are positioned within the page 32 * relative to each other, similar to a Swing layout component. 33 * 34 * Unless otherwise specified, all attributes accept static values 35 * or EL expressions. 36 * 37 * @JSFComponent 38 * name = "t:panelLayout" 39 * class = "org.apache.myfaces.custom.layout.HtmlPanelLayout" 40 * tagClass = "org.apache.myfaces.custom.layout.HtmlPanelLayoutTag" 41 * @since 1.1.7 42 * @author Manfred Geiler (latest modification by $Author: lu4242 $) 43 * @version $Revision: 691856 $ $Date: 2008-09-03 21:40:30 -0500 (Wed, 03 Sep 2008) $ 44 */ 45 public abstract class AbstractHtmlPanelLayout 46 extends HtmlPanelGroup implements 47 AlignProperty, UniversalProperties, EventAware, DataProperties, 48 PanelProperties 49 { 50 //private static final Log log = LogFactory.getLog(HtmlPanelLayout.class); 51 public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlPanelLayout"; 52 public static final String COMPONENT_FAMILY = "javax.faces.Panel"; 53 private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Layout"; 54 55 private static final int DEFAULT_BORDER = Integer.MIN_VALUE; 56 private static final String DEFAULT_LAYOUT = "classic"; 57 58 // typesafe facet getters 59 60 /** 61 * @JSFFacet 62 */ 63 public UIComponent getHeader() 64 { 65 return (UIComponent)getFacet("header"); 66 } 67 68 /** 69 * @JSFFacet 70 */ 71 public UIComponent getNavigation() 72 { 73 return (UIComponent)getFacet("navigation"); 74 } 75 76 /** 77 * @JSFFacet 78 */ 79 public UIComponent getBody() 80 { 81 return (UIComponent)getFacet("body"); 82 } 83 84 /** 85 * @JSFFacet 86 */ 87 public UIComponent getFooter() 88 { 89 return (UIComponent)getFacet("footer"); 90 } 91 92 /** 93 * The CSS class to be applied to footer cells. 94 * 95 * @JSFProperty 96 */ 97 public abstract String getFooterClass(); 98 99 /** 100 * The CSS class to be applied to header cells. 101 * 102 * @JSFProperty 103 */ 104 public abstract String getHeaderClass(); 105 106 /** 107 * <pre> 108 * layout | header | navigation | body | footer 109 * =================|========|============|=======|======== 110 * classic (Default)| top | left | right | bottom 111 * navigationRight | top | right | left | bottom 112 * upsideDown | bottom | left | right | top 113 * </pre> 114 * 115 * @JSFProperty 116 * defaultValue="classic" 117 */ 118 public abstract String getLayout(); 119 120 /** 121 * CSS class to be used for the table cell. 122 * 123 * @JSFProperty 124 */ 125 public abstract String getNavigationClass(); 126 127 /** 128 * CSS class to be used for the table cell. 129 * 130 * @JSFProperty 131 */ 132 public abstract String getBodyClass(); 133 134 /** 135 * CSS class to be used for the table cell. 136 * 137 * @JSFProperty 138 */ 139 public abstract String getHeaderStyle(); 140 141 /** 142 * CSS class to be used for the table cell. 143 * 144 * @JSFProperty 145 */ 146 public abstract String getNavigationStyle(); 147 148 /** 149 * CSS class to be used for the table cell. 150 * 151 * @JSFProperty 152 */ 153 public abstract String getBodyStyle(); 154 155 /** 156 * CSS class to be used for the table cell. 157 * 158 * @JSFProperty 159 */ 160 public abstract String getFooterStyle(); 161 162 }