⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 treedisplay.java

📁 Libgist is an implementation of the Generalized Search Tree, a template index structure that makes i
💻 JAVA
字号:
// TreeDisplay.java// Copyright (c) 1998, Regents of the University of California// $Id: TreeDisplay.java,v 1.2 1999/06/27 00:17:39 marcel Exp $import javax.swing.*;import javax.swing.plaf.*;import javax.swing.border.*;import java.awt.*;public class TreeDisplay extends JComponent {  public SuperNode root;  public Font font;  public FontMetrics fm;  public boolean shownodes;  public TreeView tv;  public TreeDisplayUI ui;  public TreeDisplay(TreeView tv) {      //    this.root = root;    fm = null;    root = null;    shownodes = false;        this.tv = tv;    setLayout(null);    // add(root);    ui = new TreeDisplayUI();    setUI(ui);    font = new Font("Dialog", Font.PLAIN, 10);  }  public void setRoot(SuperNode root) {            this.root = root;      add(root);  }}    //    addSuperNodes(root);    // setDebugGraphicsOptions(DebugGraphics.LOG_OPTION);// public Dimension getMinimumSize() {// return getPreferredSize();// }//   private void addSuperNodes(SuperNode root) {//     add(root);//   }//  public EtchedBorder eborder;    //    eborder = new EtchedBorder(EtchedBorder.RAISED);    // setDebugGraphicsOptions(DebugGraphics.LOG_OPTION);	//g.setClip((width - cwidth)/2, (height - cheight) /2 , 	//	  cwidth, cheight);	//g.translate((width - cwidth)/2, (height - cheight) /2);	//UIManager.getUI(td.root).update(g,td.root);	//td.root.paint(g);	//SwingUtilities.paintComponent(g,td.root,td,	//(width - cwidth)/2, 	//			      (height - cheight)/2, 	//			      cwidth, cheight);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -