1 11 package org.eclipse.pde.internal.ui.elements; 12 13 import org.eclipse.swt.graphics.Image; 14 15 public class NamedElement extends DefaultElement { 16 protected Image image; 17 18 private String name; 19 20 private IPDEElement parent; 21 22 public NamedElement(String name) { 23 this(name, null, null); 24 } 25 26 public NamedElement(String name, Image icon) { 27 this(name, icon, null); 28 } 29 30 public NamedElement(String name, Image image, IPDEElement parent) { 31 this.name = name; 32 this.image = image; 33 this.parent = parent; 34 } 35 36 public Image getImage() { 37 return image; 38 } 39 40 public String getLabel() { 41 return name; 42 } 43 44 public Object getParent() { 45 return parent; 46 } 47 48 public String toString() { 49 return getLabel(); 50 } 51 } 52 | Popular Tags |