view java-genomics-toolkit/gui/edu/unc/genomics/ToolsTree.java @ 0:1daf3026d231

Upload alpha version
author timpalpant
date Mon, 13 Feb 2012 21:55:55 -0500
parents
children
line wrap: on
line source

package edu.unc.genomics;

import java.awt.Dimension;

import javax.swing.BorderFactory;
import javax.swing.JTree;
import javax.swing.tree.TreeSelectionModel;

/**
 * Tree view of the available tools
 * 
 * @author timpalpant
 *
 */
public class ToolsTree extends JTree {

	private static final long serialVersionUID = -2591915754191263660L;

	public ToolsTree() {
		super();
		initialize();
	}
	
	public ToolsTree(ToolsTreeModel model) {
		super(model);
		initialize();
	}
	
	private void initialize() {
		getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
		
		setBorder(BorderFactory.createEmptyBorder());
		setRootVisible(false);
		setShowsRootHandles(true);
		setPreferredSize(new Dimension(200, 0));
	}
	
}