SUI.Border

SUI.Border is a simple class to group border width data. It is used as one of the members of the SUI.Box class to hold the border definition for the box (SUI.Box#border). Like all SUI components, border definitions are given in integers (pixels).

Defined in: Border.js


Constructor summary

Attr. Name / Description
public

SUI.Border(t, r, b, l)

Create a SUI.Border object. The arguments are optional and are given in CSS style: one argument sets all, two arguments set the top/bottom right/left, three arguments the top right/left and bottom and four set the individual border widths.

Member summary

Attr. Type Name Description
public int

bottom

The border bottom width.

public int

height

The border top and bottom width together.

public int

left

The border left width

public int

right

The border right width

public int

top

The border top width

public int

width

The border left and right width together.

Method summary

Attr. Type Name / Description
public

set(el)

Apply the border definition to the CSS style of an element.

 


Constructor

public SUI.Border( int t, int r, int b, int l)

Create a SUI.Border object. The arguments are optional and are given in CSS style: one argument sets all, two arguments set the top/bottom right/left, three arguments the top right/left and bottom and four set the individual border widths.

Parameters:

Name Type Argument Default Description
int t <optional>
0 Border top width (and right, bottom and left width if not set by the r, b and l parameters).
int r <optional>
0 Border right (and left width if not set by the l parameter).
int b <optional>
0 Border bottom width.
int l <optional>
0 Border left width.

Members

public int bottom

The border bottom width.

public int height

The border top and bottom width together.

public int left

The border left width

public int right

The border right width

public int top

The border top width

public int width

The border left and right width together.


Methods

public set( HTMLElementNode el)

Apply the border definition to the CSS style of an element.

Parameters:

Name Type Description
HTMLElementNode el HTML element node of which to set the border style.