public class IconRepositoryManager extends Object implements IconManager
Constructor and Description |
---|
IconRepositoryManager() |
Modifier and Type | Method and Description |
---|---|
ConfigurableIconRepository |
findRepositoryByIconKey(String iconKey)
Returns the first
IconRepository which has the provided iconKey mapping defined. |
List<String> |
getSVGIconFiles()
Returns the list of available svg-files, e.g.
|
String |
getSVGIconId(String iconKey)
Returns the icon id assigned to the provided
iconKey . |
String |
getSVGIconId(Vertex vertex)
Returns the icon id assigned to the provided
Vertex . |
void |
onBind(ConfigurableIconRepository iconRepo) |
void |
onBind(IconRepository iconRepo) |
void |
onUnbind(ConfigurableIconRepository iconRepo) |
void |
onUnbind(IconRepository iconRepo) |
boolean |
removeIconMapping(Vertex vertex)
Removes the icon mapping for the
Vertex if defined. |
String |
setIconMapping(Vertex vertex,
String newIconId)
Sets a new icon mapping from the
Vertex to the newIconId . |
public void onBind(IconRepository iconRepo)
public void onUnbind(IconRepository iconRepo)
public void onBind(ConfigurableIconRepository iconRepo)
public void onUnbind(ConfigurableIconRepository iconRepo)
public String setIconMapping(Vertex vertex, String newIconId)
IconManager
Vertex
to the newIconId
.setIconMapping
in interface IconManager
vertex
- the vertex to mapnewIconId
- the icon id to map the vertex toIconManager
was able to save the mapping, null otherwisepublic boolean removeIconMapping(Vertex vertex)
IconManager
Vertex
if defined.removeIconMapping
in interface IconManager
vertex
- the Vertex
to remove the icon mapping fortrue
if the mapping was removed, false
if no icon mapping was found for the provided Vertex
and therefore could not be removedpublic String getSVGIconId(Vertex vertex)
IconManager
Vertex
.getSVGIconId
in interface IconManager
vertex
- the vertex to get the icon id forVertex
public String getSVGIconId(String iconKey)
IconManager
iconKey
.getSVGIconId
in interface IconManager
iconKey
- the iconKey
to look upiconKey
public List<String> getSVGIconFiles()
IconManager
getSVGIconFiles
in interface IconManager
public ConfigurableIconRepository findRepositoryByIconKey(String iconKey)
IconManager
IconRepository
which has the provided iconKey
mapping defined.findRepositoryByIconKey
in interface IconManager
iconKey
- the iconKey
to look upIconRepository
which has the provided iconKey
mapping defined, or null
if no IconRepository
exists with the provided iconKey
Copyright © 2018. All rights reserved.