Module flower.widget.BoxLayout

This is the class that sets the layout of the box.

Info:

  • Release: V3.0.0
  • Author: Makoto

Functions

BoxLayout:_initInternal () Initializes the internal variables.
BoxLayout:update (parent) Update the layout.
BoxLayout:updateVertical (parent) Sets the position of an objects in the vertical direction.
BoxLayout:updateHorizotal (parent) Sets the position of an objects in the horizontal direction.
BoxLayout:calcChildX (parentWidth, childWidth) Calculates the x position of the child object.
BoxLayout:calcChildY (parentHeight, childHeight) Calculates the y position of the child object.
BoxLayout:calcVerticalLayoutSize (children) Calculate the layout size in the vertical direction.
BoxLayout:calcHorizotalLayoutSize (children) Calculate the layout size in the horizontal direction.
BoxLayout:setPadding (left, top, right, bottom) Set the padding.
BoxLayout:setAlign (horizontalAlign, verticalAlign) Set the alignment.
BoxLayout:setDirection (direction) Set the direction.
BoxLayout:setGap (horizontalGap, verticalGap) Set the gap.
BoxLayout:setLayoutPolicy (horizontalPolicy, verticalPolicy) Set the layout policy.

Fields

HORIZONTAL_LEFT Horizotal Align: left
HORIZONTAL_CENTER Horizotal Align: center
HORIZONTAL_RIGHT Horizotal Align: right
VERTICAL_TOP Vertical Align: top
VERTICAL_CENTER Vertical Align: center
VERTICAL_BOTTOM Vertical Align: bottom
DIRECTION_VERTICAL Layout Direction: vertical
DIRECTION_HORIZONTAL Layout Direction: horizontal
LAYOUT_POLICY_NONE Layout Policy: none
LAYOUT_POLICY_FIT_CONTENT Layout Policy: fitContent
LAYOUT_POLICY_FILL_PARENT Layout Policy: fillParent


Functions

BoxLayout:_initInternal ()
Initializes the internal variables.
BoxLayout:update (parent)
Update the layout.

Parameters:

  • parent parent
BoxLayout:updateVertical (parent)
Sets the position of an objects in the vertical direction.

Parameters:

  • parent
BoxLayout:updateHorizotal (parent)
Sets the position of an objects in the horizontal direction.

Parameters:

  • parent
BoxLayout:calcChildX (parentWidth, childWidth)
Calculates the x position of the child object.

Parameters:

  • parentWidth parent width.
  • childWidth child width.

Returns:

    x position.
BoxLayout:calcChildY (parentHeight, childHeight)
Calculates the y position of the child object.

Parameters:

  • parentHeight parent width.
  • childHeight child width.

Returns:

    y position.
BoxLayout:calcVerticalLayoutSize (children)
Calculate the layout size in the vertical direction.

Parameters:

  • children children

Returns:

  1. layout width
  2. layout height
BoxLayout:calcHorizotalLayoutSize (children)
Calculate the layout size in the horizontal direction.

Parameters:

  • children children

Returns:

  1. layout width
  2. layout height
BoxLayout:setPadding (left, top, right, bottom)
Set the padding.

Parameters:

  • left left padding
  • top top padding
  • right right padding
  • bottom bottom padding
BoxLayout:setAlign (horizontalAlign, verticalAlign)
Set the alignment.

Parameters:

  • horizontalAlign horizontal align
  • verticalAlign vertical align
BoxLayout:setDirection (direction)
Set the direction.

Parameters:

  • direction direction("horizontal" or "vertical")
BoxLayout:setGap (horizontalGap, verticalGap)
Set the gap.

Parameters:

  • horizontalGap horizontal gap
  • verticalGap vertical gap
BoxLayout:setLayoutPolicy (horizontalPolicy, verticalPolicy)
Set the layout policy.

Parameters:

  • horizontalPolicy horizontal policy
  • verticalPolicy vertical policy

Fields

HORIZONTAL_LEFT
Horizotal Align: left
HORIZONTAL_CENTER
Horizotal Align: center
HORIZONTAL_RIGHT
Horizotal Align: right
VERTICAL_TOP
Vertical Align: top
VERTICAL_CENTER
Vertical Align: center
VERTICAL_BOTTOM
Vertical Align: bottom
DIRECTION_VERTICAL
Layout Direction: vertical
DIRECTION_HORIZONTAL
Layout Direction: horizontal
LAYOUT_POLICY_NONE
Layout Policy: none
LAYOUT_POLICY_FIT_CONTENT
Layout Policy: fitContent
LAYOUT_POLICY_FILL_PARENT
Layout Policy: fillParent
generated by LDoc 1.3