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