forked from jasder/antlr
antialias lines
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9181]
This commit is contained in:
parent
08bba26940
commit
490cec9af6
|
@ -29,10 +29,13 @@
|
|||
|
||||
package org.antlr.v4.runtime.tree.gui;
|
||||
|
||||
import org.abego.treelayout.*;
|
||||
import org.abego.treelayout.NodeExtentProvider;
|
||||
import org.abego.treelayout.TreeForTreeLayout;
|
||||
import org.abego.treelayout.TreeLayout;
|
||||
import org.abego.treelayout.util.DefaultConfiguration;
|
||||
import org.antlr.v4.runtime.BaseRecognizer;
|
||||
import org.antlr.v4.runtime.tree.*;
|
||||
import org.antlr.v4.runtime.tree.Tree;
|
||||
import org.antlr.v4.runtime.tree.Trees;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
@ -151,6 +154,10 @@ public class TreeViewer extends JComponent {
|
|||
public void paint(Graphics g) {
|
||||
super.paint(g);
|
||||
|
||||
Graphics2D g2 = (Graphics2D)g;
|
||||
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
|
||||
RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
|
||||
paintEdges(g, getTree().getRoot());
|
||||
|
||||
// paint the boxes
|
||||
|
|
Loading…
Reference in New Issue