jv.objectGui

## Class PsSlotLayout

- java.lang.Object
- - jv.objectGui.PsSlotLayout

- All Implemented Interfaces:
    java.awt.LayoutManager, java.io.Serializable

      public final class PsSlotLayout
      extends java.lang.Object
      implements java.awt.LayoutManager, java.io.Serializable

  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.

  See Also:
    Serialized Form
  Author:
    Konrad Polthier
  Version:
    25.08.04, 1.10 revised (kp) Check number of components to avoid exception.
    24.03.02, 1.00 created (kp)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PsSlotLayout(int numSlots)` Constructor with total number of slots of this container.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addLayoutComponent(java.lang.String name, java.awt.Component comp)` Add a new component which occupies the given number of slots.
    `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

    - #### PsSlotLayout

          public PsSlotLayout(int numSlots)

      Constructor with total number of slots of this container.

  - ### Method Detail

    - #### addLayoutComponent

          public void addLayoutComponent(java.lang.String name,
                                         java.awt.Component comp)

      Add a new component which occupies the given number of slots. The overall occupied number of slots must be equal to the total number of slots reserved in the constructor. param name contains the number of slots of the current component.
      Specified by:
        `addLayoutComponent` in interface `java.awt.LayoutManager`

    - #### minimumLayoutSize

          public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)

      Specified by:
        `minimumLayoutSize` in interface `java.awt.LayoutManager`

    - #### preferredLayoutSize

          public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)

      Specified by:
        `preferredLayoutSize` in interface `java.awt.LayoutManager`

    - #### layoutContainer

          public void layoutContainer(java.awt.Container parent)

      Specified by:
        `layoutContainer` in interface `java.awt.LayoutManager`

    - #### removeLayoutComponent

          public void removeLayoutComponent(java.awt.Component comp)

      Specified by:
        `removeLayoutComponent` in interface `java.awt.LayoutManager`

"

The software JavaView? is copyright protected. All Rights Reserved.
"