CHARDON, Ohio — A teenager who fatally shot three students in a school cafeteria didn’t have his constitutional rights violated when he was given a prison sentence of life without parole, an appeals court said Monday while providing new details about the shooting.

The court ruled unanimously to uphold the sentence handed down to T.J. Lane following the shooting at Chardon High School, in northeast Ohio, in February 2012, saying it did not constitute cruel and unusual punishment. The court also rejected arguments by defense attorneys that the law allowing the 17-year-old shooter’s case to be transferred to adult court was unconstitutional.

Lane “did not act on impulse, on provocation, or under pressure from peers or adults,” the court said. “To the contrary, he planned this attack weeks in advance before he went to school that day with a loaded gun.”

Messages seeking comment were left with his attorneys Monday.

The court opinion included new details about the case, including descriptions of Lane’s actions the day of the shooting.

“He said he does not have problems with anyone and was not upset with anyone,” according to the court’s ruling. “He said that no one had bullied him. This was just something he chose to do.”

Lane gained new infamy at his sentencing when he wore a T-shirt with “killer” scrawled across it and gestured obscenely toward the victims’ families.

Monday’s ruling said he wore a similar shirt under a dress shirt the day of the shootings.

Lane bought the shirt about a week earlier, the opinion said. He said he wore it “because he was going to be shooting people,” according to the ruling.

In interviews with Geauga County detectives that day, Lane said he knew what he did was wrong, the ruling said. Lane “feels terrible for doing it; and he has regret,” it said.

In February, family members of the slain teenagers said in a lawsuit that the school didn’t have enough security. The school district wouldn’t comment.