Package com.jgoodies.looks.common
Class PopupMenuLayout
java.lang.Object
javax.swing.BoxLayout
com.jgoodies.looks.common.PopupMenuLayout
- All Implemented Interfaces:
LayoutManager
,LayoutManager2
,Serializable
,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:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionPopupMenuLayout
(Container target, int axis) Creates a layout manager that will lay out components along the given axis. -
Method Summary
Modifier and TypeMethodDescriptionvoid
invalidateLayout
(Container target) Indicates that a child has changed its layout related information, and thus any cached calculations should be flushed.Methods inherited from class javax.swing.BoxLayout
addLayoutComponent, addLayoutComponent, getAxis, getLayoutAlignmentX, getLayoutAlignmentY, getTarget, layoutContainer, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent
-
Constructor Details
-
PopupMenuLayout
Creates a layout manager that will lay out components along the given axis.- Parameters:
target
- the container that needs to be laid outaxis
- the axis to lay out components along
-
-
Method Details
-
invalidateLayout
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
andmaxAccWidth
.- Specified by:
invalidateLayout
in interfaceLayoutManager2
- Overrides:
invalidateLayout
in classBoxLayout
- Parameters:
target
- the affected container
-