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

List of all members.

Public Member Functions

 BraceBorder (Stroke stroke, Color strokeColor, int margin, int outsideMargin, Direction direction)
void paint (Graphics2D g, Rectangle bounds)

Static Protected Member Functions

static Insets computeInsets (Stroke stroke, int outsideMargin, int delta, Direction direction)

Private Member Functions

void drawBraceFromCurve (Graphics2D g, int[] x, int[] y, Direction dir, Rectangle bounds)

Static Private Member Functions

static void drawCurve (Graphics2D g, int[] x, int[] y)
static int inv (int s, int v)

Private Attributes

final Direction direction

Static Private Attributes

static final int SIZE = 14

Detailed Description

Draws a curly brace on one of the sides.

Author:
kma

Constructor & Destructor Documentation

metadone.client.grasyla2.visuallibrary.widgets.customBorders.BraceBorder.BraceBorder ( Stroke  stroke,
Color  strokeColor,
int  margin,
int  outsideMargin,
Direction  direction 
)

Initializes this border.

Parameters:
strokeThe stroke used to draw the lines.
strokeColorThe color of the stroke of the border.
marginThe margin between the border and the content.
outsideMarginThe outside margin.
directionThe direction of the brace

References metadone.client.grasyla2.visuallibrary.widgets.customBorders.BraceBorder.computeInsets(), and metadone.client.grasyla2.visuallibrary.widgets.customBorders.BraceBorder.direction.


Member Function Documentation

static Insets metadone.client.grasyla2.visuallibrary.widgets.customBorders.BraceBorder.computeInsets ( Stroke  stroke,
int  outsideMargin,
int  delta,
Direction  direction 
) [static, protected]
void metadone.client.grasyla2.visuallibrary.widgets.customBorders.BraceBorder.drawBraceFromCurve ( Graphics2D  g,
int[]  x,
int[]  y,
Direction  dir,
Rectangle  bounds 
) [private]

Draws the curve.

x and y contain the points to draw a cubic curve for the left top-part of the brace. These values are destroyed by this function, so to keep then give here a clone of these values. The first point must be in the middle of the bounds. Margins are omitted in the given points.

The curve may be represented as:

   2 3
   |
 0 1
 
Parameters:
gThe graphics
x4 horizontal positions
y4 vertical positions
dirThe direction
boundsThe bounds

References metadone.client.grasyla2.visuallibrary.widgets.customBorders.BraceBorder.drawCurve(), metadone.client.grasyla2.visuallibrary.widgets.customBorders.AbstractCustomBorder.getOutsideMargin(), and metadone.client.grasyla2.visuallibrary.widgets.customBorders.BraceBorder.inv().

Referenced by metadone.client.grasyla2.visuallibrary.widgets.customBorders.BraceBorder.paint().

static void metadone.client.grasyla2.visuallibrary.widgets.customBorders.BraceBorder.drawCurve ( Graphics2D  g,
int[]  x,
int[]  y 
) [static, private]
static int metadone.client.grasyla2.visuallibrary.widgets.customBorders.BraceBorder.inv ( int  s,
int  v 
) [static, private]

Member Data Documentation


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