|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tbray.framer.Framer
public class Framer
Decorates an image with a border, a drop-shadow, or both.
Constructor Summary | |
---|---|
Framer(java.awt.image.BufferedImage in)
Make a new Framer, to operate on the provided image. |
Method Summary | |
---|---|
java.awt.image.BufferedImage |
frame()
Frame an image. |
int |
getBorderColor()
Get the border color |
int |
getBorderWidth()
Get the border width. |
int |
getShadowColor()
Get the shadow color. |
int |
getShadowDepth()
Get the shadow depth. |
static void |
main(java.lang.String[] args)
Command-line access. |
void |
setBorderColor(int color)
Set the border color. |
void |
setBorderWidth(int width)
Set the border width. |
void |
setShadowColor(int color)
Set the shadow color. |
void |
setShadowDepth(int depth)
Set the shadow depth. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Framer(java.awt.image.BufferedImage in)
Method Detail |
---|
public static void main(java.lang.String[] args)
-borderColor [hex color] (default a9a9a9) -borderWidth [int] (default 0) -shadowColor [hex color] (default 000000) -shadowDepth [int] (default 9)
public void setBorderWidth(int width)
width
- the border width in pixels.
e
- RuntimeException if the width is negative.public int getBorderWidth()
public void setBorderColor(int color)
color
- the border color, in ARGB format; If the first byte (alpha)
is zero, you won't see anything.public int getBorderColor()
public void setShadowDepth(int depth)
depth
- the depth, in pixels, on the sides where the shadow is
wide.
e
- a RuntimeException if the depth is negative.public int getShadowDepth()
public void setShadowColor(int color)
color
- the color, in RGB format; not RGB because the software
will change the values of the alpha byte.public int getShadowColor()
public java.awt.image.BufferedImage frame()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |