public class ToolBarLayout
extends java.lang.Object
implements java.awt.LayoutManager2, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
X_AXIS
Specifies that components should be laid out left to right.
|
static int |
Y_AXIS
Specifies that components should be laid out top to bottom.
|
Constructor and Description |
---|
ToolBarLayout()
Creates a layout manager that will lay out components along the
X-axis.
|
ToolBarLayout(int axis)
Creates a layout manager that will lay out components along the
given axis.
|
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) |
float |
getLayoutAlignmentX(java.awt.Container target) |
float |
getLayoutAlignmentY(java.awt.Container target) |
void |
invalidateLayout(java.awt.Container target) |
void |
layoutContainer(java.awt.Container parent) |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target) |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent) |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent) |
void |
removeLayoutComponent(java.awt.Component comp) |
public static final int X_AXIS
public static final int Y_AXIS
public ToolBarLayout()
public ToolBarLayout(int axis)
axis
- the axis to lay out components along. Can be one of:
BoxLayout.X_AXIS
,
BoxLayout.Y_AXIS
,java.awt.AWTError
- if the value of axis
is invalidpublic void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
addLayoutComponent
in interface java.awt.LayoutManager2
public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize
in interface java.awt.LayoutManager2
public float getLayoutAlignmentX(java.awt.Container target)
getLayoutAlignmentX
in interface java.awt.LayoutManager2
public float getLayoutAlignmentY(java.awt.Container target)
getLayoutAlignmentY
in interface java.awt.LayoutManager2
public void invalidateLayout(java.awt.Container target)
invalidateLayout
in interface java.awt.LayoutManager2
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
addLayoutComponent
in interface java.awt.LayoutManager
public void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent
in interface java.awt.LayoutManager
public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize
in interface java.awt.LayoutManager
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize
in interface java.awt.LayoutManager
public void layoutContainer(java.awt.Container parent)
layoutContainer
in interface java.awt.LayoutManager