|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uic.model.IconFactory.IconRepository
An IconRepository class that uses known formats from http://kdelook.org icon packages. The advantage of this one is that it is present on just about every Linux box.
The format is thus: The argument baseDir points to the dir where the formats are registered in. Each format is a directory with the format NxN; like 22x22, or 32x32. Under each format are a couple of directies like 'actions','apps','devices', 'filetypes','mimetypes'. In those catagories live the actual icons, which typically the png extension, but gif and jpg image will also be detected and used.
We currently have no support for the newest sizing dir 'scalable' which contains svg image files.
Constructor Summary | |
IconFactory.IconRepository(String baseDir)
Constructor. |
Method Summary | |
InputStream |
getImage(String name,
int size)
Implements interface |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IconFactory.IconRepository(String baseDir) throws IOException
baseDir
- the absolute path to the repository.
IOException
- when the path is not found, or is not a dir.Method Detail |
public InputStream getImage(String name, int size) throws IOException
getImage
in interface IconFactory.Repository
name
- the name of the image, this is the name as specified in the
getIcon
method which again is the same name
as registered in an action
.size
- the requested size. If the wanted size is not found the returned
size will be used to scale to the wanted size.
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |