I don't think there's a great deal to it, just that both sounds are made in a similar way, or from the same source, so that they have a matching tonal quality. This makes it sound natural (as does the swing kick being quieter than the main kick) as it would if you were playing a real kit.
The reason this is difficult if you're working with samples is that hitting a drum harder doesn't just result in a louder sound but one with a sharper transient and a greater range of frequencies, among other things. So any drums you're working with to make a swing pattern, you'd want samples of soft and hard hits to make it sound convincing.