javax.help.plaf.basic

Class BasicTOCCellRenderer


public class BasicTOCCellRenderer
extends DefaultTreeCellRenderer

Basic cell renderer for TOC UI.

Field Summary

protected Map
map
protected TOCView
view

Constructor Summary

BasicTOCCellRenderer(Map map)
BasicTOCCellRenderer(Map map, TOCView view)

Method Summary

Icon
getClosedIcon()
Icon
getLeafIcon()
Icon
getOpenIcon()
Component
getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus)
Configures the renderer based on the components passed in.

Field Details

map

protected Map map

view

protected TOCView view

Constructor Details

BasicTOCCellRenderer

public BasicTOCCellRenderer(Map map)

BasicTOCCellRenderer

public BasicTOCCellRenderer(Map map,
                            TOCView view)

Method Details

getClosedIcon

public Icon getClosedIcon()

getLeafIcon

public Icon getLeafIcon()

getOpenIcon

public Icon getOpenIcon()

getTreeCellRendererComponent

public Component getTreeCellRendererComponent(JTree tree,
                                              Object value,
                                              boolean sel,
                                              boolean expanded,
                                              boolean leaf,
                                              int row,
                                              boolean hasFocus)
Configures the renderer based on the components passed in. Sets the value from messaging value with toString(). The foreground color is set based on the selection and the icon is set based on on leaf and expanded.