de.lessvoid.nifty.layout
Class BoxConstraints

java.lang.Object
  extended by de.lessvoid.nifty.layout.BoxConstraints

public class BoxConstraints
extends Object

The BoxConstraints class represent a rectangular area on the screen. It has a position (x,y) as well as height and width attributes.

Author:
void

Constructor Summary
BoxConstraints()
          default constructor.
BoxConstraints(BoxConstraints src)
          copy constructor.
BoxConstraints(SizeValue newX, SizeValue newY, SizeValue newWidth, SizeValue newHeight, HorizontalAlign newHorizontalAlign, VerticalAlign newVerticalAlign)
          create new BoxConstraints.
 
Method Summary
 SizeValue getHeight()
          Get the current height constraint for the box.
 HorizontalAlign getHorizontalAlign()
          Get the current horizontal align.
 SizeValue getPaddingBottom()
           
 SizeValue getPaddingLeft()
           
 SizeValue getPaddingRight()
           
 SizeValue getPaddingTop()
           
 VerticalAlign getVerticalAlign()
          Get the current VerticalAlign.
 SizeValue getWidth()
          Get the current width constraint of the box.
 SizeValue getX()
          Get the horizontal position constraint of the box.
 SizeValue getY()
          Get the vertical position constraint of the box.
 void setHeight(SizeValue newHeight)
          Set a new height constraint for the box.
 void setHorizontalAlign(HorizontalAlign newHorizontalAlign)
          Set a new horizontal align.
 void setPadding(SizeValue padding)
           
 void setPadding(SizeValue topBottomParam, SizeValue leftRightParam)
           
 void setPadding(SizeValue topParam, SizeValue leftRightParam, SizeValue bottomParam)
           
 void setPadding(SizeValue topParam, SizeValue rightParam, SizeValue bottomParam, SizeValue leftParam)
           
 void setPaddingBottom(SizeValue paddingBottomParam)
           
 void setPaddingLeft(SizeValue paddingLeftParam)
           
 void setPaddingRight(SizeValue paddingRightParam)
           
 void setPaddingTop(SizeValue paddingTopParam)
           
 void setVerticalAlign(VerticalAlign newVerticalAlign)
          Set a new VerticalAlign.
 void setWidth(SizeValue newWidth)
          Set a new width constraint for the box.
 void setX(SizeValue newX)
          Get the horizontal position constraint of the box.
 void setY(SizeValue newY)
          Set the vertical position constraint of the box.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoxConstraints

public BoxConstraints()
default constructor.


BoxConstraints

public BoxConstraints(SizeValue newX,
                      SizeValue newY,
                      SizeValue newWidth,
                      SizeValue newHeight,
                      HorizontalAlign newHorizontalAlign,
                      VerticalAlign newVerticalAlign)
create new BoxConstraints.

Parameters:
newX - x
newY - y
newWidth - width
newHeight - height
newHorizontalAlign - horizontal align
newVerticalAlign - vertical align

BoxConstraints

public BoxConstraints(BoxConstraints src)
copy constructor.

Parameters:
src - source instance to copy from
Method Detail

getX

public final SizeValue getX()
Get the horizontal position constraint of the box.

Returns:
the horizontal position of the box

setX

public final void setX(SizeValue newX)
Get the horizontal position constraint of the box.

Parameters:
newX - the horizontal position of the box

getY

public final SizeValue getY()
Get the vertical position constraint of the box.

Returns:
the vertical position of the box

setY

public final void setY(SizeValue newY)
Set the vertical position constraint of the box.

Parameters:
newY - the vertical position of the box

getHeight

public final SizeValue getHeight()
Get the current height constraint for the box.

Returns:
the current height of the box

setHeight

public final void setHeight(SizeValue newHeight)
Set a new height constraint for the box.

Parameters:
newHeight - the new height for the box.

getWidth

public final SizeValue getWidth()
Get the current width constraint of the box.

Returns:
the current width of the box

setWidth

public final void setWidth(SizeValue newWidth)
Set a new width constraint for the box.

Parameters:
newWidth - the new width

getHorizontalAlign

public final HorizontalAlign getHorizontalAlign()
Get the current horizontal align.

Returns:
the current horizontal align.

setHorizontalAlign

public final void setHorizontalAlign(HorizontalAlign newHorizontalAlign)
Set a new horizontal align.

Parameters:
newHorizontalAlign - the new horizontal align

getVerticalAlign

public final VerticalAlign getVerticalAlign()
Get the current VerticalAlign.

Returns:
the current VerticalAlign

setVerticalAlign

public final void setVerticalAlign(VerticalAlign newVerticalAlign)
Set a new VerticalAlign.

Parameters:
newVerticalAlign - the new vertical align

getPaddingLeft

public SizeValue getPaddingLeft()

getPaddingRight

public SizeValue getPaddingRight()

getPaddingTop

public SizeValue getPaddingTop()

getPaddingBottom

public SizeValue getPaddingBottom()

setPaddingLeft

public void setPaddingLeft(SizeValue paddingLeftParam)

setPaddingRight

public void setPaddingRight(SizeValue paddingRightParam)

setPaddingTop

public void setPaddingTop(SizeValue paddingTopParam)

setPaddingBottom

public void setPaddingBottom(SizeValue paddingBottomParam)

setPadding

public void setPadding(SizeValue topBottomParam,
                       SizeValue leftRightParam)

setPadding

public void setPadding(SizeValue topParam,
                       SizeValue leftRightParam,
                       SizeValue bottomParam)

setPadding

public void setPadding(SizeValue topParam,
                       SizeValue rightParam,
                       SizeValue bottomParam,
                       SizeValue leftParam)

setPadding

public void setPadding(SizeValue padding)


Copyright © 2011. All Rights Reserved.