|
ProgramixGenericLib v5.0.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.programix.gui.layout.AbstractTableLayout
public abstract class AbstractTableLayout
Generalized layout for components that are going to be laid out in rows and columns.
There's nothing in this class that prevents a single instance from being used simultaneously by multiple containers. This class is abstract, so be sure that this is also true for the particular subclass that is being used.
AnchorTableLayout
,
FormLayout
,
ColumnButtonLayout
,
RowButtonLayout
,
StackLayout
,
ShelfLayout
,
ColumnCoordinator
,
Serialized FormNested Class Summary | |
---|---|
protected class |
AbstractTableLayout.CellData
|
Field Summary | |
---|---|
protected AnchorPoint |
anchorPoint
The region to cluster the table in when the container is bigger than the table requires. |
protected int |
borderGap
The number of pixels to pad the top, bottom, left, and right areas around the table. |
protected int |
colGap
The number of pixels between columns when there is more than one column. |
protected ColumnCoordinator |
columnCoordinator
If non-null, then this coordinates the widths of some or all columns across containers--even those with different layout managers. |
static AnchorPoint |
DEFAULT_ANCHOR_POINT
The default anchor point used when the container is larger than is needed for the table. |
static int |
DEFAULT_BORDER_GAP
The default number of pixels to be placed around the outside of all the table before the edge of the container. |
static int |
DEFAULT_COL_GAP
The default number of pixels to be placed between columns when more than one column is present. |
static int |
DEFAULT_ROW_GAP
The default number of pixels to be placed between rows when more than one row is present. |
protected boolean |
ignoreInvisibleComponents
If true (the default) then components that are not visible will be ignored during layout. |
protected int |
rowGap
The number of pixels between rows when there is more than one row. |
Constructor Summary | |
---|---|
protected |
AbstractTableLayout(int rowGap,
int colGap,
int borderGap,
AnchorPoint anchorPoint)
Creates a table layout. |
Method Summary | |
---|---|
void |
addLayoutComponent(String name,
Component comp)
Called by the graphical subsystem when a component is being added to the container. |
protected abstract AbstractTableLayout.CellData |
createCellData(Container pane)
|
AnchorPoint |
getAnchorPoint()
Returns the region to cluster the table in when the container is bigger than the table requires. |
int |
getBorderGap()
Returns the number of pixels to pad the top, bottom, left, and right areas around the table. |
protected ColumnCoordinator |
getColumnCoordinator()
Returns the currently assigned ColumnCoordinator or
null none has been assigned. |
int |
getColumnGap()
Returns the number of pixels placed between columns when more than one column is present. |
int |
getRowGap()
Returns the number of pixels placed between rows when more than one row is present. |
boolean |
isIgnoreInvisibleComponents()
Returns true if components that are not currently visible should be ignored during layout. |
void |
layoutContainer(Container parent)
Called by the graphical subsystem when the container wants to re-layout the components within it. |
Dimension |
minimumLayoutSize(Container parent)
Called by the graphical subsystem when the container wants to know what to report its minimum size as. |
Dimension |
preferredLayoutSize(Container parent)
Called by the graphical subsystem when the container wants to know what to report its preferred size as. |
void |
removeLayoutComponent(Component comp)
Called by the graphical subsystem when a component is being removed from the container. |
void |
setAnchorPoint(AnchorPoint anchorPoint)
Changes the region to cluster the table in when the container is bigger than the table requires. |
void |
setBorderGap(int borderGap)
Changes the number of pixels to pad the top, bottom, left, and right areas around the table. |
protected void |
setColumnCoordinator(ColumnCoordinator newCoordinator)
Changes the currently assigned ColumnCoordinator . |
void |
setColumnGap(int colGap)
Changes the number of pixels placed between columns when more than one column is present. |
void |
setIgnoreInvisibleComponents(boolean ignoreInvisibleComponents)
Indicated whether or not invisible components should be considered during layout. |
void |
setRowGap(int rowGap)
Changes the number of pixels placed between rows when more than one row is present. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_ROW_GAP
public static final int DEFAULT_COL_GAP
public static final int DEFAULT_BORDER_GAP
public static final AnchorPoint DEFAULT_ANCHOR_POINT
AnchorPoint.NORTH
.
protected int rowGap
protected int colGap
protected int borderGap
protected AnchorPoint anchorPoint
protected boolean ignoreInvisibleComponents
protected ColumnCoordinator columnCoordinator
ColumnCoordinator
for details on how
to coordinate columns. Directly modifying this field is
discouraged. Use getColumnCoordinator()
and setColumnCoordinator(ColumnCoordinator)
instead.
Constructor Detail |
---|
protected AbstractTableLayout(int rowGap, int colGap, int borderGap, AnchorPoint anchorPoint)
rowGap
- space between rows.
See setRowGap()
.colGap
- space between columns.
See setColumnGap
.borderGap
- space around the outside of the form.
See setBorderGap()
.anchorPoint
- region to anchor to when there is extra space
See setAnchorPoint()
.Method Detail |
---|
public void layoutContainer(Container parent)
layoutContainer
in interface LayoutManager
public Dimension preferredLayoutSize(Container parent)
preferredLayoutSize
in interface LayoutManager
public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize
in interface LayoutManager
public void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
public void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
public int getRowGap()
public void setRowGap(int rowGap)
public int getColumnGap()
public void setColumnGap(int colGap)
public int getBorderGap()
public void setBorderGap(int borderGap)
public AnchorPoint getAnchorPoint()
public void setAnchorPoint(AnchorPoint anchorPoint)
DEFAULT_ANCHOR_POINT
will
be used instead.
public boolean isIgnoreInvisibleComponents()
public void setIgnoreInvisibleComponents(boolean ignoreInvisibleComponents)
protected ColumnCoordinator getColumnCoordinator()
ColumnCoordinator
or
null none has been assigned. There can be zero or
one ColumnCoordinator's assigned to a layout manager.
By default, a layout manager does not have a ColumnCoordinator.
See ColumnCoordinator
for details.
NOTE: This method is generally for internal use.
protected void setColumnCoordinator(ColumnCoordinator newCoordinator)
ColumnCoordinator
.
There can be zero or one ColumnCoordinator's assigned to a
layout manager. Passing null to this method clears the
associated coordinator and automatically tells the previous
coordinator (if there was one) that this layout manager is no
longer coordinating.
By default, a layout manager does not have a ColumnCoordinator.
See ColumnCoordinator
for details.
NOTE: This method is generally for internal use. Most users
should call methods on ColumnCoordinator
to alter a
container's participation in column coordination.
newCoordinator
- the new coordinator or null.protected abstract AbstractTableLayout.CellData createCellData(Container pane)
|
ProgramixGenericLib v5.0.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |