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

List of all members.

Public Member Functions

 AbstractCustomBorder (Insets insets, Stroke stroke, Color strokeColor, Color backgroundColor, int margin, int outsideMargin)
int getMargin ()
int getOutsideMargin ()
Color getStrokeColor ()
Color getBackgroundColor ()
Stroke getStroke ()
final Insets getInsets ()
boolean isOpaque ()

Protected Member Functions

void reduceBoundsForPaint (Rectangle bounds)

Static Protected Member Functions

static int getStrokeWidth (Stroke stroke)
static Insets computeInsets (int delta)
static Insets computeInsets (int delta, Insets insets)
static Insets computeInsets (int delta, Insets insets, boolean absoluteInsets)
static Rectangle addInsets (Rectangle r, Insets i)

Static Private Member Functions

static int abs (boolean abs, int a)

Private Attributes

final Insets insets
final Stroke stroke
final int margin
final int outsideMargin
final Color strokeColor
final Color backgroundColor

Detailed Description

A base class to draw borders.

All the borders are immutable.

Author:
kma

Constructor & Destructor Documentation

metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.AbstractCustomBorder ( Insets  insets,
Stroke  stroke,
Color  strokeColor,
Color  backgroundColor,
int  margin,
int  outsideMargin 
)

Initializes this abstract border.

Parameters:
insetsThe insets of the contents
strokeThe stroke used to draw the lines
strokeColorThe color of the stroke
backgroundColorThe color to fill the shape (null for a transparent shape)
marginThe inside margin. (between border and contents)
outsideMarginThe outside margin. (between border and exterior)

References metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.backgroundColor, metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.insets, metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.margin, metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.outsideMargin, metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.stroke, and metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.strokeColor.


Member Function Documentation

static int metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.abs ( boolean  abs,
int  a 
) [static, private]
static Rectangle metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.addInsets ( Rectangle  r,
Insets  i 
) [static, protected]

Creates a new rectangle adding insets to an existing rectangle.

Parameters:
rThe rectangle
iThe insets
Returns:
A new rectangle
Exceptions:
NullPointerExceptionwhen r or i is null

Referenced by metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderSequence.paint(), and metadone.client.grasyla2.visuallibrary.widgets.customBorders.BorderComposition.paint().

static Insets metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.computeInsets ( int  delta,
Insets  insets 
) [static, protected]

Computes insets using the delta and adding the given insets.

Parameters:
deltaThe delta (constant added to all sides)
insetsThe insets to add (or null)
Returns:
New insets

References metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.computeInsets().

static Insets metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.computeInsets ( int  delta,
Insets  insets,
boolean  absoluteInsets 
) [static, protected]

Computes insets using the delta and adding the given insets.

Parameters:
deltaThe delta (constant added to all sides)
insetsThe insets to add (or null)
absoluteInsetsWhether to take the absolute values of the insets
Returns:
New insets

References metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.abs().

final Insets metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.getInsets ( )
int metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.getMargin ( )

Member Data Documentation


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