org.springframework.richclient.util
Class SeparatorUtils

java.lang.Object
  extended by org.springframework.richclient.util.SeparatorUtils

public class SeparatorUtils
extends Object

Utils class for consolidating separators on toolbars, popupmenus and menus.

Author:
Benoit Xhenseval, Peter De Bruycker

Method Summary
static void consolidateSeparators(JMenu menu)
          Consolidates separators in a menu: subsequent separators will be collapsed to one separator if the first visible item of a menu is a separator, it will be made invisible if the last visible item of a menu is a separator, it will be made invisible
static void consolidateSeparators(JMenuBar menuBar)
          Consolidates separators in a menubar.
static void consolidateSeparators(JPopupMenu popupMenu)
          Consolidates separators in a popupmenu: subsequent separators will be collapsed to one separator if the first visible item of a menu is a separator, it will be made invisible if the last visible item of a menu is a separator, it will be made invisible
static void consolidateSeparators(JToolBar toolBar)
          Consolidates separators in a toolbar: subsequent separators will be collapsed to one separator if the first visible item of a menu is a separator, it will be made invisible if the last visible item of a menu is a separator, it will be made invisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

consolidateSeparators

public static void consolidateSeparators(JToolBar toolBar)
Consolidates separators in a toolbar:

Parameters:
menu - the menu (cannot be null)

consolidateSeparators

public static void consolidateSeparators(JPopupMenu popupMenu)
Consolidates separators in a popupmenu:

Parameters:
menu - the menu (cannot be null)

consolidateSeparators

public static void consolidateSeparators(JMenu menu)
Consolidates separators in a menu:

Parameters:
menu - the menu (cannot be null)

consolidateSeparators

public static void consolidateSeparators(JMenuBar menuBar)
Consolidates separators in a menubar. This essentialy calls consolidateSeparators(JMenu) for each menu in the menubar.

Parameters:
menuBar - the menu bar (cannot be null)
See Also:
consolidateSeparators(JMenu)


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.