Mercurial > repos > timpalpant > java_genomics_toolkit
comparison gui/edu/unc/genomics/ToolsTree.java @ 2:e16016635b2a
Uploaded
| author | timpalpant |
|---|---|
| date | Mon, 13 Feb 2012 22:12:06 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:a54db233ee3d | 2:e16016635b2a |
|---|---|
| 1 package edu.unc.genomics; | |
| 2 | |
| 3 import java.awt.Dimension; | |
| 4 | |
| 5 import javax.swing.BorderFactory; | |
| 6 import javax.swing.JTree; | |
| 7 import javax.swing.tree.TreeSelectionModel; | |
| 8 | |
| 9 /** | |
| 10 * Tree view of the available tools | |
| 11 * | |
| 12 * @author timpalpant | |
| 13 * | |
| 14 */ | |
| 15 public class ToolsTree extends JTree { | |
| 16 | |
| 17 private static final long serialVersionUID = -2591915754191263660L; | |
| 18 | |
| 19 public ToolsTree() { | |
| 20 super(); | |
| 21 initialize(); | |
| 22 } | |
| 23 | |
| 24 public ToolsTree(ToolsTreeModel model) { | |
| 25 super(model); | |
| 26 initialize(); | |
| 27 } | |
| 28 | |
| 29 private void initialize() { | |
| 30 getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); | |
| 31 | |
| 32 setBorder(BorderFactory.createEmptyBorder()); | |
| 33 setRootVisible(false); | |
| 34 setShowsRootHandles(true); | |
| 35 setPreferredSize(new Dimension(200, 0)); | |
| 36 } | |
| 37 | |
| 38 } |
