|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.controls.JMenuSorter
This is a utility class for maintaining the contents of a JMenu
in sorted order. The menu is maintained in sorted order even if items
are added or removed from the menu.
When a menu is registered with the JMenuSorter
, the
contents of each
If desired, one or more specific menu groups may be excluded from sorting for any menu that was registered for sorting. A menu group to be excluded from sorting is identified by any component in that menu group.
Method Summary | |
static boolean |
isSorted(javax.swing.JMenu menu)
Returns true if the specified JMenu is registered
to be maintained in sorted order. |
static void |
registerExclusionGroup(javax.swing.JMenu menu,
java.awt.Component component)
Registers a menu group for a JMenu so that the group will be
excluded from sorting. |
static void |
registerJMenu(javax.swing.JMenu menu)
Registers a JMenu so that it will be maintained in sorted
order. |
static void |
unregisterExclusionGroup(javax.swing.JMenu menu,
java.awt.Component component)
Unegisters a menu group for a JMenu so that the group will be
included in sorting. |
static void |
unregisterJMenu(javax.swing.JMenu menu)
Unregisters a JMenu so that it will no longer be maintained in
sorted order. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean isSorted(javax.swing.JMenu menu)
true
if the specified JMenu
is registered
to be maintained in sorted order.
menu
- the menu whose sorting status is to be tested.public static void registerJMenu(javax.swing.JMenu menu)
JMenu
so that it will be maintained in sorted
order.
menu
- the menu that should be maintained in sorted order.public static void unregisterJMenu(javax.swing.JMenu menu)
JMenu
so that it will no longer be maintained in
sorted order. This method should only be called for a menu that has
been registered for sorting with registerJMenu(JMenu)
, but it
is not an error if the menu was not so registered.
menu
- the menu that should no longer be maintained in sorted
order.public static void registerExclusionGroup(javax.swing.JMenu menu, java.awt.Component component)
JMenu
so that the group will be
excluded from sorting. This method should only be called for a menu
that has been registered for sorting with registerJMenu(JMenu)
, but it is not an error if the menu was not so
registered.
menu
- the menu that is being maintained in sorted order.component
- the component indicating the menu group that should
be excluded from sorting.public static void unregisterExclusionGroup(javax.swing.JMenu menu, java.awt.Component component)
JMenu
so that the group will be
included in sorting. This method should only be called for a menu
that has been registered for sorting with registerJMenu(JMenu)
, but it is not an error if the menu is not
registered.
It is an error to call this method if the specified menu and component
were not previously excluded from sorting by calling registerExclusionGroup(JMenu,Component)
.
menu
- the menu that is being maintained in sorted order.component
- the component in the menu group that was previously
excluded from sorting.
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.