### org.jfree.layouting.renderer.model

# Class DefaultBoxDefinition

- `java.lang.Object`
- - `org.jfree.layouting.renderer.model.DefaultBoxDefinition`

Implemented Interfaces:
  BoxDefinition

`public class DefaultBoxDefinition`
`extends java.lang.Object`
`implements BoxDefinition`

Describes the margins, paddings, borders and sizes of a box. (This does not define or describe the *actual* value used for the rendering, it describes the stylesheet's computed values.)

Author:
  Thomas Morgner

  ## Constructor Summary

  `DefaultBoxDefinition()`

  ## Method Summary

  `CSSColorValue`

  `getBackgroundColor()`

  `Border`

  `getBorder()`

  `RenderLength`

  `getMarginBottom()`

  `RenderLength`

  `getMarginLeft()`

  `RenderLength`

  `getMarginRight()`

  `RenderLength`

  `getMarginTop()`

  `RenderLength`

  `getMaximumHeight()`

  `RenderLength`

  `getMaximumWidth()`

  `RenderLength`

  `getMinimumHeight()`

  `RenderLength`

  `getMinimumWidth()`

  `RenderLength`

  `getPaddingBottom()`

  `RenderLength`

  `getPaddingLeft()`

  `RenderLength`

  `getPaddingRight()`

  `RenderLength`

  `getPaddingTop()`

  `RenderLength`

  `getPreferredHeight()`
    The preferred size is only set, if a height has been explicitly defined.

  `RenderLength`

  `getPreferredWidth()`
    The preferred size is only set, if a width has been explicitly defined.

  `boolean`

  `isEmpty()`

  `void`

  `setBackgroundColor(CSSColorValue backgroundColor)`

  `void`

  `setBorder(Border border)`

  `void`

  `setMarginBottom(RenderLength marginBottom)`

  `void`

  `setMarginLeft(RenderLength marginLeft)`

  `void`

  `setMarginRight(RenderLength marginRight)`

  `void`

  `setMarginTop(RenderLength marginTop)`

  `void`

  `setMaximumHeight(RenderLength maximumHeight)`

  `void`

  `setMaximumWidth(RenderLength maximumWidth)`

  `void`

  `setMinimumHeight(RenderLength minimumHeight)`

  `void`

  `setMinimumWidth(RenderLength minimumWidth)`

  `void`

  `setPaddingBottom(RenderLength paddingBottom)`

  `void`

  `setPaddingLeft(RenderLength paddingLeft)`

  `void`

  `setPaddingRight(RenderLength paddingRight)`

  `void`

  `setPaddingTop(RenderLength paddingTop)`

  `void`

  `setPreferredHeight(RenderLength preferredHeight)`

  `void`

  `setPreferredWidth(RenderLength preferredWidth)`

  `BoxDefinition[]`

  `split(int axis)`
    Split the box definition for the given major axis.

  `BoxDefinition[]`

  `splitHorizontally()`

  `BoxDefinition[]`

  `splitVertically()`

## Constructor Details

### DefaultBoxDefinition

    public DefaultBoxDefinition()

## Method Details

### getBackgroundColor

    public CSSColorValue getBackgroundColor()

> Specified by:
>   getBackgroundColor in interface BoxDefinition

### getBorder

    public Border getBorder()

> Specified by:
>   getBorder in interface BoxDefinition

### getMarginBottom

    public RenderLength getMarginBottom()

> Specified by:
>   getMarginBottom in interface BoxDefinition

### getMarginLeft

    public RenderLength getMarginLeft()

> Specified by:
>   getMarginLeft in interface BoxDefinition

### getMarginRight

    public RenderLength getMarginRight()

> Specified by:
>   getMarginRight in interface BoxDefinition

### getMarginTop

    public RenderLength getMarginTop()

> Specified by:
>   getMarginTop in interface BoxDefinition

### getMaximumHeight

    public RenderLength getMaximumHeight()

> Specified by:
>   getMaximumHeight in interface BoxDefinition

### getMaximumWidth

    public RenderLength getMaximumWidth()

> Specified by:
>   getMaximumWidth in interface BoxDefinition

### getMinimumHeight

    public RenderLength getMinimumHeight()

> Specified by:
>   getMinimumHeight in interface BoxDefinition

### getMinimumWidth

    public RenderLength getMinimumWidth()

> Specified by:
>   getMinimumWidth in interface BoxDefinition

### getPaddingBottom

    public RenderLength getPaddingBottom()

> Specified by:
>   getPaddingBottom in interface BoxDefinition

### getPaddingLeft

    public RenderLength getPaddingLeft()

> Specified by:
>   getPaddingLeft in interface BoxDefinition

### getPaddingRight

    public RenderLength getPaddingRight()

> Specified by:
>   getPaddingRight in interface BoxDefinition

### getPaddingTop

    public RenderLength getPaddingTop()

> Specified by:
>   getPaddingTop in interface BoxDefinition

### getPreferredHeight

    public RenderLength getPreferredHeight()

> The preferred size is only set, if a height has been explicitly defined.
> Specified by:
>   getPreferredHeight in interface BoxDefinition
> Returns:

### getPreferredWidth

    public RenderLength getPreferredWidth()

> The preferred size is only set, if a width has been explicitly defined.
> Specified by:
>   getPreferredWidth in interface BoxDefinition
> Returns:

### isEmpty

    public boolean isEmpty()

> Specified by:
>   isEmpty in interface BoxDefinition

### setBackgroundColor

    public void setBackgroundColor(CSSColorValue backgroundColor)

### setBorder

    public void setBorder(Border border)

### setMarginBottom

    public void setMarginBottom(RenderLength marginBottom)

### setMarginLeft

    public void setMarginLeft(RenderLength marginLeft)

### setMarginRight

    public void setMarginRight(RenderLength marginRight)

### setMarginTop

    public void setMarginTop(RenderLength marginTop)

### setMaximumHeight

    public void setMaximumHeight(RenderLength maximumHeight)

### setMaximumWidth

    public void setMaximumWidth(RenderLength maximumWidth)

### setMinimumHeight

    public void setMinimumHeight(RenderLength minimumHeight)

### setMinimumWidth

    public void setMinimumWidth(RenderLength minimumWidth)

### setPaddingBottom

    public void setPaddingBottom(RenderLength paddingBottom)

### setPaddingLeft

    public void setPaddingLeft(RenderLength paddingLeft)

### setPaddingRight

    public void setPaddingRight(RenderLength paddingRight)

### setPaddingTop

    public void setPaddingTop(RenderLength paddingTop)

### setPreferredHeight

    public void setPreferredHeight(RenderLength preferredHeight)

### setPreferredWidth

    public void setPreferredWidth(RenderLength preferredWidth)

### split

    public BoxDefinition[] split(int axis)

> Split the box definition for the given major axis. A horizontal axis will perform vertical splits (resulting in a left and right box definition) and a given vertical axis will split the box into a top and bottom box.
> Specified by:
>   split in interface BoxDefinition
> Parameters:
>   `axis` -
> Returns:

### splitHorizontally

    public BoxDefinition[] splitHorizontally()

### splitVertically

    public BoxDefinition[] splitVertically()