public void closeAllTabs() {
        while (privateChatTabs.size() > 0)
            removePrivateChatTab( privateChatTabs.get(0) );

        while (channelTabs.size() > 0)
            removeChannelTab( channelTabs.get(0) );

        connection.disconnect();
        connection.removeServerEventsListener();
        Settings.getInstance().removeChangesListener(this);
        MainWindow.getInstance().removeTab(this);
    }