private T addMessageLocationImpl(boolean buttonAddedLocation, MessageLocation messageLocation) { for (T locationUI : getModel().getElements()) { if (locationUI.getLocation().overlaps(messageLocation)) { View.getSingleton() .showWarningDialog( Constant.messages.getString( "messagelocationspanel.add.location.warning.locations.overlap")); return null; } } MessageLocationHighlight highlight = null; MessageLocationHighlight highlightReference = null; MessageLocationHighlightsManager highlightsManager = selectMessageLocationsPanel.create(); if (highlightsManager != null) { highlight = highlightsManager.getHighlight(messageLocation); highlightReference = selectMessageLocationsPanel.highlight(messageLocation, highlight); } T entry = createMessageLocationTableEntry( buttonAddedLocation, messageLocation, highlight, highlightReference); if (entry == null) { if (highlightsManager != null) { selectMessageLocationsPanel.removeHighlight(messageLocation, highlightReference); } return null; } getModel().addElement(entry); int row = getTable().convertRowIndexToView(getModel().getRow(entry)); getTable().setRowSelectionInterval(row, row); return null; }