Five years before Donald Trump accused a federal judge of bias against him in a Trump University lawsuit, the New York billionaire tried to get another judge pulled from a case, court records show.

The attempt to remove the judge in a 2011 lawsuit over a leaky roof at Trump's Wall Street skyscraper is another example of aggressive legal tactics attorneys representing Trump's various business interests have employed over the years in courtrooms, according to a review of hundreds of lawsuits in state and federal courts across the country.

Besides fighting to have judges removed when they rule against him, Trump has also used his public stature to attack his legal opponents through the media, and in at least one case, his businesses were accused of allowing documents to be destroyed during an ongoing civil case, the records show.

Trump's legal tactics and history of finger-pointing at judges when he doesn't get his way offer a preview of how he could react in the White House when challenged by the judiciary— a government branch with a constitutional check on the presidency. The courts have historically set limits on the president's power and expected the executive branch to abide by their legal interpretations.

Trump has been widely criticized in recent weeks, even from members of his own party, since claiming that U.S. District Judge Gonzalo Curiel cannot preside fairly over the civil fraud case against the now-defunct Trump University in California. Trump justified his comments by citing his pledge to build a wall along the Mexican border and noting Curiel's Mexican heritage. Curiel was born in Indiana.

The presumptive Republican nominee has also raised the prospect that a Muslim judge may treat him unfairly in court because he has proposed a temporary ban on allowing foreign Muslims into the country.

In the 2011 case, a lawyer for Trump argued that a handful of rulings against him by New York state Supreme Court Judge Milton Tingling showed that Tingling was "clearly biased or prejudiced against" them and "cannot be expected to preside over the upcoming trial in an impartial manner," according to a court filing.

Trump's lawyer also seized on a series of procedural rulings against Trump and a comment Tingling made about a voluminous Trump filing being purely for "billing."

That argument echoes one Trump lawyers made in 2009, when they called another state Supreme Court judge biased because of rulings that didn't go their way during a lawsuit between Trump and Chinese businessmen over a Manhattan real estate development. The New York Times first reported that recusal effort earlier this month.

In the Tingling case, the judge refused to step down, telling Trump's lawyers the judiciary couldn't function if judges were to cave every time one side or the other feels aggrieved, according to a transcript.

"I cannot, and I will not, allow the appearance of judge shopping," Tingling said at the time.

Tingling did not respond to a phone message left with his clerk for comment. He ordered tenant John Bostany to pay back-rent and attorney fees to Trump, a decision that was reversed on appeal.

Trump's campaign spokeswoman, Hope Hicks, declined to answer specific questions about Trump's legal tactics including the Tingling case. She responded to a detailed email only by saying: "Trump is brilliant."

Judges aren't the only targets of Trump's courtroom tactics.

He has used the press to publicly criticize his legal opponents. One recent example came in the Trump University case in which Curiel presides. The main defendant in the case, Tarla Makaeff, dropped out of the litigation earlier this year, citing in part "tremendous stress and anxiety" suffered because of Trump's verbal attacks on her from his "bully pulpit."

In other cases, Trump's companies have defied judges' orders.

In a long-running dispute in Florida over a casino venture, one of Trump's companies repeatedly refused to turn over documents and emails to the opposing side. The case was first reported by USA Today.

Documents and court transcripts obtained by the AP show the judge ultimately ordered both the Trump Organization and an affiliate company to allow their computers to be examined by an outside forensic firm.

"I'm not satisfied that there was due diligence in this case at all," then-Broward County Circuit Judge Jeffrey Streitfeld said during a 2007 hearing, adding that the company "had not done anything in-house to stop" the deletion of emails and other records.

"How could there not be a hold place? 'Be careful, we've just filed a major lawsuit in which we're seeking billions of dollars, but routinely continue to wipe out computers,'" Streitfield told Trump's attorneys. "That doesn't work."

Streitfield told the AP last week that Trump's attorneys' actions weren't uncommon in high-stakes litigation like the casino case, which settled for an undisclosed amount in 2010. But he said he didn't accept that the company wasn't able to archive electronic documents.