Class MenuItemTextComparator

  • All Implemented Interfaces:
    java.util.Comparator<javax.swing.JMenuItem>

    public class MenuItemTextComparator
    extends java.lang.Object
    implements java.util.Comparator<javax.swing.JMenuItem>
    MenuItemTextComparator implements java.util.Comparator, and compares the text value of JMenuItems using the case-insensitive smart comparison of StandardUtilities.compareStrings. If one of the JMenuItems is an EnhancedMenuItem it is given a higher comparison value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(javax.swing.JMenuItem obj1, javax.swing.JMenuItem obj2)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • MenuItemTextComparator

        public MenuItemTextComparator()
    • Method Detail

      • compare

        public int compare​(javax.swing.JMenuItem obj1,
                           javax.swing.JMenuItem obj2)
        Specified by:
        compare in interface java.util.Comparator<javax.swing.JMenuItem>