private String getMenuType ( final WSubMenu submenu ) { WMenu menu = WebUtilities . getAncestorOfClass ( WMenu . class , submenu ) ; switch ( menu . getType ( ) ) { case BAR : return "bar" ; case FLYOUT : return "flyout" ; case TREE : return "tree" ; case COLUMN : return "column" ; default : throw new IllegalStateException ( "Invalid menu type: " + menu . getType ( ) ) ; } }
Get the string value of a WMenu . MenuType .