Class DefaultBoxDefinition
- java.lang.Object
-
- org.jfree.layouting.renderer.model.DefaultBoxDefinition
-
- All 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
Constructors Constructor Description DefaultBoxDefinition()
-
Method Summary
-
-
-
Method Detail
-
getBorder
public Border getBorder()
- Specified by:
getBorder
in interfaceBoxDefinition
-
setBorder
public void setBorder(Border border)
-
getMarginTop
public RenderLength getMarginTop()
- Specified by:
getMarginTop
in interfaceBoxDefinition
-
setMarginTop
public void setMarginTop(RenderLength marginTop)
-
getMarginBottom
public RenderLength getMarginBottom()
- Specified by:
getMarginBottom
in interfaceBoxDefinition
-
setMarginBottom
public void setMarginBottom(RenderLength marginBottom)
-
getMarginLeft
public RenderLength getMarginLeft()
- Specified by:
getMarginLeft
in interfaceBoxDefinition
-
setMarginLeft
public void setMarginLeft(RenderLength marginLeft)
-
getMarginRight
public RenderLength getMarginRight()
- Specified by:
getMarginRight
in interfaceBoxDefinition
-
setMarginRight
public void setMarginRight(RenderLength marginRight)
-
getPaddingTop
public RenderLength getPaddingTop()
- Specified by:
getPaddingTop
in interfaceBoxDefinition
-
setPaddingTop
public void setPaddingTop(RenderLength paddingTop)
-
getPaddingLeft
public RenderLength getPaddingLeft()
- Specified by:
getPaddingLeft
in interfaceBoxDefinition
-
setPaddingLeft
public void setPaddingLeft(RenderLength paddingLeft)
-
getPaddingBottom
public RenderLength getPaddingBottom()
- Specified by:
getPaddingBottom
in interfaceBoxDefinition
-
setPaddingBottom
public void setPaddingBottom(RenderLength paddingBottom)
-
getPaddingRight
public RenderLength getPaddingRight()
- Specified by:
getPaddingRight
in interfaceBoxDefinition
-
setPaddingRight
public void setPaddingRight(RenderLength paddingRight)
-
getMinimumWidth
public RenderLength getMinimumWidth()
- Specified by:
getMinimumWidth
in interfaceBoxDefinition
-
setMinimumWidth
public void setMinimumWidth(RenderLength minimumWidth)
-
getMinimumHeight
public RenderLength getMinimumHeight()
- Specified by:
getMinimumHeight
in interfaceBoxDefinition
-
setMinimumHeight
public void setMinimumHeight(RenderLength minimumHeight)
-
getMaximumWidth
public RenderLength getMaximumWidth()
- Specified by:
getMaximumWidth
in interfaceBoxDefinition
-
setMaximumWidth
public void setMaximumWidth(RenderLength maximumWidth)
-
getMaximumHeight
public RenderLength getMaximumHeight()
- Specified by:
getMaximumHeight
in interfaceBoxDefinition
-
setMaximumHeight
public void setMaximumHeight(RenderLength maximumHeight)
-
getPreferredWidth
public RenderLength getPreferredWidth()
Description copied from interface:BoxDefinition
The preferred size is only set, if a width has been explicitly defined.- Specified by:
getPreferredWidth
in interfaceBoxDefinition
- Returns:
-
setPreferredWidth
public void setPreferredWidth(RenderLength preferredWidth)
-
getPreferredHeight
public RenderLength getPreferredHeight()
Description copied from interface:BoxDefinition
The preferred size is only set, if a height has been explicitly defined.- Specified by:
getPreferredHeight
in interfaceBoxDefinition
- Returns:
-
setPreferredHeight
public void setPreferredHeight(RenderLength preferredHeight)
-
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 interfaceBoxDefinition
- Parameters:
axis
-- Returns:
-
splitVertically
public BoxDefinition[] splitVertically()
-
splitHorizontally
public BoxDefinition[] splitHorizontally()
-
getBackgroundColor
public CSSColorValue getBackgroundColor()
- Specified by:
getBackgroundColor
in interfaceBoxDefinition
-
setBackgroundColor
public void setBackgroundColor(CSSColorValue backgroundColor)
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceBoxDefinition
-
-