org.pushingpixels.flamingo.api.bcb
Class BreadcrumbItem<T>

java.lang.Object
  extended by org.pushingpixels.flamingo.api.bcb.BreadcrumbItem<T>
Type Parameters:
T - Type of associated data.

public final class BreadcrumbItem<T>
extends Object

A single item in the JBreadcrumbBar model.


Field Summary
protected  T data
          Data value for this item.
protected  String key
          Display key for this item.
 
Constructor Summary
BreadcrumbItem(String s)
          Creates a new item.
BreadcrumbItem(String key, T data)
          Creates a new item.
 
Method Summary
 T getData()
           
 Icon getIcon()
          Returns the icon of this item.
 int getIndex()
          Returns the index of this item.
 String getKey()
           
 void setIcon(Icon icon)
          Sets the new icon on this item.
 void setIndex(int index)
          Sets the index of this item.
 void setKey(String key)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

key

protected String key
Display key for this item.


data

protected T data
Data value for this item.

Constructor Detail

BreadcrumbItem

public BreadcrumbItem(String key,
                      T data)
Creates a new item.

Parameters:
key - Item key.
data - Item data.

BreadcrumbItem

public BreadcrumbItem(String s)
Creates a new item.

Parameters:
s - String that will be used for display purposes.
Method Detail

getKey

public String getKey()

getData

public T getData()

setKey

public void setKey(String key)

getIndex

public int getIndex()
Returns the index of this item.

Returns:
The index of this item.

setIndex

public void setIndex(int index)
Sets the index of this item.

Parameters:
index - The new index of this item.

toString

public String toString()
Overrides:
toString in class Object

getIcon

public Icon getIcon()
Returns the icon of this item.

Returns:
The icon of this item.

setIcon

public void setIcon(Icon icon)
Sets the new icon on this item.

Parameters:
icon - The new icon for this item.