|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjv.objectGui.PsSlotLayout
Layout manager generalizes GridLayout(1,n) where each component may occupy more than one slot in a horizontal row.
The following example creates a horizontal panel which has three slots. The first slot is occupied with a label and the remaining two slots are filled with a TextField.
Example usage:
panel.setLayout(new PsSlotLayout(3));
panel.add("1", new Label("Name"));
panel.add("2", new TextField());
Currently, components cannot be removed from this layout manager once they have been added. This may be implemented later.
| Constructor Summary | |
PsSlotLayout(int numSlots)
Constructor with total number of slots of this container. |
|
| Method Summary | |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
The string contains the number of slots of the current component. |
void |
layoutContainer(java.awt.Container parent)
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
|
void |
removeLayoutComponent(java.awt.Component comp)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PsSlotLayout(int numSlots)
| Method Detail |
public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagerpublic java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerpublic void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManagerpublic void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManager
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||