/** * Set name of key in menu item */ protected void updateLicenseMenu() { final License key = LicenseFactory.find(); if(key.isReceipt()) { this.applicationMenu.removeItemAtIndex(new NSInteger(5)); this.applicationMenu.removeItemAtIndex(new NSInteger(4)); } else { this.applicationMenu.itemAtIndex(new NSInteger(5)).setAttributedTitle( NSAttributedString.attributedStringWithAttributes(key.toString(), MENU_HELP_FONT_ATTRIBUTES) ); } }