This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 29282
Collapse All | Expand All

(-)ActionsPanel.java (+26 lines)
Line 16 Link Here
16
import java.awt.Component;
Line 28 Link Here
29
import javax.swing.JTree;
30
import javax.swing.tree.DefaultTreeCellRenderer;
Line 94 Link Here
97
        actionsTree.setCellRenderer(new ActionsPanel.ActionTreeRenderer());
Line 515 Link Here
519
    }
520
    /** Tree renderer. Icons of Actions added. 
521
     */ 
522
    private static class ActionTreeRenderer extends DefaultTreeCellRenderer {
523
        public Component getTreeCellRendererComponent(
524
                        JTree tree,
525
                        Object value,
526
                        boolean sel,
527
                        boolean expanded,
528
                        boolean leaf,
529
                        int row,
530
                        boolean hasFocus) {
531
           super.getTreeCellRendererComponent(
532
                        tree, value, sel,
533
                        expanded, leaf, row,
534
                        hasFocus);
535
           if (value instanceof ActionNode) {
536
               ActionNode node = (ActionNode) value;
537
               setIcon(node.getAction().getIcon());
538
           }
539
           return this;             
540
        }

Return to bug 29282