public class GraphMLIconRepository extends Object implements IconRepository
IconRepository
for the GraphMLMetaTopologyProvider
.
It should contain the Set of iconIds defined by all GraphMLTopologyProvider
s.
This enables users to define custom icons (or using already existing icons) by simply defining them in the GraphML file itself.
Please note that multiple GraphMLMetaTopologyProvider
could define identical GraphMLIconRepository
s. For now this is not relevant. However if the icons
should be configurable from the Icon Selection Dialog in the UI, this issue must be addressed.Constructor and Description |
---|
GraphMLIconRepository(Set<String> knownIconKeys) |
Modifier and Type | Method and Description |
---|---|
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. |
public boolean contains(String iconKey)
IconRepository
contains
in interface IconRepository
iconKey
- the icon keypublic String getSVGIconId(String iconKey)
IconRepository
iconKey
to an SVG id element.
If no mapping is defined, null
is returned.getSVGIconId
in interface IconRepository
iconKey
- The icon key to look upCopyright © 2018. All rights reserved.