List of usage examples for javax.swing.event TreeSelectionEvent isAddedPath
public boolean isAddedPath()
From source file:com.enderville.enderinstaller.ui.Installer.java
@Override public void valueChanged(TreeSelectionEvent e) { if (!e.isAddedPath()) { return;// ww w. ja v a 2s .c o m } TreePath path = e.getPath(); CheckBoxTree tree = getModTree(); if (e.getSource() == tree.getSelectionModel()) { DefaultMutableTreeNode last = (DefaultMutableTreeNode) path.getLastPathComponent(); loadModDescription(last.getUserObject().toString()); } else if (e.getSource() == tree.getCheckBoxTreeSelectionModel()) { getPresetDropdown().setSelectedItem(PRESET_CUSTOM); } }