-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update of the image loader example code
- Loading branch information
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
...gella.service.imageloader/src/com/vogella/imageloader/services/IBundleResourceLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
package com.vogella.imageloader.services; | ||
|
||
import org.eclipse.jface.resource.ImageDescriptor; | ||
import org.eclipse.swt.graphics.Image; | ||
|
||
public interface IBundleResourceLoader { | ||
|
||
// service does NOT recycle the provided image | ||
// service does NOT dispose the provided image | ||
// the consumer of the image is responsible for calling the dispose() | ||
// method on the created Image object once the Image is not required anymore | ||
// can be automated with the usage of LocalResourceManager | ||
|
||
public ImageDescriptor getImageDescriptor(Class<?> clazz, String path); | ||
|
||
// service does NOT dispose the provided image nor the created | ||
// caller needs to dispose them | ||
public Image resize(Image image, int width, int height); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters