Class IconDefaultService
- java.lang.Object
-
- org.neotropic.kuwaiba.visualization.api.resources.IconDefaultService
-
@Service public class IconDefaultService extends Object
A Service class that builds and/or caches default icons.- Author:
- Julian David Camacho Erazo <julian.camacho@kuwaiba.org>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
IconDefaultService.ClassIconKey
class
IconDefaultService.ClassSmallIconKey
class
IconDefaultService.RelationshipIconKey
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_ICON_HEIGHT
Default icon height (used in views)static int
DEFAULT_ICON_WIDTH
Default icon width (used in views)static int
DEFAULT_SMALL_ICON_HEIGHT
Default icon height (used in navigation trees)static int
DEFAULT_SMALL_ICON_WIDTH
Default icon width (used in navigation trees)
-
Constructor Summary
Constructors Constructor Description IconDefaultService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getClassIconDefault()
Builds an icon as a byte arraybyte[]
getClassIconDefault(String className, int color)
Builds an icon as a byte arraybyte[]
getClassSmallIconDefault()
Builds a small icon as a byte arraybyte[]
getClassSmallIconDefault(String className, int color)
Builds a small icon as a byte arraybyte[]
getRelationshipIconDefault(int color, int width, int height)
Builds an icon resource
-
-
-
Field Detail
-
DEFAULT_ICON_WIDTH
public static final int DEFAULT_ICON_WIDTH
Default icon width (used in views)- See Also:
- Constant Field Values
-
DEFAULT_ICON_HEIGHT
public static final int DEFAULT_ICON_HEIGHT
Default icon height (used in views)- See Also:
- Constant Field Values
-
DEFAULT_SMALL_ICON_WIDTH
public static final int DEFAULT_SMALL_ICON_WIDTH
Default icon width (used in navigation trees)- See Also:
- Constant Field Values
-
DEFAULT_SMALL_ICON_HEIGHT
public static final int DEFAULT_SMALL_ICON_HEIGHT
Default icon height (used in navigation trees)- See Also:
- Constant Field Values
-
-
Method Detail
-
getClassIconDefault
public byte[] getClassIconDefault(String className, int color)
Builds an icon as a byte array- Parameters:
className
- The className of the iconcolor
- The color of the icon- Returns:
- The default icon as a byte array
-
getClassIconDefault
public byte[] getClassIconDefault()
Builds an icon as a byte array- Returns:
- The default icon as a byte array
-
getClassSmallIconDefault
public byte[] getClassSmallIconDefault(String className, int color)
Builds a small icon as a byte array- Parameters:
className
- The className of the small iconcolor
- The color of the small Icon- Returns:
- The small default icon as a byte array
-
getClassSmallIconDefault
public byte[] getClassSmallIconDefault()
Builds a small icon as a byte array- Returns:
- The small default icon as a byte array
-
getRelationshipIconDefault
public byte[] getRelationshipIconDefault(int color, int width, int height)
Builds an icon resource- Parameters:
color
- The color of the iconwidth
- The width of the iconheight
- The height of the icon- Returns:
- The icon as a byte array
-
-