org.jfree.layouting.renderer.model
Class DefaultBoxDefinition

java.lang.Object
  extended by 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
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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBoxDefinition

public DefaultBoxDefinition()
Method Detail

getBorder

public Border getBorder()
Specified by:
getBorder in interface BoxDefinition

setBorder

public void setBorder(Border border)

getMarginTop

public RenderLength getMarginTop()
Specified by:
getMarginTop in interface BoxDefinition

setMarginTop

public void setMarginTop(RenderLength marginTop)

getMarginBottom

public RenderLength getMarginBottom()
Specified by:
getMarginBottom in interface BoxDefinition

setMarginBottom

public void setMarginBottom(RenderLength marginBottom)

getMarginLeft

public RenderLength getMarginLeft()
Specified by:
getMarginLeft in interface BoxDefinition

setMarginLeft

public void setMarginLeft(RenderLength marginLeft)

getMarginRight

public RenderLength getMarginRight()
Specified by:
getMarginRight in interface BoxDefinition

setMarginRight

public void setMarginRight(RenderLength marginRight)

getPaddingTop

public RenderLength getPaddingTop()
Specified by:
getPaddingTop in interface BoxDefinition

setPaddingTop

public void setPaddingTop(RenderLength paddingTop)

getPaddingLeft

public RenderLength getPaddingLeft()
Specified by:
getPaddingLeft in interface BoxDefinition

setPaddingLeft

public void setPaddingLeft(RenderLength paddingLeft)

getPaddingBottom

public RenderLength getPaddingBottom()
Specified by:
getPaddingBottom in interface BoxDefinition

setPaddingBottom

public void setPaddingBottom(RenderLength paddingBottom)

getPaddingRight

public RenderLength getPaddingRight()
Specified by:
getPaddingRight in interface BoxDefinition

setPaddingRight

public void setPaddingRight(RenderLength paddingRight)

getMinimumWidth

public RenderLength getMinimumWidth()
Specified by:
getMinimumWidth in interface BoxDefinition

setMinimumWidth

public void setMinimumWidth(RenderLength minimumWidth)

getMinimumHeight

public RenderLength getMinimumHeight()
Specified by:
getMinimumHeight in interface BoxDefinition

setMinimumHeight

public void setMinimumHeight(RenderLength minimumHeight)

getMaximumWidth

public RenderLength getMaximumWidth()
Specified by:
getMaximumWidth in interface BoxDefinition

setMaximumWidth

public void setMaximumWidth(RenderLength maximumWidth)

getMaximumHeight

public RenderLength getMaximumHeight()
Specified by:
getMaximumHeight in interface BoxDefinition

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 interface BoxDefinition
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 interface BoxDefinition
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 interface BoxDefinition
Parameters:
axis -
Returns:

splitVertically

public BoxDefinition[] splitVertically()

splitHorizontally

public BoxDefinition[] splitHorizontally()

getBackgroundColor

public CSSColorValue getBackgroundColor()
Specified by:
getBackgroundColor in interface BoxDefinition

setBackgroundColor

public void setBackgroundColor(CSSColorValue backgroundColor)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface BoxDefinition