Class BoxLayoutContainer.BoxLayoutData

    • Constructor Summary

      Constructors 
      Constructor Description
      BoxLayoutData()
      Creates a box layout data with default values for margins (0), minSize (0), maxSize (unlimited) and flex (unflexed).
      BoxLayoutData​(Margins margins)
      Creates a box layout data with the specified margins.
    • Constructor Detail

      • BoxLayoutData

        public BoxLayoutData()
        Creates a box layout data with default values for margins (0), minSize (0), maxSize (unlimited) and flex (unflexed).
      • BoxLayoutData

        public BoxLayoutData​(Margins margins)
        Creates a box layout data with the specified margins.
        Parameters:
        margins - the margins for the box layout data
    • Method Detail

      • getFlex

        public double getFlex()
        Returns the flex value which is a weight used by the layout for sizing calculations.
        Returns:
        the flex
      • getMaxSize

        public int getMaxSize()
        Returns the maximum size to which widgets will be constrained (defaults to unlimited).
        Returns:
        the maximum allowable size when resizing widgets
      • getMinSize

        public int getMinSize()
        Returns the minimum size to which widgets will be constrained (defaults to 0)
        Returns:
        the minimum allowable size when resizing widgets
      • setFlex

        public void setFlex​(double flex)
        Sets the weighted flex value. Each child item with a flex value will be flexed horizontally according to each item's relative flex value compared to the sum of all items with a flex value specified. Values of 0 (default) will cause the child to not be 'flexed' with the initial width not being changed.
        Parameters:
        flex - the flex value
      • setMaxSize

        public void setMaxSize​(int maxSize)
        Sets the maximum size to which widgets will be constrained.
        Parameters:
        maxSize - the maximum allowable size when resizing widgets
      • setMinSize

        public void setMinSize​(int minSize)
        Sets the minimum size to which widgets will be constrained.
        Parameters:
        minSize - the minimum allowable size when resizing widgets