public class MultiBorderLayout extends BorderLayout
BorderLayout
to support multiple
components in all of the four borders. Only one component
is allowed in the Center. Components are added from North
to South and West to East.Modifier and Type | Field and Description |
---|---|
protected Component |
center |
protected List<Component> |
eastComponents |
protected List<Component> |
northComponents |
protected List<Component> |
southComponents |
protected List<Component> |
westComponents |
AFTER_LAST_LINE, AFTER_LINE_ENDS, BEFORE_FIRST_LINE, BEFORE_LINE_BEGINS, CENTER, EAST, LINE_END, LINE_START, NORTH, PAGE_END, PAGE_START, SOUTH, WEST
Constructor and Description |
---|
MultiBorderLayout() |
MultiBorderLayout(int hgap,
int vgap) |
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(Component component,
Object name) |
void |
addLayoutComponent(String name,
Component component)
Deprecated.
replaced by
addLayoutComponent(Component, Object) . |
protected Dimension |
getLayoutSize(Container target,
boolean minimum) |
void |
layoutContainer(Container target) |
Dimension |
minimumLayoutSize(Container target) |
Dimension |
preferredLayoutSize(Container target) |
static boolean |
remove(Object O,
List<Component> V) |
void |
removeLayoutComponent(Component component) |
getConstraints, getHgap, getLayoutAlignmentX, getLayoutAlignmentY, getLayoutComponent, getLayoutComponent, getVgap, invalidateLayout, maximumLayoutSize, setHgap, setVgap, toString
protected Component center
public MultiBorderLayout()
public MultiBorderLayout(int hgap, int vgap)
public void addLayoutComponent(Component component, Object name)
addLayoutComponent
in interface LayoutManager2
addLayoutComponent
in class BorderLayout
public void addLayoutComponent(String name, Component component)
addLayoutComponent(Component, Object)
.addLayoutComponent
in interface LayoutManager
addLayoutComponent
in class BorderLayout
public void layoutContainer(Container target)
layoutContainer
in interface LayoutManager
layoutContainer
in class BorderLayout
public Dimension minimumLayoutSize(Container target)
minimumLayoutSize
in interface LayoutManager
minimumLayoutSize
in class BorderLayout
public Dimension preferredLayoutSize(Container target)
preferredLayoutSize
in interface LayoutManager
preferredLayoutSize
in class BorderLayout
public void removeLayoutComponent(Component component)
removeLayoutComponent
in interface LayoutManager
removeLayoutComponent
in class BorderLayout
Copyright © 2016. All rights reserved.