Class ResourceFactory
- java.lang.Object
-
- org.neotropic.util.visual.resources.AbstractResourceFactory
-
- org.neotropic.kuwaiba.visualization.api.resources.ResourceFactory
-
@Service public class ResourceFactory extends AbstractResourceFactory
A factory class that builds and/or caches resources (mostly icons and backgrounds).- Author:
- Johny Andres Ortega Ruiz <johny.ortega@kuwaiba.org>, Orlando Paz <Orlando.paz@kuwaiba.org>, Julian David Camacho Erazo <julian.camacho@kuwaiba.org>
-
-
Constructor Summary
Constructors Constructor Description ResourceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getClassIcon(String className)
Returns the URI for the large icon of a class with the given name.String
getClassIconUri(String className)
Returns the URI for the large icon of a class with the given name.String
getClassSmallIcon(String className)
Returns the URI for the small icon of a class with the given name.String
getClassSmallIconUri(String className)
Returns the URI for the small icon of a class with the given name.String
getRelationshipIcon(Color color, int width, int height)
Returns the URI for a relationship icon with the given color, width, and height.String
getRelationshipIconUri(int color, int width, int height)
Returns the URI for a relationship icon with the given color, width, and height.
-
-
-
Method Detail
-
getClassIconUri
public String getClassIconUri(String className)
Returns the URI for the large icon of a class with the given name.- Parameters:
className
- the name of the class- Returns:
- the URI of the large icon
-
getClassSmallIconUri
public String getClassSmallIconUri(String className)
Returns the URI for the small icon of a class with the given name.- Parameters:
className
- the name of the class- Returns:
- the URI of the small icon
-
getRelationshipIconUri
public String getRelationshipIconUri(int color, int width, int height)
Returns the URI for a relationship icon with the given color, width, and height.- Parameters:
color
- the color of the icon (as an RGB value)width
- the width of the iconheight
- the height of the icon- Returns:
- the URI of the relationship icon
-
getClassIcon
public String getClassIcon(String className)
Returns the URI for the large icon of a class with the given name.- Specified by:
getClassIcon
in classAbstractResourceFactory
- Parameters:
className
- the name of the class- Returns:
- the URI of the large icon
-
getClassSmallIcon
public String getClassSmallIcon(String className)
Returns the URI for the small icon of a class with the given name.- Specified by:
getClassSmallIcon
in classAbstractResourceFactory
- Parameters:
className
- the name of the class- Returns:
- the URI of the small icon
-
getRelationshipIcon
public String getRelationshipIcon(Color color, int width, int height)
Returns the URI for a relationship icon with the given color, width, and height.- Parameters:
color
- the color of the icon (as a Color object)width
- the width of the iconheight
- the height of the icon- Returns:
- the URI of the relationship icon
-
-