1 11 12 package org.eclipse.ui.views.markers.internal; 13 14 import org.eclipse.swt.graphics.Image; 15 16 20 public class FieldFolder extends AbstractField { 21 22 25 public FieldFolder() { 26 } 27 28 32 public String getDescription() { 33 return MarkerMessages.description_folder; 34 } 35 36 40 public Image getDescriptionImage() { 41 return null; 42 } 43 44 48 public String getColumnHeaderText() { 49 return MarkerMessages.description_folder; 50 } 51 52 56 public Image getColumnHeaderImage() { 57 return null; 58 } 59 60 64 public String getValue(Object obj) { 65 if (obj == null || !(obj instanceof ConcreteMarker)) { 66 return Util.EMPTY_STRING; 67 } 68 ConcreteMarker marker = (ConcreteMarker) obj; 69 return marker.getFolder(); 70 } 71 72 76 public Image getImage(Object obj) { 77 return null; 78 } 79 80 84 public int compare(Object obj1, Object obj2) { 85 if (obj1 == null || obj2 == null || !(obj1 instanceof ConcreteMarker) 86 || !(obj2 instanceof ConcreteMarker)) { 87 return 0; 88 } 89 ConcreteMarker marker1 = (ConcreteMarker) obj1; 90 ConcreteMarker marker2 = (ConcreteMarker) obj2; 91 92 return marker1.getFolder().compareTo(marker2.getFolder()); 93 } 94 95 98 public int getDefaultDirection() { 99 return TableComparator.ASCENDING; 100 } 101 102 105 public int getPreferredWidth() { 106 return 150; 107 } 108 109 } 110 | Popular Tags |