javax.swing.plaf.synth
class: DefaultMenuLayout [javadoc |
source]
java.lang.Object
javax.swing.BoxLayout
javax.swing.plaf.synth.DefaultMenuLayout
All Implemented Interfaces:
UIResource, LayoutManager2, Serializable
The default layout manager for Popup menus and menubars. This
class is an extension of BoxLayout which adds the UIResource tag
so that plauggable L&Fs can distinguish it from user-installed
layout managers on menus.
Derived from javax.swing.plaf.basic.DefaultMenuLayout
| Methods from javax.swing.BoxLayout: |
|---|
|
addLayoutComponent, addLayoutComponent, checkContainer, checkRequests, getAxis, getLayoutAlignmentX, getLayoutAlignmentY, getTarget, invalidateLayout, layoutContainer, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, removeLayoutComponent |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from javax.swing.plaf.synth.DefaultMenuLayout Detail: |
public void invalidateLayout(Container target) {
if (target instanceof JPopupMenu) {
SynthPopupMenuUI popupUI = (SynthPopupMenuUI)((JPopupMenu)target).
getUI();
popupUI.resetAlignmentHints();
}
super.invalidateLayout(target);
}
|
public Dimension preferredLayoutSize(Container target) {
if (target instanceof JPopupMenu && target.getComponentCount() == 0) {
return new Dimension(0, 0);
}
return super.preferredLayoutSize(target);
}
|