Dallas County Chief Executive Judge Clay Jenkins said Johnson had been planning and training, and took advantage of the protest because of the high police presence.
"He knew police would be amassing at that scene and he used it as an opportunity to shoot," Jenkins said.
Johnson had two weapons, both purchased legally -- an SKS rifle and a handgun -- and was prepared with many magazines for the rifle, the judge said.
Law enforcement officials say Johnson, an Army vet, used his military training in carrying out the attack.
Johnson found a spot in a parking garage at about 9 p.m., overlooking an area where police were hemmed in by protesters, and opened fire.
Police were eventually able to trap Johnson on the second floor of the El Centro College building, which Jenkins said had been put on lockdown when the shooting started.
For two hours, police tried to negotiate with Johnson, but Dallas Police Chief David Brown told CNN today that "he basically lied to us, playing games, laughing at us, singing, asking how many did he get and that he wanted to kill some more."
But all that time, Johnson was wounded, and he used his own blood to start to write something on the wall of the room where he was holed up, Jenkins said.
"We believe that he was wounded as he was going up the stairs," said Jenkins. "We believe he wrote in his own blood on the wall."
Brown finally ordered the SWAT team to send in a bomb-carrying robot to kill Johnson, and it was detonated at 1:31 a.m.
Law enforcement experts say it appears to be the first time such a robot was used to kill a suspect, and questions have been raised about the ethics of the move, but Jenkins echoed Brown's defense of the decision.
"I do believe it was warranted because it saved lives," he said.
Because the college was on lockdown, there were other people in the building when the bomb was detonated, but they were all unharmed when they were evacuated later, he said. He said the charge used was small enough that it would not have hurt anyone but the suspect.