private SessionDataDto defineCurrentSession(CellDoubleClickEvent event) { String sessionId = treeGrid.getColumnModel().getColumn(event.getCellIndex()).getHeader().asString(); String sessionData_id = sessionId.substring(sessionId.indexOf(' ') + 1); SessionDataDto currentSession = null; for (SessionDataDto sessionDataDto : SessionComparisonPanel.this.chosenSessions) { if (sessionDataDto.getSessionId().equals(sessionData_id)) { currentSession = sessionDataDto; break; } } return currentSession; }