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.BodyContentDescription;
23  import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
24  import org.apache.myfaces.tobago.apt.annotation.Tag;
25  import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
26  import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
27  import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
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.HasTip;
33  import org.apache.myfaces.tobago.internal.taglib.declaration.IsDisabled;
34  import org.apache.myfaces.tobago.internal.taglib.declaration.IsGridLayoutContainer;
35  
36  import javax.faces.component.UIColumn;
37  
38  /**
39   * Creates a tree node. This component represents a single node inside a tree structure.
40   */
41  @SuppressWarnings("ALL")
42  @Tag(name = "treeNode")
43  @BodyContentDescription(anyTagOf = "<tc:treeIndent>|<tc:treeIcon>|<tc:treeSelect>|<tc:treeLabel>|<tc:treeCommand>")
44  @UIComponentTag(
45      uiComponent = "org.apache.myfaces.tobago.component.UITreeNode",
46      uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUITreeNode",
47      uiComponentFacesClass = "javax.faces.component.UIColumn",
48      componentFamily = UIColumn.COMPONENT_FAMILY,
49      rendererType = RendererTypes.TREE_NODE,
50      allowedChildComponenents = {
51          "org.apache.myfaces.tobago.TreeNode",
52          "org.apache.myfaces.tobago.TreeData"
53      })
54  public interface
55      TreeNodeTagDeclaration
56      extends HasIdBindingAndRendered, HasMarkup, HasCurrentMarkup, HasTip, IsDisabled, IsGridLayoutContainer {
57  
58    /**
59     * Flag indicating if the subnodes are to be displayed.
60     * @deprecated since 2.0.0. Please use the state attribute of the tree with a TreeState
61     */
62    @Deprecated
63    @TagAttribute()
64    @UIComponentTagAttribute(type = "boolean", generate = false, defaultValue = "false")
65    void setExpanded(String expanded);
66  
67    /**
68     * Flag indicating if the node is marked, and should be displayed in a special way.
69     * @deprecated since 2.0.0. Please use the state attribute of the tree with a TreeState
70     */
71    @Deprecated
72    @TagAttribute()
73    @UIComponentTagAttribute(type = "boolean", generate = false, defaultValue = "false")
74    void setMarked(String marked);
75  
76    /**
77     * Flag indicating if the node is selected (only possible, when the tree component allows it).
78     * @deprecated since 2.0.0. Please use <code>&lt;tc:treeSelect></code>
79     */
80    @Deprecated
81    @TagAttribute()
82    @UIComponentTagAttribute(type = "boolean", generate = false, defaultValue = "false")
83    void setSelected(String selected);
84  
85    /**
86     * Method binding representing a expansionListener method that ....
87     */
88    @TagAttribute
89    @UIComponentTagAttribute(type = {},
90        generate = false,
91        expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
92        methodSignature = "org.apache.myfaces.tobago.event.TreeExpansionEvent")
93    void setTreeExpansionListener(String treeExpansionListener);
94  
95    /**
96     * Method binding representing a markedListener method that ....
97     */
98    @TagAttribute
99    @UIComponentTagAttribute(type = {},
100       generate = false,
101       expression = DynamicExpression.METHOD_EXPRESSION_REQUIRED,
102       methodSignature = "org.apache.myfaces.tobago.event.TreeMarkedEvent")
103   void setTreeMarkedListener(String treeMarkedListener);
104 
105   @TagAttribute
106   @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.layout.Measure")
107   void setWidth(String width);
108 }