KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > console > manager > interfaces > impl > SimpleResourceTreeNode


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.console.manager.interfaces.impl;
23
24 import org.jboss.console.manager.interfaces.ManageableResource;
25 import org.jboss.console.manager.interfaces.ResourceTreeNode;
26 import org.jboss.console.manager.interfaces.TreeAction;
27 import org.jboss.console.manager.interfaces.TreeNode;
28 import org.jboss.console.manager.interfaces.TreeNodeMenuEntry;
29
30 /**
31  * <description>
32  *
33  * @see <related>
34  *
35  * @author <a HREF="mailto:sacha.labourey@cogito-info.ch">Sacha Labourey</a>.
36  * @version $Revision: 37459 $
37  *
38  * <p><b>Revisions:</b>
39  *
40  * <p><b>31 d�c. 2002 Sacha Labourey:</b>
41  * <ul>
42  * <li> First implementation </li>
43  * </ul>
44  */

45 public class SimpleResourceTreeNode
46    extends SimpleTreeNode
47    implements ResourceTreeNode
48 {
49
50    protected ManageableResource resource = null;
51    protected int visibility = ResourceTreeNode.ALWAYS_VISIBLE;
52
53    public SimpleResourceTreeNode()
54    {
55       super();
56    }
57
58    public SimpleResourceTreeNode(
59       String JavaDoc name,
60       String JavaDoc description,
61       String JavaDoc icon,
62       TreeAction action,
63       TreeNodeMenuEntry[] menuEntries,
64       TreeNode[] subNodes,
65       ResourceTreeNode[] nodeManagableResources)
66    {
67       super(
68          name,
69          description,
70          icon,
71          action,
72          menuEntries,
73          subNodes,
74          nodeManagableResources);
75    }
76
77    public SimpleResourceTreeNode(
78       String JavaDoc name,
79       String JavaDoc description,
80       String JavaDoc icon,
81       TreeAction action,
82       TreeNodeMenuEntry[] menuEntries,
83       TreeNode[] subNodes,
84       ResourceTreeNode[] nodeManagableResources,
85       ManageableResource resource)
86    {
87       super(
88          name,
89          description,
90          icon,
91          action,
92          menuEntries,
93          subNodes,
94          nodeManagableResources);
95       
96       this.resource = resource;
97    }
98
99    public ManageableResource getResource()
100    {
101       return this.resource;
102    }
103
104
105    public int getVisibility()
106    {
107       return visibility;
108    }
109
110    public ResourceTreeNode setVisibility(int visibility)
111    {
112       this.visibility = visibility;
113       return this;
114    }
115
116 }
117
Popular Tags