public final ExampleData getSelectedExampleData ( ) { Set < String > allSelectedItems = getSelectedRows ( ) ; if ( allSelectedItems == null || allSelectedItems . isEmpty ( ) ) { return null ; } for ( String selectedItem : allSelectedItems ) { // Only interested in the first selected item as it is a single select list. List < Integer > rowIndex = TreeItemUtil . rowIndexStringToList ( selectedItem ) ; return getTreeModel ( ) . getExampleData ( rowIndex ) ; } return null ; }
Get the example which is selected in the tree .