1 11 12 package org.eclipse.ui.internal; 13 14 import org.eclipse.swt.custom.CTabItem; 15 import org.eclipse.swt.graphics.Image; 16 import org.eclipse.swt.widgets.Shell; 17 18 22 public class AnimatedTabFeedback extends ImageCycleFeedbackBase { 23 24 private CTabItem tabItem; 25 26 29 public AnimatedTabFeedback(Shell parentShell) { 30 super(parentShell); 31 } 33 34 public AnimatedTabFeedback(Shell parentShell, CTabItem item, 35 Image[] images) { 36 super(parentShell, images); 37 tabItem = item; 38 } 39 40 43 public void initialize(AnimationEngine engine) { 44 background = tabItem.getParent().getBackground(); 46 display = tabItem.getParent().getDisplay(); 47 } 48 49 public void saveStoppedImage() { 50 stoppedImage = tabItem.getImage(); 51 } 52 53 public void setStoppedImage(Image image) { 54 tabItem.setImage(image); 55 } 56 57 public void showImage(Image image) { 58 if (tabItem.isDisposed()) 59 return; 60 tabItem.setImage(image); 61 } 62 63 } 64 | Popular Tags |