All Packages Class Hierarchy This Package Previous Next Index
Class xt.xt_TreeCellRenderer
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.JLabel
|
+----xt.xt_TreeCellRenderer
- public class xt_TreeCellRenderer
- extends JLabel
- implements TreeCellRenderer
xt_TreeCellRenderer draws an XML node within a tree.
-
CollapsedIcon
- Icon to use when the item is collapsed.
-
DefaultFont
- Font used if the string to be displayed isn't a font.
-
ExpandedIcon
- Icon to use when the item is expanded.
-
SelectedBackgroundColor
- Colour to use for the background when selected.
-
SelectedFlag
- Whether or not the item that was last configured is selected.
-
xt_TreeCellRenderer()
- 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)
- paint is subclassed to draw the background correctly.
SelectedFlag
protected boolean SelectedFlag
- Whether or not the item that was last configured is selected.
DefaultFont
protected static Font DefaultFont
- Font used if the string to be displayed isn't a font.
CollapsedIcon
protected static ImageIcon CollapsedIcon
- Icon to use when the item is collapsed.
ExpandedIcon
protected static ImageIcon ExpandedIcon
- Icon to use when the item is expanded.
SelectedBackgroundColor
protected static final Color SelectedBackgroundColor
- Colour to use for the background when selected.
xt_TreeCellRenderer
public xt_TreeCellRenderer()
- Constructor.
getTreeCellRendererComponent
public Component getTreeCellRendererComponent(JTree InputTree,
Object InputNode,
boolean InputSelectedFlag,
boolean InputExpandedFlag,
boolean InputLeafFlag,
int InputRowNum,
boolean InputHasFocusFlag)
- 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 InputGraphics)
- paint is subclassed to draw the background correctly. JLabel currently
does not allow backgrounds other than white, and it also fills behind the
icon (which isn't desirable).
- Overrides:
- paint in class JComponent
All Packages Class Hierarchy This Package Previous Next Index