1 11 package org.eclipse.jface.viewers; 12 13 import java.util.EventObject ; 14 15 20 public class LabelProviderChangedEvent extends EventObject { 21 22 26 private static final long serialVersionUID = 3258410612479309878L; 27 28 31 private Object [] elements; 32 33 39 public LabelProviderChangedEvent(IBaseLabelProvider source) { 40 super(source); 41 } 42 43 50 public LabelProviderChangedEvent(IBaseLabelProvider source, 51 Object [] elements) { 52 super(source); 53 this.elements = elements; 54 } 55 56 63 public LabelProviderChangedEvent(IBaseLabelProvider source, Object element) { 64 super(source); 65 this.elements = new Object [1]; 66 this.elements[0] = element; 67 } 68 69 75 public Object getElement() { 76 if (this.elements == null || this.elements.length == 0) { 77 return null; 78 } else { 79 return this.elements[0]; 80 } 81 } 82 83 89 public Object [] getElements() { 90 if (this.elements == null) { 91 return null; 92 } else { 93 return this.elements; 94 } 95 } 96 } 97 | Popular Tags |