|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.extended.layout.AbstractLayoutManager com.alee.extended.layout.FormLayout
public class FormLayout
Field Summary | |
---|---|
static java.lang.String |
CENTER
|
static java.lang.String |
FILL
|
protected boolean |
fillLeftSide
Whether left side of the form should fill all the free space given by container or not. |
protected boolean |
fillLeftSideHeight
Whether component in each form row on the left side of the form should fill given height or not by default. |
protected boolean |
fillRightSide
Whether right side of the form should fill all the free space given by container or not. |
protected boolean |
fillRightSideHeight
Whether component in each form row on the right side of the form should fill given height or not by default. |
protected int |
horizontalGap
Horizontal gap between columns. |
protected java.util.Map<java.awt.Component,java.lang.String> |
layoutConstraints
Added component constraints. |
static java.lang.String |
LEFT
Form elements constraint constants. |
protected int |
leftVerticalAlignment
Default vertical alignment of components on the left side of the form. |
static java.lang.String |
RIGHT
|
protected int |
rightVerticalAlignment
Default vertical alignment of components on the right side of the form. |
protected int |
verticalGap
Vertical gap between rows. |
Constructor Summary | |
---|---|
FormLayout()
Constructs new FormLayout with zero gaps and filled right side. |
|
FormLayout(boolean fillLeftSide,
boolean fillRightSide)
Constructs new FormLayout with zero gaps and specified left/right side fills. |
|
FormLayout(boolean fillLeftSide,
boolean fillRightSide,
int horizontalGap,
int verticalGap)
Constructs new FormLayout with specified gaps and left/right side fills. |
|
FormLayout(int horizontalGap,
int verticalGap)
Constructs new FormLayout with specified gaps and filled right side. |
Method Summary | |
---|---|
void |
addComponent(java.awt.Component component,
java.lang.Object constraints)
Caled when component added into container with this layout. |
int |
getHorizontalGap()
Returns horizontal gap between columns. |
int |
getLeftVerticalAlignment()
Returns default vertical alignment of components on the left side of the form. |
int |
getRightVerticalAlignment()
Returns default vertical alignment of components on the right side of the form. |
protected int |
getSideY(boolean leftSide,
int rowY,
int rowHeight,
int componentHeight)
Returns component Y coordinate for the specified side and other settings. |
int |
getVerticalGap()
Returns vertical gap between rows. |
boolean |
isFillLeftSide()
Returns whether left side of the form should fill all the free space given by container or not. |
boolean |
isFillLeftSideHeight()
Returns whether component in each form row on the left side of the form should fill given height or not. |
boolean |
isFillRightSide()
Returns whether right side of the form should fill all the free space given by container or not. |
boolean |
isFillRightSideHeight()
Returns whether component in each form row on the right side of the form should fill given height or not. |
void |
layoutContainer(java.awt.Container parent)
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
|
void |
removeComponent(java.awt.Component component)
Called when component removed from container with this layout. |
void |
setFillLeftSide(boolean fillLeftSide)
Sets whether left side of the form should fill all the free space given by container or not. |
void |
setFillLeftSideHeight(boolean fillLeftSideHeight)
Sets whether component in each form row on the left side of the form should fill given height or not. |
void |
setFillRightSide(boolean fillRightSide)
Sets whether right side of the form should fill all the free space given by container or not. |
void |
setFillRightSideHeight(boolean fillRightSideHeight)
Sets whether component in each form row on the right side of the form should fill given height or not. |
void |
setHorizontalGap(int horizontalGap)
Sets horizontal gap between columns. |
void |
setLeftVerticalAlignment(int leftVerticalAlignment)
Sets default vertical alignment of components on the left side of the form. |
void |
setRightVerticalAlignment(int rightVerticalAlignment)
Sets default vertical alignment of components on the right side of the form. |
void |
setVerticalGap(int verticalGap)
Sets vertical gap between rows. |
Methods inherited from class com.alee.extended.layout.AbstractLayoutManager |
---|
addLayoutComponent, addLayoutComponent, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, maximumLayoutSize, minimumLayoutSize, removeLayoutComponent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LEFT
public static final java.lang.String CENTER
public static final java.lang.String RIGHT
public static final java.lang.String FILL
protected boolean fillLeftSide
protected boolean fillRightSide
protected boolean fillLeftSideHeight
protected boolean fillRightSideHeight
protected int leftVerticalAlignment
protected int rightVerticalAlignment
protected int horizontalGap
protected int verticalGap
protected java.util.Map<java.awt.Component,java.lang.String> layoutConstraints
Constructor Detail |
---|
public FormLayout()
public FormLayout(boolean fillLeftSide, boolean fillRightSide)
fillLeftSide
- whether left side of the form should fill all the free space given by container or notfillRightSide
- whether right side of the form should fill all the free space given by container or notpublic FormLayout(int horizontalGap, int verticalGap)
horizontalGap
- horizontal gap between columnsverticalGap
- vertical gap between rowspublic FormLayout(boolean fillLeftSide, boolean fillRightSide, int horizontalGap, int verticalGap)
fillLeftSide
- whether left side of the form should fill all the free space given by container or notfillRightSide
- whether right side of the form should fill all the free space given by container or nothorizontalGap
- horizontal gap between columnsverticalGap
- vertical gap between rowsMethod Detail |
---|
public boolean isFillLeftSide()
public void setFillLeftSide(boolean fillLeftSide)
fillLeftSide
- whether left side of the form should fill all the free space given by container or notpublic boolean isFillRightSide()
public void setFillRightSide(boolean fillRightSide)
fillRightSide
- whether right side of the form should fill all the free space given by container or notpublic boolean isFillLeftSideHeight()
public void setFillLeftSideHeight(boolean fillLeftSideHeight)
fillLeftSideHeight
- whether component in each form row on the left side of the form should fill given height or notpublic boolean isFillRightSideHeight()
public void setFillRightSideHeight(boolean fillRightSideHeight)
fillRightSideHeight
- whether component in each form row on the right side of the form should fill given height or notpublic int getLeftVerticalAlignment()
public void setLeftVerticalAlignment(int leftVerticalAlignment)
leftVerticalAlignment
- default vertical alignment of components on the left side of the formpublic int getRightVerticalAlignment()
public void setRightVerticalAlignment(int rightVerticalAlignment)
rightVerticalAlignment
- default vertical alignment of components on the right side of the formpublic int getHorizontalGap()
public void setHorizontalGap(int horizontalGap)
horizontalGap
- horizontal gap between columnspublic int getVerticalGap()
public void setVerticalGap(int verticalGap)
verticalGap
- vertical gap between rowspublic void addComponent(java.awt.Component component, java.lang.Object constraints)
addComponent
in class AbstractLayoutManager
component
- added componentconstraints
- component constraintspublic void removeComponent(java.awt.Component component)
removeComponent
in class AbstractLayoutManager
component
- removed componentpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
public void layoutContainer(java.awt.Container parent)
protected int getSideY(boolean leftSide, int rowY, int rowHeight, int componentHeight)
leftSide
- whether component is on the left side of the form or notrowY
- row Y coordinaterowHeight
- row heightcomponentHeight
- component preferred height
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |