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.HasCurrentMarkup;
30  import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
31  import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
32  import org.apache.myfaces.tobago.internal.taglib.declaration.IsGridLayoutComponentWithDimension;
33  import org.apache.myfaces.tobago.internal.taglib.declaration.IsGridLayoutContainer;
34  
35  import javax.faces.component.UIPanel;
36  
37  /**
38   * Renders a popup panel.
39   * The popup gets a grid layout manager with columns="auto" and rows="auto" as definition.
40   * So a popup should contain only one layout component.
41   * The default layout manager can be overwritten with the layout facet.
42   */
43  @Tag(name = "popup")
44  @UIComponentTag(
45      uiComponent = "org.apache.myfaces.tobago.component.UIPopup",
46      uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIPopup",
47      uiComponentFacesClass = "javax.faces.component.UIPanel",
48      componentFamily = UIPanel.COMPONENT_FAMILY,
49      rendererType = RendererTypes.POPUP,
50      facets = {
51          @Facet(name = Facets.LAYOUT,
52              description = "Contains an instance of AbstractUILayoutBase",
53              allowedChildComponenents = "org.apache.myfaces.tobago.GridLayout")}
54  )
55  public interface PopupTagDeclaration 
56      extends HasIdBindingAndRendered, IsGridLayoutComponentWithDimension, IsGridLayoutContainer,
57      HasMarkup, HasCurrentMarkup {
58  
59    @TagAttribute
60    @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
61    void setModal(String modal);
62    
63    /**
64     * This value will usually be set by the layout manager.
65     *
66     * @param left The left position of this component.
67     */
68    @TagAttribute
69    @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
70    void setLeft(String left);
71  
72    /**
73     * This value will usually be set by the layout manager.
74     *
75     * @param top The top position of this component.
76     */
77    @TagAttribute
78    @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
79    void setTop(String top);
80  
81    /**
82     * Represents the visibility order of the popup. The renderer may implemented this visibility by the CSS z-index.
83     *
84     * @param zIndex The visibility order.
85     */
86    @UIComponentTagAttribute(type = "java.lang.Integer")
87    void setZIndex(String zIndex);
88  
89  }