public class ComponentLayoutBlock<C extends TabPaneComponent> extends Object implements LayoutBlock
LayoutBlock
handles exactly one TabPaneComponent
.Constructor and Description |
---|
ComponentLayoutBlock() |
Modifier and Type | Method and Description |
---|---|
C |
getComponent()
Gets the component which is managed by this block.
|
Size[] |
getSizes()
Creates a map of all sizes for which this block knows how to make an optimal
layout.
|
void |
setBounds(int x,
int y,
int width,
int height)
Sets the boundaries of this block.
|
void |
setComponent(C component)
Sets the component which should be managed by this block.
|
void |
setLayout(Size size)
Sets the layout of this block, the exact meaning of
size
depends on this block. |
void |
setOrientation(TabPlacement placement)
Tells this
LayoutBlock at which side of the tabs it is shown. |
public void setComponent(C component)
component
- the new component, may be null
public C getComponent()
null
public void setBounds(int x, int y, int width, int height)
LayoutBlock
setBounds
in interface LayoutBlock
x
- the x coordinatey
- the y coordinatewidth
- the width in pixelheight
- the height in pixelpublic Size[] getSizes()
LayoutBlock
getSizes
in interface LayoutBlock
null
public void setLayout(Size size)
LayoutBlock
size
depends on this block. In general keys returned by the last call of
LayoutBlock.getSizes()
must be accepted, for any other key the behavior
is unspecified.setLayout
in interface LayoutBlock
size
- the new layoutpublic void setOrientation(TabPlacement placement)
LayoutBlock
LayoutBlock
at which side of the tabs it is shown.setOrientation
in interface LayoutBlock
placement
- the placement, not null