public final class NinePatchUtils
extends java.lang.Object
| Constructor and Description |
|---|
NinePatchUtils() |
| Modifier and Type | Method and Description |
|---|---|
static NinePatchIcon |
createInnerShadeIcon(int shadeWidth,
int round,
float shadeOpacity)
Returns inner shade nine-patch icon.
|
static NinePatchIcon |
createShadeIcon(int shadeWidth,
int round,
float shadeOpacity)
Returns shade nine-patch icon.
|
static NinePatchIcon |
getInnerShadeIcon(int shadeWidth,
int round,
float shadeOpacity)
Returns cached inner shade nine-patch icon.
|
static NinePatchIcon |
getShadeIcon(int shadeWidth,
int round,
float shadeOpacity)
Returns cached shade nine-patch icon.
|
static NinePatchIcon |
loadNinePatchIcon(java.lang.Object source)
Returns NinePatchIcon which is read from the source.
|
static NinePatchIcon |
loadNinePatchIcon(com.alee.utils.xml.ResourceFile resource)
Returns NinePatchIcon which is read from specified ResourceFile.
|
static NinePatchIconPainter |
loadNinePatchIconPainter(java.lang.Object source)
Returns NinePatchIconPainter which is read from the source.
|
static NinePatchIconPainter |
loadNinePatchIconPainter(com.alee.utils.xml.ResourceFile resource)
Returns NinePatchIconPainter which is read from specified ResourceFile.
|
static NinePatchStatePainter |
loadNinePatchStatePainter(java.lang.Object source)
Returns NinePatchStatePainter which is read from the source.
|
static NinePatchStatePainter |
loadNinePatchStatePainter(com.alee.utils.xml.ResourceMap resourceMap)
Returns NinePatchStatePainter which is read from specified ResourceMap.
|
static java.util.List<NinePatchInterval> |
parseIntervals(java.awt.image.BufferedImage image,
NinePatchIntervalType intervalType)
Returns a list of nine-patch data intervals from the specified image.
|
static java.util.List<NinePatchInterval> |
parseStretchIntervals(boolean[] filled)
Returns nine-patch stretch intervals.
|
static NinePatchIcon |
rotateIcon180(NinePatchIcon icon)
Returns rotated by 180 degrees NinePatchIcon.
|
static NinePatchIcon |
rotateIcon90CCW(NinePatchIcon icon)
Returns rotated by 90 degrees counter-clockwise NinePatchIcon.
|
static NinePatchIcon |
rotateIcon90CW(NinePatchIcon icon)
Returns rotated by 90 degrees clockwise NinePatchIcon.
|
public static NinePatchIcon getShadeIcon(int shadeWidth, int round, float shadeOpacity)
shadeWidth - shade widthround - corners roundshadeOpacity - shade opacitypublic static NinePatchIcon createShadeIcon(int shadeWidth, int round, float shadeOpacity)
shadeWidth - shade widthround - corners roundshadeOpacity - shade opacitypublic static NinePatchIcon getInnerShadeIcon(int shadeWidth, int round, float shadeOpacity)
shadeWidth - shade widthround - corners roundshadeOpacity - shade opacitypublic static NinePatchIcon createInnerShadeIcon(int shadeWidth, int round, float shadeOpacity)
shadeWidth - shade widthround - corners roundshadeOpacity - shade opacitypublic static java.util.List<NinePatchInterval> parseIntervals(java.awt.image.BufferedImage image, NinePatchIntervalType intervalType)
image - nin-patch image to processintervalType - intervals typepublic static java.util.List<NinePatchInterval> parseStretchIntervals(boolean[] filled)
filled - pixels fill datapublic static NinePatchIcon rotateIcon90CW(NinePatchIcon icon)
icon - NinePatchIcon to rotatepublic static NinePatchIcon rotateIcon90CCW(NinePatchIcon icon)
icon - NinePatchIcon to rotatepublic static NinePatchIcon rotateIcon180(NinePatchIcon icon)
icon - NinePatchIcon to rotatepublic static NinePatchIcon loadNinePatchIcon(java.lang.Object source)
source - one of possible sources: URL, String, File, Reader, InputStreampublic static NinePatchIcon loadNinePatchIcon(com.alee.utils.xml.ResourceFile resource)
resource - file descriptionpublic static NinePatchStatePainter loadNinePatchStatePainter(java.lang.Object source)
source - one of possible sources: URL, String, File, Reader, InputStreampublic static NinePatchStatePainter loadNinePatchStatePainter(com.alee.utils.xml.ResourceMap resourceMap)
resourceMap - ResourceFile mappublic static NinePatchIconPainter loadNinePatchIconPainter(java.lang.Object source)
source - one of possible sources: URL, String, File, Reader, InputStreampublic static NinePatchIconPainter loadNinePatchIconPainter(com.alee.utils.xml.ResourceFile resource)
resource - file description