de.jaret.util.ui.timebars.swing.renderer
Class DefaultHierarchyRenderer

java.lang.Object
  extended by de.jaret.util.ui.timebars.swing.renderer.DefaultHierarchyRenderer
All Implemented Interfaces:
HierarchyRenderer

public class DefaultHierarchyRenderer
extends java.lang.Object
implements HierarchyRenderer

Default implementation of a swing hierarchy renderer.

Version:
$Id: DefaultHierarchyRenderer.java 800 2008-12-27 22:27:33Z kliem $
Author:
kliem

Constructor Summary
DefaultHierarchyRenderer()
          Default constructor.
 
Method Summary
 javax.swing.JComponent getHierarchyRendererComponent(TimeBarViewer tbv, TimeBarRow row, boolean selected, boolean expanded, boolean leaf, int level, int depth)
          Provide a configured JComponent for rendering the hierarchy.
 int getWidth()
          Return the preferred width for the hierachy display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHierarchyRenderer

public DefaultHierarchyRenderer()
Default constructor.

Method Detail

getHierarchyRendererComponent

public javax.swing.JComponent getHierarchyRendererComponent(TimeBarViewer tbv,
                                                            TimeBarRow row,
                                                            boolean selected,
                                                            boolean expanded,
                                                            boolean leaf,
                                                            int level,
                                                            int depth)
Provide a configured JComponent for rendering the hierarchy.

Specified by:
getHierarchyRendererComponent in interface HierarchyRenderer
Parameters:
tbv - the requesting timebar viewer
row - the row (node) for which the hierarchy should be painted
selected - wehether the row is selscted or not
expanded - expanded status of the row
leaf - if true the row is a leaf
level - level in the tree of the current element
depth - depth of the tree. If the depth is not known a value of -1 will indicate this fact.
Returns:
the configured JComponent for rendering

getWidth

public int getWidth()
Return the preferred width for the hierachy display.

Specified by:
getWidth in interface HierarchyRenderer
Returns:
preferred with or -1 for "don't care"


Copyright © 2012. All Rights Reserved.