org.jvnet.flamingo.bcb
Class BreadcrumbItem<T>

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

public final class BreadcrumbItem<T>
extends java.lang.Object

A single item in the JBreadcrumbBar model.


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

Constructor Detail

BreadcrumbItem

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

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

BreadcrumbItem

public BreadcrumbItem(java.lang.String s)
Creates a new item.

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

getKey

public java.lang.String getKey()

getData

public T getData()

setKey

public void setKey(java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object

getIcon

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

Returns:
The icon of this item.

setIcon

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

Parameters:
icon - The new icon for this item.