com.leafdigital.ircui.api
Class AbstractIRCAction

java.lang.Object
  extended by com.leafdigital.ircui.api.AbstractIRCAction
All Implemented Interfaces:
IRCAction
Direct Known Subclasses:
NickAction

public abstract class AbstractIRCAction
extends java.lang.Object
implements IRCAction

Convenience class to make it easier to create IRCActions


Field Summary
 
Fields inherited from interface com.leafdigital.ircui.api.IRCAction
CATEGORY_CHAN, CATEGORY_USER, CATEGORY_USERCHAN
 
Constructor Summary
AbstractIRCAction(java.lang.String name, int category, int order)
           
 
Method Summary
 int getCategory()
          Obtains the category, used for ordering and separating items in the list.
 java.lang.String getName()
           
 int getOrder()
          Obtains the ordering within the category.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.leafdigital.ircui.api.IRCAction
run
 

Constructor Detail

AbstractIRCAction

public AbstractIRCAction(java.lang.String name,
                         int category,
                         int order)
Parameters:
name - Name of action for display
category - An IRCAction.CATEGORY_XX constant
order - Order of action
Method Detail

getCategory

public int getCategory()
Description copied from interface: IRCAction
Obtains the category, used for ordering and separating items in the list.

Specified by:
getCategory in interface IRCAction
Returns:
Category of action; a CATEGORY_xx constant or new constant selected for plugin.

getName

public java.lang.String getName()
Specified by:
getName in interface IRCAction
Returns:
Name of action, used for display on the list

getOrder

public int getOrder()
Description copied from interface: IRCAction
Obtains the ordering within the category. Used to place items at particular positions. When defining new items, try to leave gaps (e.g. put the numbers 10 apart) so that there's room for plugins to insert other options later.

Specified by:
getOrder in interface IRCAction
Returns:
Order within category (lowest first)


Copyright © 2011 Samuel Marshall. All rights reserved.