1 13 14 package org.eclipse.jface.viewers; 15 16 import org.eclipse.swt.SWT; 17 import org.eclipse.swt.custom.CLabel; 18 import org.eclipse.swt.graphics.Color; 19 import org.eclipse.swt.graphics.Font; 20 import org.eclipse.swt.graphics.Image; 21 import org.eclipse.swt.graphics.Point; 22 23 32 public abstract class CellLabelProvider extends BaseLabelProvider { 33 34 37 public CellLabelProvider() { 38 super(); 39 } 40 41 48 static CellLabelProvider createViewerLabelProvider( 49 ColumnViewer viewer, IBaseLabelProvider labelProvider) { 50 51 boolean noColumnTreeViewer = viewer instanceof AbstractTreeViewer && viewer 52 .doGetColumnCount() == 0; 53 54 if (!noColumnTreeViewer 55 && (labelProvider instanceof ITableLabelProvider 56 || labelProvider instanceof ITableColorProvider || labelProvider instanceof ITableFontProvider)) 57 return new TableColumnViewerLabelProvider(labelProvider); 58 if (labelProvider instanceof CellLabelProvider) 59 return (CellLabelProvider) labelProvider; 60 return new WrappedViewerLabelProvider(labelProvider); 61 62 } 63 64 77 78 public Image getToolTipImage(Object object) { 79 return null; 80 } 81 82 96 public String getToolTipText(Object element) { 97 return null; 98 } 99 100 110 public Color getToolTipBackgroundColor(Object object) { 111 return null; 112 } 113 114 123 public Color getToolTipForegroundColor(Object object) { 124 return null; 125 } 126 127 135 public Font getToolTipFont(Object object) { 136 return null; 137 } 138 139 151 public Point getToolTipShift(Object object) { 152 return null; 153 } 154 155 172 public boolean useNativeToolTip(Object object) { 173 return false; 174 } 175 176 183 public int getToolTipTimeDisplayed(Object object) { 184 return 0; 185 } 186 187 194 public int getToolTipDisplayDelayTime(Object object) { 195 return 0; 196 } 197 198 207 public int getToolTipStyle(Object object) { 208 return SWT.SHADOW_NONE; 209 } 210 211 217 public abstract void update(ViewerCell cell); 218 219 } 220 | Popular Tags |