Java Code Examples for org.eclipse.swt.widgets.Label.addDisposeListener()

The following are Jave code examples for showing how to use addDisposeListener() of the org.eclipse.swt.widgets.Label class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: BiglyBT   File: ImageLoader.java   View Source Code Vote up 5 votes
/**
 * @param label
 * @param key
 *
 * @since 4.0.0.5
 */
public void setLabelImage(Label label, final String key) {
	Image bg = getImage(key);
	label.setImage(bg);
	label.addDisposeListener(new DisposeListener() {
		@Override
		public void widgetDisposed(DisposeEvent e) {
			releaseImage(key);
		}
	});
}