Package jexer.layout
Class StretchLayoutManager
- java.lang.Object
-
- jexer.layout.StretchLayoutManager
-
- All Implemented Interfaces:
LayoutManager
public class StretchLayoutManager extends java.lang.Object implements LayoutManager
StretchLayoutManager repositions child widgets based on their coordinates when added and the current widget size.
-
-
Constructor Summary
Constructors Constructor Description StretchLayoutManager(int width, int height)
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.
-
-
-
Method Detail
-
onResize
public void onResize(TResizeEvent resize)
Process the parent widget's resize event, and resize/reposition child widgets.- Specified by:
onResize
in interfaceLayoutManager
- Parameters:
resize
- resize event
-
add
public void add(TWidget child)
Add a child widget to manage.- Specified by:
add
in interfaceLayoutManager
- 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 interfaceLayoutManager
- Parameters:
child
- the widget to remove
-
resetSize
public void resetSize(TWidget child)
Reset a child widget's original/preferred size.- Specified by:
resetSize
in interfaceLayoutManager
- Parameters:
child
- the widget to manage
-
-