public interface LayoutManager
Modifier and Type | Interface and Description |
---|---|
static interface |
LayoutManager.LaidOutComponent
This interface represents a component that has been placed on an area.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponent(Component component,
LayoutParameter... parameters)
Adds a component to the layout manager
|
TerminalSize |
getPreferredSize()
Calculates the optimal size of the container this layout manager is
controlling by asking every component controlled by the manager how big
they would like to be.
|
List<? extends LayoutManager.LaidOutComponent> |
layout(TerminalSize layoutArea)
Given a size, lay out all the components on this area
|
boolean |
maximisesHorisontally() |
boolean |
maximisesVertically() |
void |
removeComponent(Component component)
Removes a component from the layout
|
void addComponent(Component component, LayoutParameter... parameters)
component
- Component to add to the layout managerparameters
- Parameters to associate with the component on this layoutvoid removeComponent(Component component)
component
- Component to removeTerminalSize getPreferredSize()
List<? extends LayoutManager.LaidOutComponent> layout(TerminalSize layoutArea)
layoutArea
- Size that the layout is allowed to useboolean maximisesVertically()
boolean maximisesHorisontally()
Copyright © 2015. All Rights Reserved.