Overview
Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
Sample
Document
Interface java.awt.LayoutManager2
Inherited members: ShowHide
Deprecated: ShowHide
View: ClientSubclassPackageImplementation
java.awt

Interface LayoutManager2

  • All Superinterfaces:
    LayoutManager
    All Known Implementing Classes:
    BorderLayout, CardLayout, GridBagLayout
    public interface LayoutManager2 extends LayoutManager
    Defines an interface for classes that know how to layout Containers based on a layout constraints object. This interface extends the LayoutManager interface to deal with layouts explicitly in terms of constraint objects that specify how and where components should be added to the layout.

    This minimal extension to LayoutManager is intended for tool providers who wish to the creation of constraint-based layouts. It does not yet provide full, general support for custom constraint-based layout managers.

    See Also:
    LayoutManager, Container
    • Methods 
      Modifier and Type Method and Description
      Ordinary member indicator addLayoutComponent Reveal DetailHide Detail
      void addLayoutComponent(Component comp, java.lang.Object constraints)
      Adds the specified component to the layout, using the specified constraint object.
      void addLayoutComponent(Component comp, java.lang.Object constraints)
      Adds the specified component to the layout, using the specified constraint object.
      Parameters:
      comp - the component to be added
      constraints - where/how the component is added to the layout.
      Inherited member indicator addLayoutComponent Reveal DetailHide Detail
      void addLayoutComponent(java.lang.String name, Component comp)
      If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.
      void addLayoutComponent(java.lang.String name, Component comp)
      Description copied from interface: LayoutManager
      If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.
      Parameters:
      name - the string to be associated with the component
      comp - the component to be added
      Ordinary member indicator getLayoutAlignmentX Reveal DetailHide Detail
      float getLayoutAlignmentX(Container target)
      Returns the alignment along the x axis.
      float getLayoutAlignmentX(Container target)
      Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
      Ordinary member indicator getLayoutAlignmentY Reveal DetailHide Detail
      float getLayoutAlignmentY(Container target)
      Returns the alignment along the y axis.
      float getLayoutAlignmentY(Container target)
      Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
      Ordinary member indicator invalidateLayout Reveal DetailHide Detail
      void invalidateLayout(Container target)
      Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
      void invalidateLayout(Container target)
      Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
      Inherited member indicator layoutContainer Reveal DetailHide Detail
      void layoutContainer(Container parent)
      Lays out the specified container.
      void layoutContainer(Container parent)
      Description copied from interface: LayoutManager
      Lays out the specified container.
      Parameters:
      parent - the container to be laid out
      Ordinary member indicator maximumLayoutSize Reveal DetailHide Detail
      Dimension maximumLayoutSize(Container target)
      Calculates the maximum size dimensions for the specified container, given the components it contains.
      Dimension maximumLayoutSize(Container target)
      Calculates the maximum size dimensions for the specified container, given the components it contains.
      See Also:
      Component.getMaximumSize(), LayoutManager
      Inherited member indicator minimumLayoutSize Reveal DetailHide Detail
      Dimension minimumLayoutSize(Container parent)
      Calculates the minimum size dimensions for the specified container, given the components it contains.
      Dimension minimumLayoutSize(Container parent)
      Description copied from interface: LayoutManager
      Calculates the minimum size dimensions for the specified container, given the components it contains.
      Parameters:
      parent - the component to be laid out
      See Also:
      LayoutManager.preferredLayoutSize(java.awt.Container)
      Inherited member indicator preferredLayoutSize Reveal DetailHide Detail
      Dimension preferredLayoutSize(Container parent)
      Calculates the preferred size dimensions for the specified container, given the components it contains.
      Dimension preferredLayoutSize(Container parent)
      Description copied from interface: LayoutManager
      Calculates the preferred size dimensions for the specified container, given the components it contains.
      Parameters:
      parent - the container to be laid out
      See Also:
      LayoutManager.minimumLayoutSize(java.awt.Container)
      Inherited member indicator removeLayoutComponent Reveal DetailHide Detail
      void removeLayoutComponent(Component comp)
      Removes the specified component from the layout.
      void removeLayoutComponent(Component comp)
      Description copied from interface: LayoutManager
      Removes the specified component from the layout.
      Parameters:
      comp - the component to be removed
This document was created by Dulcet from the OpenJDK sources. Copyright © 1993, 2012 Oracle and/or its affiliates. All rights reserved.

SourceForge