|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sibvisions.rad.ui.swing.ext.layout.JVxGridLayout
public class JVxGridLayout
The GridLayout class is a layout manager that lays out a container's components in a rectangular grid.
Nested Class Summary | |
---|---|
static class |
JVxGridLayout.CellConstraints
The CellConstraint class stores the X and Y position, the Width and Height and
the insets of the component. |
Constructor Summary | |
---|---|
JVxGridLayout()
Constructs a new GridLayout that calculates columns and rows automatically. |
|
JVxGridLayout(int pColumns,
int pRows)
Constructs a new GridLayout. |
Method Summary | |
---|---|
void |
addLayoutComponent(java.awt.Component pComp,
java.lang.Object pConstraints)
|
void |
addLayoutComponent(java.lang.String pName,
java.awt.Component c)
|
static void |
checkNotNull(java.lang.Object pReference,
java.lang.String pMessage)
Throws a NullPointerException with the specified message if the given Object references null. |
int |
getColumns()
Returns the number of columns. |
JVxGridLayout.CellConstraints |
getConstraints(java.awt.Component pComp)
Gets the constraints for the specified IComponent . |
JVxGridLayout.CellConstraints |
getConstraints(int pColumns,
int pRows)
Creates a constraint with the specified number of rows and columns. |
JVxGridLayout.CellConstraints |
getConstraints(int pColumns,
int pRows,
int pWidth,
int pHeight)
Creates a constraint with the specified number of rows and columns with the determined dimensions. |
JVxGridLayout.CellConstraints |
getConstraints(int pColumns,
int pRows,
int pWidth,
int pHeight,
java.awt.Insets pInsets)
Creates a constraint with the specified number of rows and columns with the determined dimensions and insets. |
int |
getHorizontalGap()
Gets the horizontal gap. |
float |
getLayoutAlignmentX(java.awt.Container pTarget)
|
float |
getLayoutAlignmentY(java.awt.Container pTarget)
|
java.awt.Insets |
getMargins()
Gets the margins. |
int |
getRows()
Returns the number of rows. |
int |
getVerticalGap()
Gets the vertical gap. |
void |
invalidateLayout(java.awt.Container pTarget)
|
void |
layoutContainer(java.awt.Container pParent)
|
java.awt.Dimension |
maximumLayoutSize(java.awt.Container pTarget)
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container pParent)
|
void |
removeLayoutComponent(java.awt.Component pComp)
|
void |
setColumns(int pColumns)
Sets the column count. |
void |
setConstraints(java.awt.Component pComponent,
JVxGridLayout.CellConstraints pConstraints)
Puts the component and its constraints into the constraint Map. |
void |
setHorizontalGap(int pHorizontalGap)
Sets the horizontal gap. |
void |
setMargins(java.awt.Insets pMargins)
Sets the margins. |
void |
setRows(int pRows)
Sets the row count. |
void |
setVerticalGap(int pVerticalGap)
Sets the vertical gap. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JVxGridLayout()
public JVxGridLayout(int pColumns, int pRows)
pColumns
- the column count, a value smaller than 1 means automatic calculation.pRows
- the row count, a value smaller than 1 means automatic calculation.Method Detail |
---|
public void addLayoutComponent(java.lang.String pName, java.awt.Component c)
addLayoutComponent
in interface java.awt.LayoutManager
public void removeLayoutComponent(java.awt.Component pComp)
removeLayoutComponent
in interface java.awt.LayoutManager
public java.awt.Dimension preferredLayoutSize(java.awt.Container pParent)
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 pParent)
layoutContainer
in interface java.awt.LayoutManager
public void addLayoutComponent(java.awt.Component pComp, java.lang.Object pConstraints)
addLayoutComponent
in interface java.awt.LayoutManager2
public java.awt.Dimension maximumLayoutSize(java.awt.Container pTarget)
maximumLayoutSize
in interface java.awt.LayoutManager2
public float getLayoutAlignmentX(java.awt.Container pTarget)
getLayoutAlignmentX
in interface java.awt.LayoutManager2
public float getLayoutAlignmentY(java.awt.Container pTarget)
getLayoutAlignmentY
in interface java.awt.LayoutManager2
public void invalidateLayout(java.awt.Container pTarget)
invalidateLayout
in interface java.awt.LayoutManager2
public int getColumns()
public void setColumns(int pColumns)
pColumns
- the column countpublic int getRows()
public void setRows(int pRows)
pRows
- the row countpublic JVxGridLayout.CellConstraints getConstraints(java.awt.Component pComp)
IComponent
.
pComp
- the IComponent
to be queried
IComponent
,
or null if component is null or is not present
in this layoutpublic JVxGridLayout.CellConstraints getConstraints(int pColumns, int pRows)
pColumns
- the number of columnspRows
- the number of rows
public JVxGridLayout.CellConstraints getConstraints(int pColumns, int pRows, int pWidth, int pHeight)
pColumns
- the number of columnspRows
- the number of rowspWidth
- width of the contentpHeight
- height of the content
public JVxGridLayout.CellConstraints getConstraints(int pColumns, int pRows, int pWidth, int pHeight, java.awt.Insets pInsets)
pColumns
- the number of columnspRows
- the number of rowspWidth
- width of the contentpHeight
- height of the contentpInsets
- the determined insets
public void setConstraints(java.awt.Component pComponent, JVxGridLayout.CellConstraints pConstraints)
pComponent
- the componentpConstraints
- the components constraintspublic java.awt.Insets getMargins()
public void setMargins(java.awt.Insets pMargins)
pMargins
- the marginspublic int getHorizontalGap()
public void setHorizontalGap(int pHorizontalGap)
pHorizontalGap
- the horizontal gappublic int getVerticalGap()
public void setVerticalGap(int pVerticalGap)
pVerticalGap
- the vertical gappublic static void checkNotNull(java.lang.Object pReference, java.lang.String pMessage)
pReference
- the Object which shall be checkedpMessage
- the specified message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |