Play Dmaj7 one string at a time and you hear D, F#, A and C#. D is the root, F# the major third, A the fifth and C# the major seventh. Said aloud, its notes are D, F sharp, A and C sharp.
From the low string to the high one you hear D, A, C# and F#. The lowest note is D on string 4 and the highest is F# on string 1.
In Dmaj7, string 4 is played open and adds D. Strings 6 and 5 are not played. Every finger presses at fret 2. The second shape on this page starts at fret 5.
D is one change away. String 2 moves from fret 2 to fret 3, bringing in D, the root of D. Dmaj7 holds the whole F#m chord inside it, F#, A and C#. The change that keeps the most fingers still is to A7. One stays in place.
Dmaj7 shows up in four keys. In D major it is the I, in A major the IV and in F# minor the VI. The rest appear in the key list.