Package org.jfree.ui

Class OverlayLayout

java.lang.Object
org.jfree.ui.OverlayLayout
All Implemented Interfaces:
LayoutManager

public final class OverlayLayout extends Object implements LayoutManager
A simple layoutmanager to overlay all components of a parent.

This layout manager acts similar to the card layout, but all children of the parent band have the same size and all children can be visible at the same time.

  • Field Details

    • ignoreInvisible

      private boolean ignoreInvisible
      A flag that defines, whether invisible components should be ignored when computing the layout.
  • Constructor Details

    • OverlayLayout

      public OverlayLayout(boolean ignoreInvisible)
      Creates a new instance.
      Parameters:
      ignoreInvisible - whether to ignore invisible components when computing the layout.
    • OverlayLayout

      public OverlayLayout()
      DefaultConstructor.
  • Method Details

    • addLayoutComponent

      public void addLayoutComponent(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.
      Specified by:
      addLayoutComponent in interface LayoutManager
      Parameters:
      name - the string to be associated with the component
      comp - the component to be added
    • removeLayoutComponent

      public void removeLayoutComponent(Component comp)
      Removes the specified component from the layout.
      Specified by:
      removeLayoutComponent in interface LayoutManager
      Parameters:
      comp - the component to be removed
    • layoutContainer

      public void layoutContainer(Container parent)
      Lays out the specified container.
      Specified by:
      layoutContainer in interface LayoutManager
      Parameters:
      parent - the container to be laid out
    • minimumLayoutSize

      public Dimension minimumLayoutSize(Container parent)
      Calculates the minimum size dimensions for the specified container, given the components it contains.
      Specified by:
      minimumLayoutSize in interface LayoutManager
      Parameters:
      parent - the component to be laid out
      Returns:
      the minimum size computed for the parent.
      See Also:
    • preferredLayoutSize

      public Dimension preferredLayoutSize(Container parent)
      Calculates the preferred size dimensions for the specified container, given the components it contains.
      Specified by:
      preferredLayoutSize in interface LayoutManager
      Parameters:
      parent - the container to be laid out
      Returns:
      the preferred size computed for the parent.
      See Also: