com.leafdigital.ircui.api
Interface GeneralChatWindow


public interface GeneralChatWindow

A chat window. Created with IRCUI.createGeneralChatWindow(leafchat.core.api.PluginContext, com.leafdigital.ircui.api.GeneralChatWindow.Handler, String, String, String, int, String, String, boolean).


Nested Class Summary
static interface GeneralChatWindow.Handler
          Callbacks from the window
 
Method Summary
 void addLine(java.lang.String xml)
          Adds a line of arbitrary XML text to the display (not logged).
 void addLine(java.lang.String xml, java.lang.String logType)
          Adds a line of arbitrary XML text to the display and to the system logs.
 MessageDisplay getMessageDisplay()
           
 void setEnabled(boolean enabled)
          Enables or disables the edit box in the window.
 void setTarget(java.lang.String target)
          Sets this window's default target name.
 void setTitle(java.lang.String title)
          Sets the window title.
 void showOwnText(int type, java.lang.String target, java.lang.String text)
          Shows text from our user.
 void showRemoteText(int type, java.lang.String nick, java.lang.String text)
          Shows text from another user in this window.
 

Method Detail

setEnabled

void setEnabled(boolean enabled)
Enables or disables the edit box in the window.

Parameters:
enabled - True to enable, false to disable

addLine

void addLine(java.lang.String xml)
Adds a line of arbitrary XML text to the display (not logged).

Parameters:
xml - XML format data; if intending plain text, remember to escape it

addLine

void addLine(java.lang.String xml,
             java.lang.String logType)
Adds a line of arbitrary XML text to the display and to the system logs.

Parameters:
xml - XML format data; if intending plain text, remember to escape it
logType - Log event type identifier.

showOwnText

void showOwnText(int type,
                 java.lang.String target,
                 java.lang.String text)
Shows text from our user. May be directed at the target in this window or somebody else. Text is automatically logged (if enabled).

Parameters:
type - MessageDisplay.TYPE_xx constant
target - Target name (if this matches the window target name, it'll show appropriately)
text - Text to display

setTarget

void setTarget(java.lang.String target)
Sets this window's default target name.

Parameters:
target - Nickname of target

showRemoteText

void showRemoteText(int type,
                    java.lang.String nick,
                    java.lang.String text)
Shows text from another user in this window. Text is automatically logged (if enabled).

Parameters:
type - MessageDisplay.TYPE_xx constant
nick - Source nickname
text - Text to display

setTitle

void setTitle(java.lang.String title)
Sets the window title.

Parameters:
title - New title

getMessageDisplay

MessageDisplay getMessageDisplay()
Returns:
MessageDisplay object for window


Copyright © 2011 Samuel Marshall. All rights reserved.