com.leafdigital.ircui.api
Class IRCActionListMsg

java.lang.Object
  extended by leafchat.core.api.Msg
      extended by com.leafdigital.ircui.api.IRCActionListMsg

public class IRCActionListMsg
extends Msg

Message that is sent when building a list of actions, for example when somebody right-clicks on a nickname or the like. Receivers should call addIRCAction(IRCAction) if they have a possible action that applies in that context.


Field Summary
 
Fields inherited from class leafchat.core.api.Msg
PRIORITY_AFTERNORMAL, PRIORITY_BEFORENORMAL, PRIORITY_EARLY, PRIORITY_FIRST, PRIORITY_LAST, PRIORITY_LATE, PRIORITY_NORMAL
 
Constructor Summary
IRCActionListMsg(Server server, java.lang.String contextChannel, java.lang.String contextNick, java.lang.String selectedChannel, java.lang.String[] selectedNicks)
           
 
Method Summary
 void addIRCAction(IRCAction a)
          Adds an action to the list.
 java.lang.String getChannel()
           
 java.lang.String getContextChannel()
           
 java.lang.String getContextNick()
           
 java.util.Collection<IRCAction> getIRCActions()
          For use by whoever despatched the message, after its despatch.
 java.lang.String getSelectedChannel()
           
 java.lang.String[] getSelectedNicks()
           
 Server getServer()
           
 java.lang.String getSingleNick()
           
 boolean hasChannel()
           
 boolean hasSelectedNicks()
           
 boolean hasSingleNick()
           
 boolean notUs()
           
 
Methods inherited from class leafchat.core.api.Msg
isHandled, isStopped, markHandled, markStopped, sequenceBefore, setSequence, setSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IRCActionListMsg

public IRCActionListMsg(Server server,
                        java.lang.String contextChannel,
                        java.lang.String contextNick,
                        java.lang.String selectedChannel,
                        java.lang.String[] selectedNicks)
Parameters:
server - Server of window this message is for
contextChannel - Context channel
contextNick - Context nickname
selectedChannel - Channel of window this message is for; null if it's not a chan
selectedNicks - Nicknames this message is for; null if none
Method Detail

getIRCActions

public java.util.Collection<IRCAction> getIRCActions()
For use by whoever despatched the message, after its despatch.

Returns:
All the actions that were added

addIRCAction

public void addIRCAction(IRCAction a)
Adds an action to the list.

Parameters:
a - Action

hasSingleNick

public boolean hasSingleNick()
Returns:
True if the action list refers to a nickname (either selected or context)

notUs

public boolean notUs()
Returns:
True if a single nickname, or any of multiple nicknames, is not the current user's

hasSelectedNicks

public boolean hasSelectedNicks()
Returns:
True if there are a number of selected (not context) nicknames

getSingleNick

public java.lang.String getSingleNick()
Returns:
Single nickname

getSelectedNicks

public java.lang.String[] getSelectedNicks()
Returns:
Array of nicknames

getContextNick

public java.lang.String getContextNick()
Returns:
Context nick (e.g. in a message window)

hasChannel

public boolean hasChannel()
Returns:
True if the action list refers to a channel

getChannel

public java.lang.String getChannel()
Returns:
Channel (either selected or context)

getContextChannel

public java.lang.String getContextChannel()
Returns:
Context channel (e.g. in a channel window)

getSelectedChannel

public java.lang.String getSelectedChannel()
Returns:
Selected channel e.g. if clicked on

getServer

public Server getServer()
Returns:
Server


Copyright © 2011 Samuel Marshall. All rights reserved.