Mountain Lion with Java 7 only
JDK 7 will be installed under /Library/Java/JavaVirtualMachines/1.7.0.jdk, JDK 6 under /System/Library/Java/JavaVirtualMachines.

To trick OS X to accept Java 7 instead of proposing to install Java 6 a simple symlink is enough:

sudo mkdir /System/Library/Java/JavaVirtualMachines
sudo ln -s /Library/Java/JavaVirtualMachines/1.7.0.jdk /System/Library/Java/JavaVirtualMachines/1.6.0.jdk


Most Java Programms will run with this little hack without the need to install Java 6. 
OS X's Java Preferences (and maybe some others) will not as it seems to explicitly check the version of the JVM when it is started.