package com.mniip.bananapeel;

import java.util.ArrayList;

public class Tab
{
	private IRCService service;
	private int id;
	private String title = "";
	private ArrayList<String> textLines = new ArrayList<>();

	public Tab(IRCService s, int tabId)
	{
		service = s;
		id = tabId;
	}

	public int getId()
	{
		return id;
	}

	public String getTitle()
	{
		return title;
	}

	public void setTitle(String t)
	{
		title = t;
	}

	public ArrayList<String> getTextLines()
	{
		return textLines;
	}

	public void putLine(String line)
	{
		textLines.add(line);
		IRCInterfaceListener listener = service.getListener();
		if(listener != null)
			listener.onTabLinesAdded(id);
	}
}

@@ -415,16 +415,131 @@
 le = t;%0A
+%09%09IRCInterfaceListener listener = service.getListener();%0A%09%09if(listener != null)%0A%09%09%09listener.onTabTitleChanged(id);%0A
 %09%7D%0A%0A%09pub

call onTabTitleChanged in setTitle