public interface IconRepository
IconRepository
stores a mapping from icon keys to icon ids.
The icon key is Graph Provider specific and is defined by it (e.g. "sfree:group")
The icon id should match with an id element in all existing SVGs (not only this IconRepository
.Modifier and Type | Method and Description |
---|---|
void |
addIconMapping(String iconKey,
String iconId)
Adds a custom icon mapping.
|
boolean |
contains(String iconKey)
Verifies if a mapping for the provided icon Key is defined.
|
String |
getSVGIconId(String iconKey)
Maps the provided
iconKey to an SVG id element. |
void |
removeIconMapping(String iconKey)
Removes the given
iconKey from this IconRepository . |
void |
save()
Persists this
IconRepository . |
boolean contains(String iconKey)
iconKey
- the icon keyString getSVGIconId(String iconKey)
iconKey
to an SVG id element.
If no mapping is defined, null
is returned.iconKey
- The icon key to look upvoid addIconMapping(String iconKey, String iconId)
iconKey
must be unique in this IconRepository
.iconKey
- The icon keyiconId
- The icon id for the icon keyvoid removeIconMapping(String iconKey)
iconKey
from this IconRepository
.iconKey
- The icon key to removevoid save()
IconRepository
.
Should be invoked if changes to this IconRepository
should be persisted permanently (e.g. on disk)Copyright © 2016. All rights reserved.