|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.utils.NinePatchUtils
public final class NinePatchUtils
This class provides a set of utilities to work with various nine-patch images.
Field Summary | |
---|---|
static java.lang.String |
INNER_SHADE_PREFIX
|
static java.lang.String |
OUTER_SHADE_PREFIX
Shade prefixes. |
Constructor Summary | |
---|---|
NinePatchUtils()
|
Method Summary | |
---|---|
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(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(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(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OUTER_SHADE_PREFIX
public static final java.lang.String INNER_SHADE_PREFIX
Constructor Detail |
---|
public NinePatchUtils()
Method Detail |
---|
public static NinePatchIcon getShadeIcon(int shadeWidth, int round, float shadeOpacity)
shadeWidth
- shade widthround
- corners roundshadeOpacity
- shade opacity
public static NinePatchIcon createShadeIcon(int shadeWidth, int round, float shadeOpacity)
shadeWidth
- shade widthround
- corners roundshadeOpacity
- shade opacity
public static NinePatchIcon getInnerShadeIcon(int shadeWidth, int round, float shadeOpacity)
shadeWidth
- shade widthround
- corners roundshadeOpacity
- shade opacity
public static NinePatchIcon createInnerShadeIcon(int shadeWidth, int round, float shadeOpacity)
shadeWidth
- shade widthround
- corners roundshadeOpacity
- shade opacity
public static java.util.List<NinePatchInterval> parseIntervals(java.awt.image.BufferedImage image, NinePatchIntervalType intervalType)
image
- nin-patch image to processintervalType
- intervals type
public static java.util.List<NinePatchInterval> parseStretchIntervals(boolean[] filled)
filled
- pixels fill data
public static NinePatchIcon rotateIcon90CW(NinePatchIcon icon)
icon
- NinePatchIcon to rotate
public static NinePatchIcon rotateIcon90CCW(NinePatchIcon icon)
icon
- NinePatchIcon to rotate
public static NinePatchIcon rotateIcon180(NinePatchIcon icon)
icon
- NinePatchIcon to rotate
public static NinePatchIcon loadNinePatchIcon(java.lang.Object source)
source
- one of possible sources: URL, String, File, Reader, InputStream
public static NinePatchIcon loadNinePatchIcon(ResourceFile resource)
resource
- file description
public static NinePatchStatePainter loadNinePatchStatePainter(java.lang.Object source)
source
- one of possible sources: URL, String, File, Reader, InputStream
public static NinePatchStatePainter loadNinePatchStatePainter(ResourceMap resourceMap)
resourceMap
- ResourceFile map
public static NinePatchIconPainter loadNinePatchIconPainter(java.lang.Object source)
source
- one of possible sources: URL, String, File, Reader, InputStream
public static NinePatchIconPainter loadNinePatchIconPainter(ResourceFile resource)
resource
- file description
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |