public void searchResults (final SearchMode mode, final EdictDictionary dictionary, final List<Integer> resultIndices) {

		final Color backgroundColour = this.resultBackgroundColours.get (dictionary.getFilename());

		if (mode != this.lastSearchMode) {
			if (this.lastSearchMode != null) {
				this.edictDocument.addBlankLines (2);
				this.resultParagraphCount += 2;
			}
			this.lastSearchMode = mode;
			this.resultPositions.put (mode, this.resultParagraphCount);

			notifyListenersSectionCreated (mode, this.resultParagraphCount);

			String headerString = "";
			switch (mode) {
				case EXACT:
					headerString = "Exact matches";
					break;
				case START:
					headerString = "Start matches";
					break;
				case END:
					headerString = "End matches";
					break;
				case MIDDLE:
					headerString = "Other matches";
					break;
			}

			this.edictDocument.addHeader (headerString);
			this.edictDocument.addBlankLines (1);
			this.resultParagraphCount += 2;

		}

		this.edictDocument.addResults (dictionary, backgroundColour, resultIndices);
		this.resultCount += resultIndices.size();
		this.resultParagraphCount += resultIndices.size();

		if (this.resultParagraphCount > 250) {

			// Size change is signalled first to avoid laying out extra times if the Document is set here
			this.edictDocument.signalSizeChange();

			if (!this.resultsAreSet) {
				if (! (this.fastTextView.getDocument() instanceof InformationalDocument)) {
					this.fastTextView.setDocument (this.edictDocument);
					this.resultsAreSet = true;
				}
			}

		}

		notifyListenersCountUpdated (this.resultCount);

	}