org.relayirc.chatengine
Class ChatOptions

java.lang.Object
  |
  +--org.relayirc.chatengine.ChatOptions

public class ChatOptions
extends java.lang.Object
implements java.io.Serializable

User's option settings. Includes identification information like nick name and user name. Includes name of currently select IRC server and a list of other IRC servers.

See Also:
Serialized Form

Constructor Summary
ChatOptions()
           
 
Method Summary
 void addChannel(Channel chan)
          Add channel to list of IRC channels frequented by user.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addServer(Server svr)
          Add server to user's list of IRC servers.
 void addUser(User user)
          Add user to list of users.
 java.lang.String getAltNick()
          Get alternate user's nick name, to be used if primary nick name is already in use by somebody else.
 Channel getChannelAt(int index)
          Get channel by index.
 int getChannelCount()
          Get number of channels.
 java.lang.Object getCustomOption(java.lang.String key)
          Get custom option, keyed by name.
 java.lang.String getDisplayColor(java.lang.String type)
          Gets name of color to be used for display of specified type of chat messages.
 java.lang.String getFontName()
          Get name of font to be used for message display.
 int getFontSize()
          Get point size of font to be used for message display.
 int getFontStyle()
          Get style of font to be used for message display.
 java.lang.String getFullName()
          Get full name of user.
 java.lang.String getNick()
          Get user's nick name.
 Server getServer()
          Get name of IRC chat server.
 Server getServerAt(int index)
          Get user by index.
 int getServerCount()
          Get number of users.
 ServerList getServerList()
          Get vector of servers
 java.util.Vector getServers()
          Get vector of servers
 User getUserAt(int index)
          Get user by index.
 int getUserCount()
          Get number of users.
 java.lang.String getUserName()
          Get user's full name.
 void initNewOptions()
          Initialize with some useful default values.
 boolean isStatusBarEnabled()
          Returns true if status bar is to be shown.
 void removeChannel(Channel channel)
          Remove channel.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removeServer(Server svr)
          Remove server from user's list of IRC servers.
 void removeUser(User user)
          Remove user from user's list of favorite users.
 void setAltNick(java.lang.String str)
          Get alternate user's nick name, to be used if primary nick name is already in use by somebody else.
 void setCustomOption(java.lang.String key, java.lang.Object value)
          Set custom option, keyed by name.
 void setDisplayColor(java.lang.String type, java.lang.String col)
          Sets name of color to be use for display of specified type of chat messages.
 void setFontName(java.lang.String str)
          Set name of font to be used for message display.
 void setFontSize(int size)
          Set point size of font to be used for message display.
 void setFontStyle(int style)
           
 void setFullName(java.lang.String str)
          Set full name of user.
 void setNick(java.lang.String str)
          Set user's nick name.
 void setServer(Server svr)
          Set current chat server.
 void setStatusBarEnabled(boolean flag)
          Enable/disable display of status bar.
 void setUserName(java.lang.String str)
          Set users full name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatOptions

public ChatOptions()
Method Detail

initNewOptions

public void initNewOptions()
Initialize with some useful default values.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

getAltNick

public java.lang.String getAltNick()
Get alternate user's nick name, to be used if primary nick name is already in use by somebody else.

setAltNick

public void setAltNick(java.lang.String str)
Get alternate user's nick name, to be used if primary nick name is already in use by somebody else.
Parameters:
str - New alternate nick name.

addChannel

public void addChannel(Channel chan)
Add channel to list of IRC channels frequented by user.

getChannelCount

public int getChannelCount()
Get number of channels.

getChannelAt

public Channel getChannelAt(int index)
Get channel by index.

removeChannel

public void removeChannel(Channel channel)
Remove channel.

setCustomOption

public void setCustomOption(java.lang.String key,
                            java.lang.Object value)
Set custom option, keyed by name.

getCustomOption

public java.lang.Object getCustomOption(java.lang.String key)
Get custom option, keyed by name.

getDisplayColor

public java.lang.String getDisplayColor(java.lang.String type)
Gets name of color to be used for display of specified type of chat messages. Color names are used because different GUI toolkits (e.g. WFC and JFC) use different classes to represent color.
Parameters:
type - Type of chat message.

setDisplayColor

public void setDisplayColor(java.lang.String type,
                            java.lang.String col)
Sets name of color to be use for display of specified type of chat messages. Color names are used because different GUI toolkits (e.g. WFC and JFC) use different classes to represent color.
Parameters:
type - Type of chat message.
col - Name of color.

getNick

public java.lang.String getNick()
Get user's nick name.

setNick

public void setNick(java.lang.String str)
Set user's nick name.
Parameters:
str - New nick name.

getFontName

public java.lang.String getFontName()
Get name of font to be used for message display.

setFontName

public void setFontName(java.lang.String str)
Set name of font to be used for message display.

getFontSize

public int getFontSize()
Get point size of font to be used for message display.

setFontSize

public void setFontSize(int size)
Set point size of font to be used for message display.

getFontStyle

public int getFontStyle()
Get style of font to be used for message display.

setFontStyle

public void setFontStyle(int style)

getFullName

public java.lang.String getFullName()
Get full name of user.

setFullName

public void setFullName(java.lang.String str)
Set full name of user.

getServer

public Server getServer()
Get name of IRC chat server.

setServer

public void setServer(Server svr)
Set current chat server.

addServer

public void addServer(Server svr)
Add server to user's list of IRC servers.

removeServer

public void removeServer(Server svr)
Remove server from user's list of IRC servers.

getServers

public java.util.Vector getServers()
Get vector of servers

getServerList

public ServerList getServerList()
Get vector of servers

getServerCount

public int getServerCount()
Get number of users.

getServerAt

public Server getServerAt(int index)
Get user by index.

setStatusBarEnabled

public void setStatusBarEnabled(boolean flag)
Enable/disable display of status bar.

isStatusBarEnabled

public boolean isStatusBarEnabled()
Returns true if status bar is to be shown.

getUserName

public java.lang.String getUserName()
Get user's full name.

setUserName

public void setUserName(java.lang.String str)
Set users full name.
Parameters:
str - New name.

addUser

public void addUser(User user)
Add user to list of users.

getUserCount

public int getUserCount()
Get number of users.

getUserAt

public User getUserAt(int index)
Get user by index.

removeUser

public void removeUser(User user)
Remove user from user's list of favorite users.