|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttablelayout.TableLayout
public class TableLayout
TableLayout is a layout manager which allows components to be arranged in a tabular form. The TableLayout component has a layout resource which is used to specify the column and row position of each component. Components can span rows and/or columns. Layout options are available to control the initial sizes, justification, and dynamic resizing
Constructor Summary | |
---|---|
TableLayout()
|
Method Summary | |
---|---|
void |
addLayoutComponent(String name,
Component comp)
Adds the specified component with the layout string to the layout |
Object |
clone()
Creates a clone of the object. |
void |
columnSpacing(int sp)
Specifies the number of pixels between columns |
void |
forceShrink(boolean force)
Specifies if components should be made smaller than their "preferred" sizes. |
void |
layoutContainer(Container target)
Lays out the container in the specified panel |
void |
marginHeight(int i)
The minimum spacing between the top and bottom edges of the components in the Container |
void |
marginWidth(int i)
The minimum spacing between the left and right edges of the components in the Container |
Dimension |
minimumLayoutSize(Container target)
Calculates the minimum size dimensions for the specified panel, given the components in the specified target container |
Dimension |
preferredLayoutSize(Container target)
Calculates the preferred size dimensions for the specified panel, given the components in the specified target container |
void |
removeLayoutComponent(Component comp)
Removes the specified component from the layout |
void |
rowSpacing(int sp)
Specifies the number of pixels between rows |
void |
sameHeight(Vector v)
This resource is used to specify the names of components which will be constrained to remain the same heigth as the table shrinks and grows |
void |
sameWidth(Vector v)
This resource is used to specify the names of components which will be constrained to remain the same width as the table shrinks and grows |
String |
toString()
Returns the String representation |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TableLayout()
Method Detail |
---|
public void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
layout
- represents the wanted layout of the componentcomp
- the component to be addedTableLocRec
public void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
comp
- the component to be removedpublic Dimension preferredLayoutSize(Container target)
preferredLayoutSize
in interface LayoutManager
target
- the component to be laid outpublic Dimension minimumLayoutSize(Container target)
minimumLayoutSize
in interface LayoutManager
target
- the component to be laid outpublic void layoutContainer(Container target)
layoutContainer
in interface LayoutManager
target
- the component to be laid outpublic void sameWidth(Vector v)
v
- the vector of component with the same widthpublic void sameHeight(Vector v)
v
- the vector of component with the same heigthpublic void marginWidth(int i)
i
- the spacingpublic void marginHeight(int i)
i
- the spacingpublic void forceShrink(boolean force)
force
- boolean to indicate shrink should be forcedTableOpts
public void columnSpacing(int sp)
sp
- the spacing between columnspublic void rowSpacing(int sp)
sp
- the spacing between rowspublic String toString()
toString
in class Object
public Object clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |