MetaDone
metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition Class Reference
Inheritance diagram for metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition:
Collaboration diagram for metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition:

List of all members.

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

Detailed Description

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));
 
Author:
kma

Constructor & Destructor Documentation

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.

Parameters:
mostContraints
dxdelta x
dydelta y
bordersThe borders
Exceptions:
NullPointerExceptionwhen 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().


Member Function Documentation

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]
static void metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.updateInsetsWithOffset ( Insets  in,
int  index,
int  bordersLength,
int  dx,
int  dy 
) [static, private]

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations