public abstract class AbstractLayout
extends java.lang.Object
implements java.awt.LayoutManager2
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HGAP
Default value of HGAP property
|
static int |
DEFAULT_VGAP
Default value of VGAP property
|
protected java.awt.Component[] |
myComponents |
protected GridConstraints[] |
myConstraints |
protected java.awt.Insets |
myMargin
This is margin between container bounds and bounds of the
area where child components are laid out.
|
Constructor and Description |
---|
AbstractLayout() |
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints) |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp) |
GridConstraints |
getConstraintsForComponent(java.awt.Component comp) |
int |
getHGap() |
protected static int |
getHGapImpl(java.awt.Container container) |
float |
getLayoutAlignmentX(java.awt.Container container) |
float |
getLayoutAlignmentY(java.awt.Container container) |
java.awt.Insets |
getMargin() |
int |
getVGap() |
protected static int |
getVGapImpl(java.awt.Container container) |
abstract void |
invalidateLayout(java.awt.Container target) |
abstract void |
layoutContainer(java.awt.Container parent) |
abstract java.awt.Dimension |
maximumLayoutSize(java.awt.Container target) |
abstract java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent) |
abstract java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent) |
void |
removeLayoutComponent(java.awt.Component comp) |
void |
setHGap(int hGap) |
void |
setMargin(java.awt.Insets margin) |
void |
setVGap(int vGap)
Sets new vertical gap between rows
|
public static final int DEFAULT_HGAP
public static final int DEFAULT_VGAP
protected java.awt.Component[] myComponents
protected GridConstraints[] myConstraints
protected java.awt.Insets myMargin
public final java.awt.Insets getMargin()
public final int getHGap()
-1
.protected static int getHGapImpl(java.awt.Container container)
public final void setHGap(int hGap)
hGap
- new horizontal gap. If hGap
is -1
then own gap is not defined and it should be inherited from parent container.java.lang.IllegalArgumentException
- if hGap
is less
then -1
public final int getVGap()
-1
.protected static int getVGapImpl(java.awt.Container container)
public final void setVGap(int vGap)
vGap
- new vertical gap. If vGap
is -1
then own gap is not defined and it should be inherited from parent container.java.lang.IllegalArgumentException
- if vGap
is less
then -1
public final void setMargin(java.awt.Insets margin)
public void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
addLayoutComponent
in interface java.awt.LayoutManager2
public final void addLayoutComponent(java.lang.String name, java.awt.Component comp)
addLayoutComponent
in interface java.awt.LayoutManager
public final void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent
in interface java.awt.LayoutManager
public GridConstraints getConstraintsForComponent(java.awt.Component comp)
public final float getLayoutAlignmentX(java.awt.Container container)
getLayoutAlignmentX
in interface java.awt.LayoutManager2
public final float getLayoutAlignmentY(java.awt.Container container)
getLayoutAlignmentY
in interface java.awt.LayoutManager2
public abstract java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize
in interface java.awt.LayoutManager2
public abstract void invalidateLayout(java.awt.Container target)
invalidateLayout
in interface java.awt.LayoutManager2
public abstract java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
public abstract java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize
in interface java.awt.LayoutManager
public abstract void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager