All Packages Class Hierarchy This Package Previous Next Index
Class com.netobjects.nfx.sitebrowser.SiteTreeCellRenderer
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.JLabel
|
+----com.netobjects.nfx.sitebrowser.SiteTreeCellRenderer
- public class SiteTreeCellRenderer
- extends JLabel
- implements TreeCellRenderer
-
defaultFont
-
-
dmSiteBrowser
-
-
selected
-
-
SelectedBackgroundColor
-
-
SiteTreeCellRenderer(SiteBrowser)
- Constructor.
-
getTreeCellRendererComponent(JTree, Object, boolean, boolean, boolean, int, boolean)
- This is messaged from JTree whenever it needs to get the size
of the component or it wants to draw it.
-
paint(Graphics)
- The paint method is overridden to draw the background correctly.
dmSiteBrowser
static SiteBrowser dmSiteBrowser
defaultFont
protected static Font defaultFont
selected
protected boolean selected
SelectedBackgroundColor
protected static final Color SelectedBackgroundColor
SiteTreeCellRenderer
public SiteTreeCellRenderer(SiteBrowser browser)
- Constructor.
getTreeCellRendererComponent
public Component getTreeCellRendererComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
- This is messaged from JTree whenever it needs to get the size
of the component or it wants to draw it.
This attempts to set the font based on value, which will be
a TreeNode.
paint
public void paint(Graphics g)
- The paint method is overridden to draw the background correctly. JLabel
currently does not allow backgrounds other than white, and it
will also fill behind the icon, something that isn't desirable.
- Overrides:
- paint in class JComponent
All Packages Class Hierarchy This Package Previous Next Index