LayoutManager
public class AbsoluteLayout extends Object implements LayoutManager
Constructor | Description |
---|---|
AbsoluteLayout() |
Modifier and Type | Method | Description |
---|---|---|
void |
doLayout(TerminalSize area,
List<Component> components) |
Given a size constraint, update the location and size of each component in the component list by laying them out
in the available area.
|
TerminalSize |
getPreferredSize(List<Component> components) |
This method returns the dimensions it would prefer to have to be able to layout all components while giving all
of them as much space as they are asking for.
|
boolean |
hasChanged() |
Returns true if the internal state of this LayoutManager has changed since the last call to doLayout.
|
public TerminalSize getPreferredSize(List<Component> components)
LayoutManager
getPreferredSize
in interface LayoutManager
components
- List of componentspublic void doLayout(TerminalSize area, List<Component> components)
LayoutManager
setPosition(..)
and setSize(..)
on the Components.doLayout
in interface LayoutManager
area
- Size available to this layout manager to lay out the components oncomponents
- List of components to lay outpublic boolean hasChanged()
LayoutManager
hasChanged
in interface LayoutManager
true
if this layout manager's internal state has changed since the last call to doLayout
Copyright © 2020. All rights reserved.