Class PopupMenuLayout

java.lang.Object
javax.swing.BoxLayout
com.jgoodies.looks.common.PopupMenuLayout
All Implemented Interfaces:
LayoutManager, LayoutManager2, Serializable, UIResource

public final class PopupMenuLayout extends BoxLayout implements UIResource
The JGoodies implementation of a layout manager for Popup menus. In comparison to the JDK's implementation it flushes the values of the client properties maxTextWidth and maxAccWidth in the method invalidateLayout(Container) and not in the method BoxLayout.preferredLayoutSize(Container).
Version:
$Revision: 1.8 $
See Also:
  • Constructor Details

    • PopupMenuLayout

      public PopupMenuLayout(Container target, int axis)
      Creates a layout manager that will lay out components along the given axis.
      Parameters:
      target - the container that needs to be laid out
      axis - the axis to lay out components along
  • Method Details

    • invalidateLayout

      public void invalidateLayout(Container target)
      Indicates that a child has changed its layout related information, and thus any cached calculations should be flushed.

      In case the target is an instance of JPopupMenu it flushes the values of the client properties maxTextWidth and maxAccWidth.

      Specified by:
      invalidateLayout in interface LayoutManager2
      Overrides:
      invalidateLayout in class BoxLayout
      Parameters:
      target - the affected container