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.component;
21  
22  public enum Facets {
23  
24    after,
25    action,
26    bar,
27    before,
28    blur(true),
29    brand,
30    change(true),
31    checkbox,
32    click(true),
33    complete,
34    confirmation,
35    constraints,
36    contextMenu,
37    /**
38     * @deprecated since 3.0.0. is no longer supported, use explicit header facet in sheet.
39     */
40    @Deprecated
41    dropDownMenu,
42    focus(true),
43    hover(true),
44    label,
45    /**
46     * @deprecated since 3.0.0. The layout manager tag should surround the content instead.
47     */
48    @Deprecated
49    layout,
50    layoutDefault,
51    /**
52     * @deprecated since 3.0.0. Menu bar is no longer supported.
53     */
54    @Deprecated
55    menuBar,
56    pagerPage,
57    pagerPageDirect,
58    pagerRow,
59    /**
60     * @deprecated since 3.0.0. Popup can now be placed normally in the code.
61     */
62    @Deprecated
63    popup,
64    radio,
65    reload(true),
66    resize,
67    sorter,
68    toolBar;
69  
70    private boolean event;
71  
72    Facets() {
73    }
74  
75    Facets(boolean event) {
76      this.event = event;
77    }
78  
79    public static final String AFTER = "after";
80    public static final String ACTION = "action";
81    public static final String BAR = "bar";
82    public static final String BEFORE = "before";
83    public static final String BLUR = "blur";
84    public static final String BRAND = "brand";
85    public static final String CHANGE = "change";
86    public static final String CHECKBOX = "checkbox";
87    public static final String CLICK = "click";
88    public static final String COMPLETE = "complete";
89    public static final String CONFIRMATION = "confirmation";
90    public static final String CONSTRAINTS = "constraints";
91    public static final String CONTEXT_MENU = "contextMenu";
92    /**
93     * @deprecated since 3.0.0. is no longer supported, use explicit header facet in sheet.
94     */
95    @Deprecated
96    public static final String DROP_DOWN_MENU = "dropDownMenu";
97    public static final String FOCUS = "focus";
98    public static final String HOVER = "hover";
99    public static final String LABEL = "label";
100   /**
101    * @deprecated since 3.0.0. The layout manager tag should surround the content instead.
102    */
103   @Deprecated
104   public static final String LAYOUT = "layout";
105   public static final String LAYOUT_DEFAULT = "layoutDefault";
106   /**
107    * @deprecated since 3.0.0. Menu bar is no longer supported.
108    */
109   @Deprecated
110   public static final String MENU_BAR = "menuBar";
111   public static final String PAGER_PAGE = "pagerPage";
112   public static final String PAGER_PAGE_DIRECT = "pagerPageDirect";
113   public static final String PAGER_ROW = "pagerRow";
114   public static final String POPUP = "popup";
115   public static final String RADIO = "radio";
116   public static final String RELOAD = "reload";
117   public static final String RESIZE = "resize";
118   public static final String SORTER = "sorter";
119   public static final String TOOL_BAR = "toolBar";
120 
121   public static boolean isEvent(final String string) {
122     try {
123       return valueOf(string).event;
124     } catch (IllegalArgumentException e) {
125       // ignore
126       return false;
127     }
128   }
129 }