public void setDefault ( final UUID _selectCmdUUID ) { final UIMenuItem menuItem = getProvider ( ) . getRoots ( ) . next ( ) ; menuItem . setHeader ( true ) ; boolean hasDefault = false ; for ( final UIMenuItem childItem : menuItem . getChildren ( ) ) { if ( _selectCmdUUID == null && childItem . isDefaultSelected ( ) || _selectCmdUUID != null && _selectCmdUUID . equals ( childItem . getCommandUUID ( ) ) ) { hasDefault = true ; childItem . setSelected ( true ) ; } } if ( ! hasDefault ) { menuItem . setSelected ( true ) ; } expand ( menuItem ) ; expandChildren ( menuItem ) ; }
Set the default selected item .