rero.client.output

Class ChatCapabilities

public class ChatCapabilities extends Feature

Field Summary
protected DataDCCdccData
protected OutputCapabilitiesoutput
protected SocketConnectionsock
Method Summary
voidinit()
voidsendAction(String target, String message)
voidsendMessage(String nickname, String message)
voidsendNotice(String target, String message)
voidsendReply(String target, String type, String parms)
voidsendRequest(String target, String type, String parms)
protected static StringwrapLine(String line, String newline, int wrapColumn)
Wraps a single line of text.
static String[]wrapMessageToStringsArray(String message, int length)
static StringwrapText(String inString, String newline, int wrapColumn)
Takes a block of text which might have long lines in it and wraps the long lines based on the supplied wrapColumn parameter.

Field Detail

dccData

protected DataDCC dccData

output

protected OutputCapabilities output

sock

protected SocketConnection sock

Method Detail

init

public void init()

sendAction

public void sendAction(String target, String message)

sendMessage

public void sendMessage(String nickname, String message)

sendNotice

public void sendNotice(String target, String message)

sendReply

public void sendReply(String target, String type, String parms)

sendRequest

public void sendRequest(String target, String type, String parms)

wrapLine

protected static String wrapLine(String line, String newline, int wrapColumn)
Wraps a single line of text. Called by wrapText(). I can't think of any good reason for exposing this to the public, since wrapText should always be used AFAIK.

Parameters: line A line which is in need of word-wrapping. newline The characters that define a newline. wrapColumn The column to wrap the words at.

Returns: A line with newlines inserted.

wrapMessageToStringsArray

public static String[] wrapMessageToStringsArray(String message, int length)

wrapText

public static String wrapText(String inString, String newline, int wrapColumn)
Takes a block of text which might have long lines in it and wraps the long lines based on the supplied wrapColumn parameter. It was initially implemented for use by VelocityEmail. If there are tabs in inString, you are going to get results that are a bit strange, since tabs are a single character but are displayed as 4 or 8 spaces. Remove the tabs.

Parameters: inString Text which is in need of word-wrapping. newline The characters that define a newline. wrapColumn The column to wrap the words at.

Returns: The text with all the long lines word-wrapped.