logo

const class

fwt::Insets

sys::Obj
  fwt::Insets

Insets represent a number of pixels around the edge of a rectangle.

Slots

bottom

const Int bottom

Bottom side spacing

Source

def

static Insets def := Insets.?()

Default instance 0, 0, 0, 0.

Source

equals

override Bool equals(Obj obj)

Return if obj is same Insets value.

Source

fromStr

static Insets fromStr(Str s, Bool checked := true)

Parse from string (see toStr). If invalid and checked is true then throw ParseErr otherwise return null. Supported formats are:

  • "len"
  • "top,right,bottom,left"

Source

hash

override Int hash()

Return hash of top, right, bottom, left.

Source

left

const Int left

Left side spacing

Source

make

new make(Int top := 0, Int right := 0, Int bottom := 0, Int left := 0)

Construct with optional top, right, bottom, left

Source

const Int right

Right side spacing

Source

toSize

Size toSize()

Return right+left, top+bottom

Source

toStr

override Str toStr()

If all four sides are equal return "len" otherwise return "top,right,bottom,left".

Source

top

const Int top

Top side spacing

Source