com.tensegrity.gui.swing.control.attributetree
Class AttributeTreeRenderer

java.lang.Object
  extended bycom.tensegrity.gui.swing.control.attributetree.AttributeTreeRenderer
All Implemented Interfaces:
javax.swing.table.TableCellRenderer

public class AttributeTreeRenderer
extends java.lang.Object
implements javax.swing.table.TableCellRenderer

The TableCellRenderer for the SwingAttributeTree.

Version:
$Id: AttributeTreeRenderer.java,v 1.21 2006/02/10 14:19:09 BurkhardWick Exp $
Author:
BurkhardWick

Field Summary
static int LEVEL_INDENTATION
          The indentation in pixels of a tree level
 
Constructor Summary
AttributeTreeRenderer(SwingAttributeTree tree)
          Constructor
 
Method Summary
 void configureIcon(AttributeTreeNode node, AttributeTreeIcon icon)
          Configures look and feel settings of the icon
 java.awt.Rectangle getHandleBounds(int row, AttributeTreeNode node)
          Returns the bounds of the expand/collapse handle of the given row and node
 int getIndent(AttributeTreeNode node)
          Returns the indendation of the given node
 java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, boolean hasFocus, int row, int column)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LEVEL_INDENTATION

public static final int LEVEL_INDENTATION
The indentation in pixels of a tree level

See Also:
Constant Field Values
Constructor Detail

AttributeTreeRenderer

public AttributeTreeRenderer(SwingAttributeTree tree)
Constructor

Parameters:
tree - The tree this renderer belongs to
Method Detail

getTableCellRendererComponent

public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
                                                        java.lang.Object value,
                                                        boolean isSelected,
                                                        boolean hasFocus,
                                                        int row,
                                                        int column)
Specified by:
getTableCellRendererComponent in interface javax.swing.table.TableCellRenderer

getHandleBounds

public java.awt.Rectangle getHandleBounds(int row,
                                          AttributeTreeNode node)
Returns the bounds of the expand/collapse handle of the given row and node

Parameters:
row - The row containing the handle
node - The node the handle belongs to
Returns:
The bounds in pixels of the handle

getIndent

public int getIndent(AttributeTreeNode node)
Returns the indendation of the given node

Parameters:
node - The node for which the indendation should be retrieved
Returns:
the indendation of the given node

configureIcon

public void configureIcon(AttributeTreeNode node,
                          AttributeTreeIcon icon)
Configures look and feel settings of the icon

Parameters:
node - The node to configure the icon for
icon - The icon to configure


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.