public class FlexibleGridLayout extends Object implements LayoutManager2
Modifier and Type | Field and Description |
---|---|
static String |
LINE_BREAK |
static String |
NO_LINE_BREAK |
Constructor and Description |
---|
FlexibleGridLayout(JPanel panel) |
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(Component pComponent,
Object pConstraints)
Adds the specified component to the layout, using the specified
constraint object.
|
void |
addLayoutComponent(String pName,
Component pComponent)
If the layout manager uses a per-component string, adds the component
comp to the layout, associating it with the string
specified by name . |
float |
getLayoutAlignmentX(Container pTarget)
Returns the alignment along the x axis.
|
float |
getLayoutAlignmentY(Container pTarget)
Returns the alignment along the y axis.
|
void |
invalidateLayout(Container pTarget)
Invalidates the layout, indicating that if the layout manager has cached
information it should be discarded.
|
void |
layoutContainer(Container parent)
Lays out the specified container.
|
Dimension |
maximumLayoutSize(Container parent)
Calculates the maximum size dimensions for the specified container, given
the components it contains.
|
Dimension |
minimumLayoutSize(Container parent)
Calculates the minimum size dimensions for the specified container, given
the components it contains.
|
Dimension |
preferredLayoutSize(Container pParent)
Calculates the preferred size dimensions for the specified container,
given the components it contains.
|
void |
removeLayoutComponent(Component pComponent)
Removes the specified component from the layout.
|
void |
setDefaultBreak(int pDefaultBreak) |
void |
setVgap(int pDluGapSize) |
public static final String LINE_BREAK
public static final String NO_LINE_BREAK
public FlexibleGridLayout(JPanel panel)
public void setDefaultBreak(int pDefaultBreak)
public void addLayoutComponent(String pName, Component pComponent)
comp
to the layout, associating it with the string
specified by name
.addLayoutComponent
in interface LayoutManager
pName
- the string to be associated with the componentpComponent
- the component to be addedpublic void addLayoutComponent(Component pComponent, Object pConstraints)
addLayoutComponent
in interface LayoutManager2
pComponent
- the component to be addedpConstraints
- where/how the component is added to the layout.public void removeLayoutComponent(Component pComponent)
removeLayoutComponent
in interface LayoutManager
pComponent
- the component to be removedpublic void layoutContainer(Container parent)
layoutContainer
in interface LayoutManager
parent
- the container to be laid outpublic Dimension minimumLayoutSize(Container parent)
minimumLayoutSize
in interface LayoutManager
parent
- the component to be laid outpreferredLayoutSize(Container)
public Dimension maximumLayoutSize(Container parent)
maximumLayoutSize
in interface LayoutManager2
Component.getMaximumSize()
,
LayoutManager
public Dimension preferredLayoutSize(Container pParent)
preferredLayoutSize
in interface LayoutManager
pParent
- the container to be laid outminimumLayoutSize(java.awt.Container)
public void invalidateLayout(Container pTarget)
invalidateLayout
in interface LayoutManager2
public float getLayoutAlignmentX(Container pTarget)
getLayoutAlignmentX
in interface LayoutManager2
public float getLayoutAlignmentY(Container pTarget)
getLayoutAlignmentY
in interface LayoutManager2
public void setVgap(int pDluGapSize)
Copyright © 2017 Jürgen Zeller (privat). All rights reserved.