Package jexer.layout

Class BoxLayoutManager

  • All Implemented Interfaces:
    LayoutManager

    public class BoxLayoutManager
    extends java.lang.Object
    implements LayoutManager
    BoxLayoutManager repositions child widgets based on the order they are added to the parent widget and desired orientation.
    • Constructor Summary

      Constructors 
      Constructor Description
      BoxLayoutManager​(int width, int height, boolean vertical)
      Public constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(TWidget child)
      Add a child widget to manage.
      void onResize​(TResizeEvent resize)
      Process the parent widget's resize event, and resize/reposition child widgets.
      void remove​(TWidget child)
      Remove a child widget from those managed by this LayoutManager.
      void resetSize​(TWidget child)
      Reset a child widget's original/preferred size.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BoxLayoutManager

        public BoxLayoutManager​(int width,
                                int height,
                                boolean vertical)
        Public constructor.
        Parameters:
        width - the width of the parent widget
        height - the height of the parent widget
        vertical - if true, arrange widgets vertically
    • Method Detail

      • onResize

        public void onResize​(TResizeEvent resize)
        Process the parent widget's resize event, and resize/reposition child widgets.
        Specified by:
        onResize in interface LayoutManager
        Parameters:
        resize - resize event
      • add

        public void add​(TWidget child)
        Add a child widget to manage.
        Specified by:
        add in interface LayoutManager
        Parameters:
        child - the widget to manage
      • remove

        public void remove​(TWidget child)
        Remove a child widget from those managed by this LayoutManager.
        Specified by:
        remove in interface LayoutManager
        Parameters:
        child - the widget to remove
      • resetSize

        public void resetSize​(TWidget child)
        Reset a child widget's original/preferred size.
        Specified by:
        resetSize in interface LayoutManager
        Parameters:
        child - the widget to manage