public void addNewTab(final PropertyChangeListener propertyChangeListener) {
		// If we create new tab first time, we have to copy text from the textArea
		// of the TextEditorPane first, create a new tab for this text and only
		// afterwards create a new tab
		if (CurrentlyOpenTextFile.getInstance().getNumberOfAvailableFiles() == 2) {
			// we have to figure out which file is opened too, because
			// CurrentlyOpenFile singleton contains another, immediately opened file
			for (final TextFile currentyOpenTextFile : AvailableTextFiles.getInstance().getAvailableTextFiles()) {
				// We found opened file
				if (currentyOpenTextFile.isOpened()) {
					final JScrollPane preparedScrollPane = this.prepareNewTab(currentyOpenTextFile);
					this.addTab(currentyOpenTextFile.getSimpeTitle(), preparedScrollPane);
					this.tabFileMap.put(Integer.valueOf(this.getTabCount() - 1), currentyOpenTextFile);
				}
			}
		}
		
		// Creating a new tab
		// Set all necessary properties of CurrentlyOpenTextFile
		CurrentlyOpenTextFile.getInstance().getCurrentlyOpenTextFile().setOpened(true);
		CurrentlyOpenTextFile.getInstance().incrementNumberOfOpenFiles();
		CurrentlyOpenTextFile.getInstance().getCurrentlyOpenTextFile().addPropertyChangeListener(propertyChangeListener);
		
		// Prepare new tab for the opened file
		final JScrollPane preparedScrollPane =
			this.prepareNewTab(CurrentlyOpenTextFile.getInstance().getCurrentlyOpenTextFile());
		// Add newly created tab
		this.addTab(CurrentlyOpenTextFile.getInstance().getCurrentlyOpenTextFile().getName(), preparedScrollPane);
		// Put Tab->TextFile pair to the tabFile map
		this.tabFileMap.put(Integer.valueOf(this.getTabCount() - 1), CurrentlyOpenTextFile.getInstance()
			.getCurrentlyOpenTextFile());
		// Go to the newly created tab
		this.setSelectedIndex(this.getTabCount() - 1);
		
		// This listener performed when we switch to another tab
		this.addChangeListener(new ChangeListener() {
			
			@Override
			public void stateChanged(final ChangeEvent e) {
				// We might ignore tab changing, in case we revert content of the text
				// text file and to update its content, we delete tab which contains its
				// content and re-added it with new content
				if (!TabbedPane.this.ignoreTabSelection) {
					// Here we change our CurrentlyOpenTextFile, because we switched to
					// another tab
					final int currentComponentIndex = TabbedPane.this.getSelectedIndex();
					CurrentlyOpenTextFile.getInstance().setCurrentlyOpenTextFile(
						TabbedPane.this.tabFileMap.get(Integer.valueOf(currentComponentIndex)));
					// The title of BorderFrame must be updated as well, so we call
					// touch() method of the currently open TextFile, BorderFrame listens
					// this kind of changes and will update its title (it will add the
					// name of currently open file to the title)
					CurrentlyOpenTextFile.getInstance().getCurrentlyOpenTextFile().touch();
				}
			}
		});
	}