1 11 12 package org.eclipse.ui.menus; 13 14 import org.eclipse.jface.resource.ImageDescriptor; 15 import org.eclipse.ui.IWorkbench; 16 import org.eclipse.ui.IWorkbenchPartSite; 17 import org.eclipse.ui.IWorkbenchWindow; 18 import org.eclipse.ui.services.IServiceLocator; 19 20 30 public abstract class UIElement { 31 32 private IServiceLocator serviceLocator; 33 34 41 protected UIElement(IServiceLocator serviceLocator) 42 throws IllegalArgumentException { 43 if (serviceLocator == null) 44 throw new IllegalArgumentException (); 45 this.serviceLocator = serviceLocator; 46 } 47 48 54 public abstract void setText(String text); 55 56 63 public abstract void setTooltip(String text); 64 65 71 public abstract void setIcon(ImageDescriptor desc); 72 73 79 public abstract void setDisabledIcon(ImageDescriptor desc); 80 81 87 public abstract void setHoverIcon(ImageDescriptor desc); 88 89 96 public abstract void setChecked(boolean checked); 97 98 114 public final IServiceLocator getServiceLocator() { 115 return serviceLocator; 116 } 117 118 130 public void setDropDownId(String id) { 131 } 133 } 134 | Popular Tags |