Does this mean that after any drag_n_drop other nodes have their icon changed to the icon of the node that was just dropped?
;Map <String, ImageIcon> iconMap
class PseudoRenderer extends DefaultTreeCellRenderer {
Map iconMap;
DataStore datastore;
public PseudoRenderer(Map iconMap) {
...
// Cast is required for non-generics.
// ImageIcon icon = (ImageIcon)iconMap.get(key);
protected boolean isFish(Object value) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
Animal nodeInfo = (Animal)(node.getUserObject());
String title = nodeInfo.animalName;
if (title.indexOf("Fish") >= 0) {
return true;
}
There is no "i" in denial. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|