com.dlsc.flexgantt.swing.util

## Class MenuCleaner

- java.lang.Object
- - com.dlsc.flexgantt.swing.util.MenuCleaner

-     public class MenuCleaner
      extends Object

  A utility class that is used to clean up (popup) menus in such a way that the text of the menu items lines up nicely. Swing messes up menus when some of the items display icons and some do not. This utility class will add blank icons that are based on the found icons to those menu items that do not have an icon otherwise.
  Since:
    1.0
  Version:
    $Revision: 1.4 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MenuCleaner()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `clean(JMenu menu)` Cleans up the given menu by recursively traversing the menu hierarchy.
    `static void` | `clean(JPopupMenu popup)` Cleans up the given popup menu by recursively traversing the menu hierarchy.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MenuCleaner

          public MenuCleaner()

  - ### Method Detail

    - #### clean

          public static void clean(JPopupMenu popup)

      Cleans up the given popup menu by recursively traversing the menu hierarchy.
      Parameters:
        `popup` - the target menu to clean up
      Since:
        1.0

    - #### clean

          public static void clean(JMenu menu)

      Cleans up the given menu by recursively traversing the menu hierarchy.
      Parameters:
        `menu` - the target menu to clean up
      Since:
        1.0

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.