org.pentaho.reporting.engine.classic.core.layout.model.context
Class BoxDefinition

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.layout.model.context.BoxDefinition

public final class BoxDefinition
extends Object

A box definition. The paddings or maximum height/width cannot be percentages or AUTO.

Author:
Thomas Morgner

Field Summary
static RenderLength DEFAULT_PREFERRED_WIDTH
           
static BoxDefinition EMPTY
           
 
Constructor Summary
BoxDefinition()
           
 
Method Summary
 BoxDefinition derive()
           
 Border getBorder()
           
 RenderLength getFixedPosition()
           
 RenderLength getMarginBottom()
           
 RenderLength getMarginLeft()
           
 RenderLength getMarginRight()
           
 RenderLength getMarginTop()
           
 RenderLength getMaximumHeight()
           
 RenderLength getMaximumWidth()
           
 RenderLength getMinimumHeight()
           
 RenderLength getMinimumWidth()
           
 long getPaddingBottom()
           
 long getPaddingLeft()
           
 long getPaddingRight()
           
 long getPaddingTop()
           
 RenderLength getPreferredHeight()
           
 RenderLength getPreferredWidth()
           
 boolean isEmpty()
           
 boolean isSizeSpecifiesBorderBox()
           
 BoxDefinition lock()
           
 void setBorder(Border border)
           
 void setFixedPosition(RenderLength fixedPosition)
           
 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(long paddingBottom)
           
 void setPaddingLeft(long paddingLeft)
           
 void setPaddingRight(long paddingRight)
           
 void setPaddingTop(long paddingTop)
           
 void setPreferredHeight(RenderLength preferredHeight)
           
 void setPreferredWidth(RenderLength preferredWidth)
           
 void setSizeSpecifiesBorderBox(boolean sizeSpecifiesBorderBox)
           
 BoxDefinition[] split(int axis)
          Split the box definition for the given major axis.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final BoxDefinition EMPTY

DEFAULT_PREFERRED_WIDTH

public static final RenderLength DEFAULT_PREFERRED_WIDTH
Constructor Detail

BoxDefinition

public BoxDefinition()
Method Detail

setSizeSpecifiesBorderBox

public void setSizeSpecifiesBorderBox(boolean sizeSpecifiesBorderBox)

isSizeSpecifiesBorderBox

public boolean isSizeSpecifiesBorderBox()

lock

public BoxDefinition lock()

derive

public BoxDefinition derive()

getFixedPosition

public RenderLength getFixedPosition()

setFixedPosition

public void setFixedPosition(RenderLength fixedPosition)

getBorder

public Border getBorder()

setBorder

public void setBorder(Border border)

getPaddingTop

public long getPaddingTop()

setPaddingTop

public void setPaddingTop(long paddingTop)

getPaddingLeft

public long getPaddingLeft()

setPaddingLeft

public void setPaddingLeft(long paddingLeft)

getPaddingBottom

public long getPaddingBottom()

setPaddingBottom

public void setPaddingBottom(long paddingBottom)

getPaddingRight

public long getPaddingRight()

setPaddingRight

public void setPaddingRight(long paddingRight)

getPreferredHeight

public RenderLength getPreferredHeight()

setPreferredHeight

public void setPreferredHeight(RenderLength preferredHeight)

getPreferredWidth

public RenderLength getPreferredWidth()

setPreferredWidth

public void setPreferredWidth(RenderLength preferredWidth)

getMinimumHeight

public RenderLength getMinimumHeight()

setMinimumHeight

public void setMinimumHeight(RenderLength minimumHeight)

getMinimumWidth

public RenderLength getMinimumWidth()

setMinimumWidth

public void setMinimumWidth(RenderLength minimumWidth)

getMaximumHeight

public RenderLength getMaximumHeight()

setMaximumHeight

public void setMaximumHeight(RenderLength maximumHeight)

getMaximumWidth

public RenderLength getMaximumWidth()

setMaximumWidth

public void setMaximumWidth(RenderLength maximumWidth)

getMarginTop

public RenderLength getMarginTop()

setMarginTop

public void setMarginTop(RenderLength marginTop)

getMarginBottom

public RenderLength getMarginBottom()

setMarginBottom

public void setMarginBottom(RenderLength marginBottom)

getMarginLeft

public RenderLength getMarginLeft()

setMarginLeft

public void setMarginLeft(RenderLength marginLeft)

getMarginRight

public RenderLength getMarginRight()

setMarginRight

public void setMarginRight(RenderLength marginRight)

isEmpty

public boolean isEmpty()

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.

Parameters:
axis - the axis on which to split the box.
Returns:
the two new box definitions, never null.

toString

public String toString()
Overrides:
toString in class Object