MetaDone
|
Public Member Functions | |
BorderComposition (boolean mostContraints, int dx, int dy, Border...borders) | |
Border[] | getBorders () |
Insets | getInsets () |
boolean | isOpaque () |
void | paint (Graphics2D gr, Rectangle bounds) |
Package Attributes | |
final int | deltaY |
Static Private Member Functions | |
static Insets | computeInsetsForBorder (int index, Border[] borders, int dx, int dy) |
static void | updateInsetsWithOffset (Insets in, int index, int bordersLength, int dx, int dy) |
static Pair< Integer, Integer > | computeInsetsOffset (int index, int bordersLength, int delta) |
static void | maxInsets (Insets insets, Insets a) |
Private Attributes | |
final Border[] | borders |
final Insets | insets |
final int | deltaX |
Renders a list of borders with a fixed relative position between them.
Example:
// 3 times the same border drawn in perspective Border b = ...; Widget w = new Widget(scene); w.setBorder(new BorderComposition(false, 5, 5, b, b, b));
metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.BorderComposition | ( | boolean | mostContraints, |
int | dx, | ||
int | dy, | ||
Border... | borders | ||
) |
Initializes this border.
When mostContraints
is set, the computed insets are those of all the borders, otherwise only the insets of the first border are used.
dx and dy give the relative position where the next border will be rendered.
mostContraints | |
dx | delta x |
dy | delta y |
borders | The borders |
NullPointerException | when one of the borders is null |
References metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.borders, metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.computeInsetsForBorder(), metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.deltaX, metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.deltaY, metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.insets, and metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.maxInsets().
static Insets metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.computeInsetsForBorder | ( | int | index, |
Border[] | borders, | ||
int | dx, | ||
int | dy | ||
) | [static, private] |
static Pair<Integer, Integer> metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.computeInsetsOffset | ( | int | index, |
int | bordersLength, | ||
int | delta | ||
) | [static, private] |
Border [] metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.getBorders | ( | ) |
Insets metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.getInsets | ( | ) |
boolean metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.isOpaque | ( | ) |
static void metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.maxInsets | ( | Insets | insets, |
Insets | a | ||
) | [static, private] |
void metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.paint | ( | Graphics2D | gr, |
Rectangle | bounds | ||
) |
References metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.addInsets(), metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.borders, metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.deltaX, metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.deltaY, and metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.updateInsetsWithOffset().
static void metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.updateInsetsWithOffset | ( | Insets | in, |
int | index, | ||
int | bordersLength, | ||
int | dx, | ||
int | dy | ||
) | [static, private] |
References metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.computeInsetsOffset().
Referenced by metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.computeInsetsForBorder(), and metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.paint().
final Border [] metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.borders [private] |
Referenced by metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.BorderComposition(), metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.getBorders(), metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.isOpaque(), and metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.paint().
final Insets metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.insets [private] |