|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.miginfocom.util.gfx.SliceSpec
public class SliceSpec
A specification on how an image should be sliced into 3x3 slices. Just an info-holder, like a struct.
| Field Summary | |
|---|---|
static boolean[] |
OPT_ALL
Paints all slices. |
static boolean[] |
OPT_BORDER
Paints all 8 edge slices. |
static boolean[] |
OPT_BOTTOM_LEFT
Paints 5 lower left edge slices. |
static boolean[] |
OPT_BOTTOM_RIGHT
Paints 5 lower right edge slices. |
static boolean[] |
OPT_TOP_LEFT
Paints 5 top left edge slices. |
static boolean[] |
OPT_TOP_RIGHT
Paints 5 top right edge slices. |
static int |
TYPE_STRETCH
Stretches the slice to fit |
static int |
TYPE_TILE_CUT
Tiles the slice to fit a larger size and cuts it to fit a smaller size. |
static int |
TYPE_TILE_SHRINK
Tiles the slice to fit a larger size and shrinks by compressing (scale) to fit a smaller size. |
| Constructor Summary | |
|---|---|
SliceSpec(java.awt.Insets sliceCuts,
int paintType)
Constructor. |
|
SliceSpec(java.awt.Insets sliceCuts,
int paintType,
boolean[] pntSlices)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
boolean[] |
getPaintedSlices()
Returns the paint optimization. |
int |
getPaintType()
How to paint the side slices (not corners). |
java.awt.Insets |
getSliceCuts()
Returns how to slice the image, normally into nine parts. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean[] OPT_ALL
null.
public static final boolean[] OPT_BOTTOM_RIGHT
public static final boolean[] OPT_BOTTOM_LEFT
public static final boolean[] OPT_TOP_RIGHT
public static final boolean[] OPT_TOP_LEFT
public static final boolean[] OPT_BORDER
public static final int TYPE_TILE_SHRINK
public static final int TYPE_TILE_CUT
public static final int TYPE_STRETCH
| Constructor Detail |
|---|
public SliceSpec(java.awt.Insets sliceCuts,
int paintType)
IllegalArgumentException if erratic input.
sliceCuts - How to slice the image. Not null.paintType - How to paint the slices (not corners). E.g. TYPE_TILE_SHRINK
public SliceSpec(java.awt.Insets sliceCuts,
int paintType,
boolean[] pntSlices)
IllegalArgumentException if erratic input.
sliceCuts - How to slice the image. Not null.paintType - How to paint the slices (not corners). E.g. TYPE_TILE_SHRINKpntSlices - Which slices to paint. Can be used for instance to paint only the botton and right slices for a shadow.null which means paint all slices.
E.g. OPT_ALL or OPT_BOTTOM_RIGHT.| Method Detail |
|---|
public boolean[] getPaintedSlices()
OPT_TOP_LEFT. Can be null, otherwise always of length 9.public java.awt.Insets getSliceCuts()
null.public int getPaintType()
TYPE_STRETCHpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||