- Timestamp:
- 2004-12-17T16:50:46+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionTree.java
r8846 r8853 27 27 package org.greenstone.gatherer.collection; 28 28 29 import java.awt.*; 30 import javax.swing.*; 29 31 import org.greenstone.gatherer.gui.tree.DragTree; 32 import org.greenstone.gatherer.gui.tree.DragTreeCellRenderer; 30 33 31 34 … … 36 39 { 37 40 super(name, collection_tree_model, mixed_selection); 41 setCellRenderer(new CollectionTreeCellRenderer()); 42 } 43 44 45 private class CollectionTreeCellRenderer 46 extends DragTreeCellRenderer 47 { 48 public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) 49 { 50 JLabel tree_cell = (JLabel) super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); 51 52 // Mark explodable files with a different icon 53 if (value instanceof CollectionTreeNode && ((CollectionTreeNode) value).isExplodable()) { 54 tree_cell.setIcon(CollectionTreeNode.GREEN_FILE); 55 } 56 57 return tree_cell; 58 } 38 59 } 39 60 }
Note:
See TracChangeset
for help on using the changeset viewer.