/* (non-Javadoc)
  * @see IBaseLabelProvider#dispose
  */
 public void dispose() {
   if (fLabelDecorators != null) {
     for (int i = 0; i < fLabelDecorators.size(); i++) {
       ILabelDecorator decorator = (ILabelDecorator) fLabelDecorators.get(i);
       decorator.dispose();
     }
     fLabelDecorators = null;
   }
 }
 protected Image decorateImage(Image image, Object element) {
   if (fLabelDecorators != null && image != null) {
     for (int i = 0; i < fLabelDecorators.size(); i++) {
       ILabelDecorator decorator = (ILabelDecorator) fLabelDecorators.get(i);
       image = decorator.decorateImage(image, element);
     }
   }
   return image;
 }
 protected String decorateText(String text, Object element) {
   if (fLabelDecorators != null && text.length() > 0) {
     for (int i = 0; i < fLabelDecorators.size(); i++) {
       ILabelDecorator decorator = (ILabelDecorator) fLabelDecorators.get(i);
       text = decorator.decorateText(text, element);
     }
   }
   return text;
 }
 /* (non-Javadoc)
  * @see IBaseLabelProvider#removeListener(ILabelProviderListener)
  */
 public void removeListener(ILabelProviderListener listener) {
   if (fLabelDecorators != null) {
     for (int i = 0; i < fLabelDecorators.size(); i++) {
       ILabelDecorator decorator = (ILabelDecorator) fLabelDecorators.get(i);
       decorator.removeListener(listener);
     }
   }
   fListeners.remove(listener);
 }
Exemple #5
0
 /* (non-Javadoc)
  * @see IBaseLabelProvider#addListener(ILabelProviderListener)
  */
 @Override
 public void addListener(ILabelProviderListener listener) {
   if (fLabelDecorators != null) {
     for (int i = 0; i < fLabelDecorators.size(); i++) {
       ILabelDecorator decorator = fLabelDecorators.get(i);
       decorator.addListener(listener);
     }
   }
   super.addListener(listener);
 }
 protected Image decorateImage(Image image, Object element) {
   if (labelDecorators != null && image != null) {
     Iterator iter = labelDecorators.iterator();
     while (iter.hasNext()) {
       ILabelDecorator decorator = (ILabelDecorator) iter.next();
       image = decorator.decorateImage(image, element);
     }
   }
   return image;
 }
 protected String decorateText(String text, Object element) {
   if (labelDecorators != null && text.length() > 0) {
     Iterator iter = labelDecorators.iterator();
     while (iter.hasNext()) {
       ILabelDecorator decorator = (ILabelDecorator) iter.next();
       text = decorator.decorateText(text, element);
     }
   }
   return text;
 }
Exemple #8
0
 /* (non-Javadoc)
  * @see IBaseLabelProvider#dispose
  */
 @Override
 public void dispose() {
   if (fLabelDecorators != null) {
     for (int i = 0; i < fLabelDecorators.size(); i++) {
       ILabelDecorator decorator = fLabelDecorators.get(i);
       decorator.dispose();
     }
     fLabelDecorators = null;
   }
   fStorageLabelProvider.dispose();
   fImageLabelProvider.dispose();
 }