1 12 13 package org.eclipse.jface.viewers; 14 15 21 public class TreeColumnViewerLabelProvider extends 22 TableColumnViewerLabelProvider { 23 private ITreePathLabelProvider treePathProvider = new ITreePathLabelProvider() { 24 30 public void updateLabel(ViewerLabel label, TreePath elementPath) { 31 33 } 34 35 40 public void dispose() { 41 43 } 44 45 50 public void addListener(ILabelProviderListener listener) { 51 53 } 54 55 60 public void removeListener(ILabelProviderListener listener) { 61 63 } 64 65 68 public boolean isLabelProperty(Object element, String property) { 69 return false; 70 } 71 72 }; 73 74 79 public TreeColumnViewerLabelProvider(IBaseLabelProvider labelProvider) { 80 super(labelProvider); 81 } 82 83 89 public void updateLabel(ViewerLabel label, TreePath elementPath) { 90 treePathProvider.updateLabel(label, elementPath); 91 92 } 93 94 99 public void setProviders(Object provider) { 100 super.setProviders(provider); 101 if (provider instanceof ITreePathLabelProvider) 102 treePathProvider = (ITreePathLabelProvider) provider; 103 } 104 105 110 public ITreePathLabelProvider getTreePathProvider() { 111 return treePathProvider; 112 } 113 114 } 115 | Popular Tags |