Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreeSelectionModel;
import java.util.ListIterator;
public class RegionView extends JPanel {
}
sortTree(top);
tree = new JTree(top);
+ tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
add(new JScrollPane(tree));
}
public void setRegionObj(Region regionObj) {
this.regionObj = regionObj;
}
+
+ public Region getRegionObj() {
+ return regionObj;
+ }
}