net.slashie.libjcsi.textcomponents
Class BasicListItem

java.lang.Object
  extended by net.slashie.libjcsi.textcomponents.BasicListItem
All Implemented Interfaces:
java.io.Serializable, ListItem

public class BasicListItem
extends java.lang.Object
implements ListItem

This provides for an easy way to output into a list, useful for inventory.

Author:
Santiago Zapata
See Also:
Serialized Form

Constructor Summary
BasicListItem(char index, int indexColor, java.lang.String data)
          Constructor that sets all variables.
 
Method Summary
 char getIndex()
           
 int getIndexColor()
           
 java.lang.String getRow()
           
 void setIndex(char index)
          Sets the char to use as an index in the list.
 void setIndexColor(int indexColor)
          Sets the color of the index.
 void setRow(java.lang.String data)
          Sets the String to be contained.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicListItem

public BasicListItem(char index,
                     int indexColor,
                     java.lang.String data)
Constructor that sets all variables.

Parameters:
index - the char to use as an index
indexColor - the color to display the list item
data - the String displayed
Method Detail

getRow

public java.lang.String getRow()
Specified by:
getRow in interface ListItem
Returns:
String of the item

setRow

public void setRow(java.lang.String data)
Sets the String to be contained.

Parameters:
data - String to be contained

setIndex

public void setIndex(char index)
Sets the char to use as an index in the list.

Parameters:
index - char to be used

setIndexColor

public void setIndexColor(int indexColor)
Sets the color of the index.

Parameters:
indexColor - int color

getIndex

public char getIndex()
Specified by:
getIndex in interface ListItem
Returns:
char used as index

getIndexColor

public int getIndexColor()
Specified by:
getIndexColor in interface ListItem
Returns:
int representation of color