Added Number.toHex() method and used it in PatternEditor and SampleList for correct formatting of Hex values.