Documentation of 'jv.objectGui.PsSlotLayout' Java class
PsSlotLayout ("JavaView Reference Manual")
"JavaView? v5.03.003"
jv.objectGui

Class 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.
    • 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
"JavaView? v5.03.003"

"

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

Ads help maintain this website.