/// <summary> /// Responds to list selections. </summary> /// <param name="e"> the ListSelectionEvent that happened. </param> public virtual void valueChanged(ListSelectionEvent e) { int index = __fileJList.getSelectedIndex(); if (index == 0 || index == 1) { __fileJList.removeSelectionInterval(index, index); return; // Don't want the following to somehow get confused... } // If anything is selected in the list, enable the View/Edit button... if ((__fileJList.getSelectedIndices() != null) && (__fileJList.getSelectedIndices().length > 0)) { __viewEditJButton.setEnabled(true); } else { __viewEditJButton.setEnabled(false); } }