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

📄 debugframe.java

📁 生物物种进化历程的演示
💻 JAVA
字号:
/* * Created on 12-Jun-2003 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */package TreeJuxtaposer;import java.awt.GraphicsConfiguration;import java.awt.GridBagLayout;import java.awt.GridBagConstraints;import javax.swing.JFrame;import javax.swing.JSlider;import javax.swing.JTextField;import javax.swing.JLabel;import javax.swing.event.ChangeEvent;import javax.swing.event.ChangeListener;// searchResults = new JList();// resultsPane = new JScrollPane(searchResults);/** * @author jslack * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */public class DebugFrame extends JFrame implements ChangeListener {	private TreeJuxtaposer tj;	static final private String resultType[] = {"Active Group",		"Action Mode",		"Selection Resolution",		"Grow Direction",		"Current Mark",		"Navigation",		"BCN Score",		"Depth Test"		};	static final public int ACT_TYPE = 0;	static final public int ACT_MODE = 1;	static final public int ACT_SELECTION = 2;	static final public int ACT_GROWDIR = 3;	static final public int M_GROUP = 4;	static final public int NAV_TYPE = 5;	static final public int BCN_SCORE = 6;	static final public int DEPTH_TEST = 7;	public JTextField result[];	private JLabel resultLabel[];		static private JSlider chunkSizeForDrawing;	static private String chunkSizeString = "chunks: ";	static private JLabel chunkSizeLabel;		/* assume action types (strings and integer indices) provided in StateFrame */		/* action mode section */	static final public String actionModeLabel[] = {"MOUSEOVER",		"ST_FREEMOVE",		"ST_FREEMOVEAGAIN",		"ST_RESHAPE",		"RECT_CREATE",		"RECT_FREEMOVE",		"RECT_FREEMOVEAGAIN",		"RECT_RESHAPE",		null,		null,		null,		"MOVE_STUCKPOS"	};	/* integer indices for action mode strings provided in AccordionTreeDrawerFinal */		/* action target section	 * this is split into grow direction (the first 3 items)	 * and selection resolution (the last 2 items)	 */	static final public String actionTargetLabel[] = {"Horizontal",		"Vertical",		"Horizontal and Vertical",		"Node",		"Subtree"	};	static final int H_TARGET = 0;	static final int V_TARGET = 1;	static final int B_TARGET = 2;	static final int NODE_TARGET = 3;	static final int SUBTREE_TARGET = 4;		/* assume mark group (strings and integer indices) provided in StateFrame */	/**	 * @throws java.awt.HeadlessException	 */	public DebugFrame(TreeJuxtaposer tj)  {		super();		this.tj = tj;		this.setResizable(false);		initComponents();	}	/**	 * @param gc	 */	public DebugFrame(TreeJuxtaposer tj, GraphicsConfiguration gc) {		super(gc);		this.tj = tj;		this.setResizable(false);		initComponents();	}	/**	 * @param title	 * @throws java.awt.HeadlessException	 */	public DebugFrame(TreeJuxtaposer tj, String title)  {		super(title);		this.tj = tj;		this.setResizable(false);		initComponents();	}	/**	 * @param title	 * @param gc	 */	public DebugFrame(TreeJuxtaposer tj, String title, GraphicsConfiguration gc) {		super(title, gc);		this.tj = tj;		this.setResizable(false);		initComponents();	}	private void initComponents()	{		getContentPane().setLayout(new GridBagLayout());		GridBagConstraints gbc = new GridBagConstraints();		gbc.gridx = 0;		gbc.gridy = 0;		gbc.gridwidth = 1;		gbc.gridheight = 1;		result = new JTextField[resultType.length];		resultLabel = new JLabel[resultType.length];		for (int i = 0; i < resultType.length; i++)		{			gbc.gridx = 0;			gbc.gridy = i;			resultLabel[i] = new JLabel(resultType[i]);			getContentPane().add(resultLabel[i], gbc);						gbc.gridx = 1;			result[i] = new JTextField(25);			result[i].setEditable(false);			getContentPane().add(result[i], gbc);		}		gbc.gridx = 1;		gbc.gridy++;		chunkSizeForDrawing = new JSlider(1, 100, 1);//		chunkSizeForDrawing.setName(chunkSizeString+chunkSizeForDrawing.getValue());		chunkSizeForDrawing.addChangeListener(this);		getContentPane().add(chunkSizeForDrawing, gbc);		gbc.gridx = 0;		chunkSizeLabel = new JLabel(chunkSizeString + chunkSizeForDrawing.getValue());		getContentPane().add(chunkSizeLabel, gbc);		// no drawers yet, can't call this here		//	tj.observe();				pack();	}	/* (non-Javadoc)	 * @see javax.swing.event.ChangeListener#stateChanged(javax.swing.event.ChangeEvent)	 */	public void stateChanged(ChangeEvent e) {		Object obj = e.getSource();		if (obj == chunkSizeForDrawing)		{			int value = chunkSizeForDrawing.getValue();			AccordionTreeDrawer.AccordionTreeDrawer.dequeueChunkPerTimeCheck = value;			chunkSizeLabel.setText(chunkSizeString + value);		}			}}

⌨️ 快捷键说明

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