View Javadoc

1   /*
2      Copyright 2002-2006 Martin van den Bemt
3   
4      Licensed under the Apache License, Version 2.0 (the "License");
5      you may not use this file except in compliance with the License.
6      You may obtain a copy of the License at
7   
8          http://www.apache.org/licenses/LICENSE-2.0
9   
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15  */
16  package org.xulux.guilayer.swing.models;
17  
18  import java.awt.Component;
19  
20  import javax.swing.JTree;
21  import javax.swing.tree.DefaultTreeCellRenderer;
22  
23  import org.xulux.api.gui.IWidget;
24  
25  /**
26   *
27   * @author <a href="mailto:martin@mvdb.net">Martin van den Bemt</a>
28   * @version $Id: XuluxTreeCellRenderer.java,v 1.1 2005/12/18 12:58:21 mvdb Exp $
29   */
30  public class XuluxTreeCellRenderer extends DefaultTreeCellRenderer {
31  
32    protected IWidget widget;
33  
34    /**
35     * 
36     */
37    public XuluxTreeCellRenderer(IWidget widget) {
38      super();
39      this.widget = widget;
40    }
41  
42    /**
43     * @see javax.swing.tree.TreeCellRenderer#getTreeCellRendererComponent(javax.swing.JTree, java.lang.Object, boolean, boolean, boolean, int, boolean)
44     */
45    public Component getTreeCellRendererComponent(
46      JTree tree,
47      Object value,
48      boolean sel,
49      boolean expanded,
50      boolean leaf,
51      int row,
52      boolean hasFocus) {
53      return super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
54    }
55  
56  }